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 07B37A034F; Tue, 30 Mar 2021 10:01:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 799CD140DA2; Tue, 30 Mar 2021 10:01:26 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2057.outbound.protection.outlook.com [40.107.236.57]) by mails.dpdk.org (Postfix) with ESMTP id 31C31406B4; Tue, 30 Mar 2021 10:01:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MaRZNYrONrd4SC9s+Xmpj7MDlPiYoTVFzAOgYK/ZJPd/QaHDqXSUlLiX/K2Tvo7C4YKPCJRbWzOH0B0IONW9/x/6t9GcJ928Q+4Q33o53whwu2y5Cf8L9Hc9EvKGYCvvu9pzZBw7abBF02ZPrPTF8PqPnHQlwqVFUCye/Lp7QI20i+ZUJ0H7x589AL7xBRD4NTlns9nK4U9r9ZxLC9DjW02hL4Jw5flVKvmpz77PsJvQG/rK6fbR+7EtU0uGPuwuP7YTdKxdGTNIgbgn3UtYQbh6LA0b6qWcq3pC8F3oOrzxijUXNvjYMTIey2eAyBKf5PYkiaOz/X/toH49k2AMwQ== 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=h59j9ByDz6imV1r7mQFUEdN6tojM00jjnG+yJ/4GiTmy0U3fPCI5DwUMCJmaJfd5sAv402/8qRI72G4WEHyz87P+X210DXoYDRwX76Pt4dsgFrLVpWykoQGmFMp/keLg3PymmGLHfBA1iwGzjeuyD1SvBKzFRfaHvGhkAOKljYvqzi60gHfakMFvhqFzBsMf2ihWp1ar6j2QhFIwhndW+Im3mp4Sd4//E4iUFu9iH4xPPXpubOOYCQxG5bqS+Xn7a0LYT3PWaumq6nYk7nkpJc9esFYSsA/cbF6l434zI63QYM/wx9c8Tw9dBffcRbvA4AxK7QaPuzbSLMXoEBtMTQ== 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=c64fXEB+h0QHCX5NGapz8lv/nB4xI4emS4P/2FHgpy4=; b=X4rB4YRKjsn/ik8E/Eg9j87Vj46muI4szSHz7tHYIxhSSpF6zWFCzpxiHca6Gv589qbjbKYUxwlJP0XJohigmKCpMboKYjZYStBLEYWLRNapnhNzxndYZsvjPXRYxbzKx+JaRubUNklWEaEjaOF1HkwQ/su+jNSQH+eNR3Ftsv1MHfolEiCRyQ197VI3yxMC4DvNsvFxj6hOHZgr405AHKW59rhP7KjZK560L48K5Ag9y2u5XPKF8XyF/8S74mnBQ+zxQoecNxzJ614Px/2RPX/Pd/OhqF7yuyPgI+raEU114isiPd0PV9VikVPZqF79MmpoX2daf7OS4Wr8qE8gWg== Received: from MWHPR15CA0038.namprd15.prod.outlook.com (2603:10b6:300:ad::24) by CH0PR12MB5202.namprd12.prod.outlook.com (2603:10b6:610:b9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.26; Tue, 30 Mar 2021 08:01:22 +0000 Received: from CO1NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:300:ad:cafe::d1) by MWHPR15CA0038.outlook.office365.com (2603:10b6:300:ad::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.32 via Frontend Transport; Tue, 30 Mar 2021 08:01:21 +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 CO1NAM11FT064.mail.protection.outlook.com (10.13.175.77) 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 08:01:21 +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 08:00:36 +0000 From: Raslan Darawsheh To: CC: , , , , , , , , Date: Tue, 30 Mar 2021 11:00:13 +0300 Message-ID: <20210330080013.6922-3-rasland@nvidia.com> X-Mailer: git-send-email 2.29.0 In-Reply-To: <20210330080013.6922-1-rasland@nvidia.com> References: <20210330075036.6579-2-rasland@nvidia.com> <20210330080013.6922-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: f2ed2ba1-6650-4042-78fd-08d8f35201f2 X-MS-TrafficTypeDiagnostic: CH0PR12MB5202: 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: L4ZnO5CTRGJoS3iNkCn706MI8rDj61YQ7/rUyoFyjrNOfXubo2OEyjwTKmyrOmY07TrKRvEE0Vpvzg+GeQCKeoGhLTr9XEZEIAgoR8m7XqjpqAPXy99qS31i2euXIV3mJPxF9e797pVIqxLe3ljwCuaXUnbypR8jEU+EkfTGVR8NW9nnlHq8ZyHKDfhrHluqrmKxNy9jPrOzDL9kiq/q3HTe/KQcjVByUDJELNCUNUQxwXAKZ08n3EgiP1tkHVwmZB0bY0bpNqSyR0De3dom2kDBq7ITEBgYZhAGcVTCcXtvSzPmrRTf/fn2NEv/9tdmbNbV4Ii5rtIgKC/sBVZR0KK7b5Buo/PKlpX9Mh+31A06vvjVAIn4BzKub6LPvELSYWQbfVr7L2oMR+C20gD/YnpH+OzZgRaAn5509SB8GYJQXrMpX3YX0lsEBsRJnkmteaAzU3hhjKRO6T8U4NVqN2XNiQmzkEPK0UF/cQVzD0PLAmgu1m+ddh9ENLw6WMfLkg6ZjOOPK5eltxs9eW0q8H/As9vT91Dp6+1fltKJmsRtXJiv6m9dXwiDzjE7GCCOtzQgl+zcT99WeQlsLHEbTNb3bOqWeAIUCQIyVRdlkUr4PvxrNMZN+ggscFK70VBUCdjiM5qpQvYeq2/r7Ds3zXNsoRd+P+8MpftvVt2bsfw= 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)(396003)(376002)(346002)(39860400002)(136003)(46966006)(36840700001)(1076003)(6666004)(478600001)(5660300002)(70586007)(36906005)(4326008)(7696005)(70206006)(36860700001)(36756003)(6286002)(316002)(47076005)(55016002)(26005)(54906003)(83380400001)(6916009)(336012)(426003)(82310400003)(15650500001)(7636003)(186003)(16526019)(8676002)(86362001)(2906002)(82740400003)(2616005)(356005)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2021 08:01:21.7331 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f2ed2ba1-6650-4042-78fd-08d8f35201f2 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: CO1NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5202 Subject: [dpdk-dev] [PATCH v3 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