From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 38356A034F; Tue, 30 Mar 2021 09:51:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C03CD140DA2; Tue, 30 Mar 2021 09:51:03 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2077.outbound.protection.outlook.com [40.107.223.77]) by mails.dpdk.org (Postfix) with ESMTP id 36614140DC2; Tue, 30 Mar 2021 09:51:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qn5VNnL2wqJMuknbdxZNyO6HMnK0FC8gbfQ2ZOIghM18Z/4DCYy7LtRUMq+wE2Ps5V4U+2kLSb1EWVD/m5zVtTXV/uHJMunz3kF5Vy2LpJ6BBkW/llOjb+/f1y+kPSVrjPSSJYWOQwg230dRhkBYcoYfkCrhtBSduXoxXZCX5rG0BBq3BRdNij3EhB3fNdtqoq217AZXWnzcn0xNsqNwYPAJsWwRTfkxSmB0lFAU7l5nv24uMyl6vdpJCd3uljN9RO+t6LRC5HXYWc1T5DKJHTZRA/xcTbUDnllLENct6Eh/t+kP1YzsEAdvJLhdZU7LZ4uqSsNF/tTiw5kuXQIFkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c64fXEB+h0QHCX5NGapz8lv/nB4xI4emS4P/2FHgpy4=; b=O6l9pbaDNmk7A1pJY663CkmeIXtTaRzhLUL+QMia2qaCvXfSJQzReBi4G71/6DoNqHh3ZyssV9y8uwdea2Jbgr+s1AylGrPhahCWMQIBbTtVjRL+GdO3TeGtMzDwYjNgKTw+NoJxZDaiHMlfBxYyVGmfJC69o0k8d2LL4gnwtV0Gk4maWmFZVntwCM6e56X6KuDLMZ4YW0Ocu2Ic616RpHrPGsBSL8aGZXyOu4IyzzthtiTQw40e/U5Hhlq+rIBtQU0LXfKsTKOHPDD9SRpgFX9nqtNcG5zMUuyBNbzCHkCcriLCSuwhHfm0V4fbzwedoX+AZgHhiSD5kepmpdiEuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c64fXEB+h0QHCX5NGapz8lv/nB4xI4emS4P/2FHgpy4=; b=gTeHK6lEecsZQUuYhFq5YVMBBYie9ANk4i377h/Iz35ONgTQLe+ae0okfpLQIV4851SeUiKbPpfeEV56SENBaIAu22Jvn/Gp2kfmhgx5taNLmuWqslgETtwoWQmyQFwkpaVhRUafSOTsbSygok1MA+gmpcJQ3YTeJLJmfvCcHNgVUb8+FEFSSXoceXFwsQi55J48r0P67Jq2s1hs8b7PAsJhiHT4CUABC9tN8zfjXFZUycKB2WorfePxhijbNz+75C3DYb0X/ZcfIC0WYO6fUsc9FTcJl8SVH79tJs6X5r69qjrhFaGhDUpI2D2gsFsS0h77VMQKCO1tDS2YAKNsQg== Received: from MW4PR03CA0267.namprd03.prod.outlook.com (2603:10b6:303:b4::32) by MN2PR12MB3168.namprd12.prod.outlook.com (2603:10b6:208:af::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.32; Tue, 30 Mar 2021 07:51:00 +0000 Received: from CO1NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b4:cafe::70) by MW4PR03CA0267.outlook.office365.com (2603:10b6:303:b4::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.26 via Frontend Transport; Tue, 30 Mar 2021 07:51:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by CO1NAM11FT021.mail.protection.outlook.com (10.13.175.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3955.18 via Frontend Transport; Tue, 30 Mar 2021 07:50:59 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 30 Mar 2021 07:50:57 +0000 From: Raslan Darawsheh To: CC: , , , Date: Tue, 30 Mar 2021 10:50:36 +0300 Message-ID: <20210330075036.6579-3-rasland@nvidia.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210330075036.6579-1-rasland@nvidia.com> References: <20210323121134.19113-1-rasland@nvidia.com> <20210330075036.6579-1-rasland@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d4b242ca-8d15-4716-2e46-08d8f3508f35 X-MS-TrafficTypeDiagnostic: MN2PR12MB3168: X-Microsoft-Antispam-PRVS: X-MS-Exchange-Transport-Forked: True X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XmYFxXdMU975UmXWi8MkrbdBlKT6rQwayRQOvdWF6z9sB6YfigiHdRJSd5zFOiWfVrt4AxfkMDahjzMy6XI0u6mn+3tLjEBDLEKJg/xmv6zhsr3fY5DbKUDNJt01Vpj1E0pwQArjBXyHihjfBoXcA3B35WlXjdU/uhYSe29BqL3NS2Th7lEywtGct8MYbEXbWccx/FG7bAIr7IrZIey/q2kSwFaMgvSJD+zNPNO/xwJzZP5+VrtTwRv1tbEaUW5SM8ElPGuIjRgr1QcK9joWl+JjBIq6knLEk+wNURvXhp5VcishfMiUoVlrFKVSYS1Fh7DvV92w+DsmODRdjTwQIHaW0RY+Xa/FNEy/C4Py+YCYXgZZbwmltPLljZ126zN4duX1vyKyvmjUpL9V3fhM15DqOYv/mrkKe/NGz86WdALRCtg3eeUXUt7h7Ot2D5OEJ+iq7IG9VI3BTfLH7leYUl6/Phg1EjvYrumZG9Fory0ig9C9umxc6stV4erdQgrZ9ct3O2SGl+0/UeW+t0ZMOQl2JszVk4Bvcib/7SzleKWr5r/XAYXcT64eHjnPBeV+eGQKFK9BXLGN+/51N5jb4d1KdCiAsYl1PKKG0UNjOd+7V5gP34S8kvr/CEDXWCY+Qtvg9K5O++kPlP2vlKSMoj0Jip5y2kGcLG1JwVjq9aQ= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(136003)(376002)(346002)(396003)(39860400002)(46966006)(36840700001)(82740400003)(5660300002)(86362001)(8676002)(426003)(8936002)(55016002)(83380400001)(336012)(82310400003)(7636003)(356005)(6916009)(70586007)(54906003)(70206006)(26005)(36906005)(316002)(47076005)(16526019)(1076003)(2906002)(4326008)(186003)(6666004)(2616005)(36860700001)(36756003)(15650500001)(6286002)(7696005)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2021 07:50:59.5857 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d4b242ca-8d15-4716-2e46-08d8f3508f35 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3168 Subject: [dpdk-dev] [PATCH v2 2/2] ethdev: update qfi definition X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" qfi field is 8 bits which represent single bit for PPP (paging Policy Presence) single bit for RQI (Reflective QoS Indicator) and 6 bits for qfi (QoS Flow Identifier) based on RFC 38415-g30 This update the doxygen format and the mask for qfi to properly identify the full 8 bits of the field. note: changing the default mask would cause different patterns generated by testpmd. Fixes: 346553db5bd1 ("ethdev: add GTP extension header to flow API") Cc: ying.a.wang@intel.com Cc: stable@dpdk.org Signed-off-by: Raslan Darawsheh --- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 3 ++- lib/librte_ethdev/rte_flow.h | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index f59eb8a27d..dd39c4c3c2 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -3742,7 +3742,8 @@ This section lists supported pattern items and their attributes, if any. - ``gtp_psc``: match GTP PDU extension header with type 0x85. - ``pdu_type {unsigned}``: PDU type. - - ``qfi {unsigned}``: QoS flow identifier. + + - ``qfi {unsigned}``: PPP, RQI and QoS flow identifier. - ``pppoes``, ``pppoed``: match PPPoE header. diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index 6cc57136ac..1eb9711707 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1421,16 +1422,27 @@ static const struct rte_flow_item_meta rte_flow_item_meta_mask = { * * Matches a GTP PDU extension header with type 0x85. */ +RTE_STD_C11 struct rte_flow_item_gtp_psc { - uint8_t pdu_type; /**< PDU type. */ - uint8_t qfi; /**< QoS flow identifier. */ + union { + struct { + /* + * These fields are retained for compatibility. + * Please switch to the new header field below. + */ + uint8_t pdu_type; /**< PDU type. */ + uint8_t qfi; /**< PPP, RQI, QoS flow identifier. */ + + }; + struct rte_gtp_psc gtp_psc; + }; }; /** Default mask for RTE_FLOW_ITEM_TYPE_GTP_PSC. */ #ifndef __cplusplus static const struct rte_flow_item_gtp_psc rte_flow_item_gtp_psc_mask = { - .qfi = 0x3f, + .qfi = 0xff, }; #endif -- 2.29.0