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 94BE4A0A0C; Thu, 1 Apr 2021 18:54:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35E50140EAE; Thu, 1 Apr 2021 18:54:09 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 19E0D140EA7; Thu, 1 Apr 2021 18:54:06 +0200 (CEST) IronPort-SDR: 2OBL7EG9h60IorORKg5o7eVFeuKBV59QdEI3pkJyTgtRvzz0C8Ktc4cSZO3Bhu07KMz+PnRde4 cc+O0CP0vjEQ== X-IronPort-AV: E=McAfee;i="6000,8403,9941"; a="277473080" X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="277473080" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 09:54:06 -0700 IronPort-SDR: F1BEFe7ZkXRoxu7qt+BmtIseEtPf39tCTUCLaJPSaiPaBniki8P3Fx+lprd3Jc4DdxDMUaHMQa mzchs0TN3oOQ== X-IronPort-AV: E=Sophos;i="5.81,296,1610438400"; d="scan'208";a="456061994" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.201.245]) ([10.213.201.245]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2021 09:54:03 -0700 To: Raslan Darawsheh , dev@dpdk.org Cc: orika@nvidia.com, andrew.rybchenko@oktetlabs.ru, ivan.malov@oktetlabs.ru, ying.a.wang@intel.com, olivier.matz@6wind.com, viacheslavo@nvidia.com, shirik@nvidia.com, stable@dpdk.org References: <20210330075036.6579-2-rasland@nvidia.com> <20210330080013.6922-1-rasland@nvidia.com> <20210330080013.6922-3-rasland@nvidia.com> From: Ferruh Yigit X-User: ferruhy Message-ID: <9ec04838-2c71-1b64-53db-d6cd2c2abf34@intel.com> Date: Thu, 1 Apr 2021 17:54:02 +0100 MIME-Version: 1.0 In-Reply-To: <20210330080013.6922-3-rasland@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [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" On 3/30/2021 9:00 AM, Raslan Darawsheh wrote: > 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; Again for consistency, what do you think to rename the variable as '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, > + .qfi = 0xff, Since the protocol header is the preferred way, (individual fields may be deprecated in the future), can you please switch to new field, like: .gtp_psc.qfi = 0xff, > }; > #endif > >