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 AE719A0547; Sun, 4 Apr 2021 09:46:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6CDF5140E97; Sun, 4 Apr 2021 09:46:19 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2040.outbound.protection.outlook.com [40.107.243.40]) by mails.dpdk.org (Postfix) with ESMTP id A0F7B140E81; Sun, 4 Apr 2021 09:46:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fD3pznrBigPc3lZdr9oQLmROv8l1Q8vTLGc+Pw9s0qsvG3UsLreR857tERH2/vTSQIjMkst0L2bzZO0b9q2nwqvtT9IcUEuBQrO6HT9UgTRWVhiRHzJfL9upQ9bUxJ1w0c8LC8KhidXxfBgvoMmBsEGlXw8a6npCyMgrloR1eBqa867eDBQJpMGi9IxGhMeX57+585CzKib0w+7g8mrIrP2bPcsVEp3jJr4/D0WXb6wsBtHkAbAybiTGoQp6jG7orwjChceYwtIRkWMxmQafLuk+M6JvnRJovw3pVKeY57s+Pt0Mfn+RGUxf7VacLPaEJfobwic3TScI1h/7nnAGYg== 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=mwty+lFq3l1Q+RityzLZQYExSHcFJswWNhB+lE1B+jY=; b=AprBDWOHisfsU0kv5M5pgWOJJHMf2btWcYAN2zzv5OnWnDecIszv73qdban0st/RSkShPgoYK/T8VYlWER5ST2AB1ETHw7Pa5AHRw5+tGNgzKGqYxDPCrOXv7O0QOeuZob8nxhOnxYudDvF8BYattderxP4av2K/dQU8wu1QfMk3IB9+IqB8G6iby7P19FZKibD66WYAhXICs/EzS0+6B0k7S9dcpCfqz1Z1q9jYSoQITKO2HkAAVgh2gVazZo32rjJf4BhkYDSmQ3MG/Jra5HE6dx5Abi2PcOzJee6BotTnBa/da7Ccl6AxfcqNNlaurYHvjLaXC44PtbYSk9t0YA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com 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=mwty+lFq3l1Q+RityzLZQYExSHcFJswWNhB+lE1B+jY=; b=OEuFFtj0tA6wfaYfjwU6qpWiKdLjgsshEP3FKY4WklwigjR+B0XDNOI/O/w7YGuplYUFoUcIRDQMuD8DgJtJGoDB8SFBNeKJrybh2Iw1oysFfdoLcb13ZT/pdzB6fwzAHdgpjmFaGxzvKMHYF5YuhmL8+o02YmEYKJprhbB/AupQkrHfjw4mNvw99ziEUeNV1PteMjjvx1FZ+jDNsx2pe2j/eA7Q6eHIARQ9e1cMWobsQo6O9bSkfzKBT+1THReMQ+5Rl3zLXcAXArN9w7H+qV30u+MxlySZwJGWFdGsCGtHeOw+5+bOLGha0UiMEoSfqSd9tvhpn0vBJt1S55RHPg== Received: from MWHPR22CA0067.namprd22.prod.outlook.com (2603:10b6:300:12a::29) by BYAPR12MB3286.namprd12.prod.outlook.com (2603:10b6:a03:139::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Sun, 4 Apr 2021 07:46:17 +0000 Received: from CO1NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:300:12a:cafe::16) by MWHPR22CA0067.outlook.office365.com (2603:10b6:300:12a::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.26 via Frontend Transport; Sun, 4 Apr 2021 07:46:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; 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 CO1NAM11FT049.mail.protection.outlook.com (10.13.175.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.3999.28 via Frontend Transport; Sun, 4 Apr 2021 07:46:16 +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; Sun, 4 Apr 2021 07:46:13 +0000 From: Raslan Darawsheh To: , CC: , , , , , , , Date: Sun, 4 Apr 2021 10:45:52 +0300 Message-ID: <20210404074552.24190-3-rasland@nvidia.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210404074552.24190-1-rasland@nvidia.com> References: <20210330075036.6579-2-rasland@nvidia.com> <20210404074552.24190-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: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f0a2234f-79af-4c25-fb9c-08d8f73dbab0 X-MS-TrafficTypeDiagnostic: BYAPR12MB3286: 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: eW3enlOs+fBeTR5gtpbTAxnyfgTUzvVxPzLhs+jkUFjtaxOsvgKWov2G0vioyX+Uhu5/l2lhHfEQarb1iYKO/yGuudno3D2Mh0nj/sfEnEuWAQMV+sdFRxSyBNJLka4EUzkmwH6XMURZZvSE6BAThrvrVnLlLlxkRdE0WzxrYJk9SQbGYKqVCEbMegGlCb2tIeYb4XU1Cc0kdUElR7WtYpZOF8nryZxFuK+SV8Vn9AmI9xMNwVYrHOfBNECQk+MZNMuDXTcvVWXkRpLsDBAeCOEETUTvalNyDsw17fvZZOJ6v2pfWVVDyRS797j78yjqFy7osT1Apb2WahKKbeu/5JzliiPwEptZRfeO+XxbdG6ad5mSM5Z5pT4m6v8Abpeh+6h2tRm2XP0Z2BRQtWaVF/eS+9PB80tAEGS7KgWPl4Rki4RPNV/bbEz9HfF9Kf6uiRk5NCXkC5haxGwLqWm7b0WJdXCusuek1YZL4sh8isvBXOyGATH9TnF7fTP5qbp+L16x2s2JmgwNSjesKlTx13hrGEYrFocmfLz0NuUKJ+KC3zzsUPoUPfsPrrEfdAo/T8+tD9G73mOM2sKnb3z+8ZsY5gCrtXSfhXBCt6/tcaZQ5LebSRb9RSxxzDPGzuPGP5rxv4eNkQoOSJ+QlxgCKlzK1yZy8gevEO58FUtLCn0= 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)(346002)(136003)(39860400002)(396003)(376002)(36840700001)(46966006)(6666004)(82310400003)(5660300002)(8676002)(6286002)(36756003)(426003)(8936002)(47076005)(55016002)(2616005)(16526019)(336012)(86362001)(7636003)(186003)(54906003)(70586007)(70206006)(15650500001)(110136005)(82740400003)(356005)(36906005)(316002)(36860700001)(4326008)(7696005)(478600001)(2906002)(83380400001)(1076003)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2021 07:46:16.9082 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0a2234f-79af-4c25-fb9c-08d8f73dbab0 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: CO1NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3286 Subject: [dpdk-dev] [PATCH v4 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 | 20 +++++++++++++++++--- 2 files changed, 19 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..20b4389429 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,29 @@ 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_hdr hdr; + }; }; /** 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, + .hdr.ppp = 1, + .hdr.rqi = 1, + .hdr.qfi = 0x3f, }; #endif -- 2.29.0