From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 1D3411B4A8 for ; Thu, 13 Dec 2018 09:51:58 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Dec 2018 00:51:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,348,1539673200"; d="scan'208";a="301818925" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by fmsmga006.fm.intel.com with ESMTP; 13 Dec 2018 00:51:58 -0800 Received: from orsmsx113.amr.corp.intel.com (10.22.240.9) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 13 Dec 2018 00:51:57 -0800 Received: from orsmsx110.amr.corp.intel.com ([169.254.10.212]) by ORSMSX113.amr.corp.intel.com ([169.254.9.208]) with mapi id 14.03.0415.000; Thu, 13 Dec 2018 00:51:57 -0800 From: "Rao, Nikhil" To: "Pattan, Reshma" , "dev@dpdk.org" , "Dumitrescu, Cristian" , "jerin.jacob@caviumnetworks.com" , "Singh, Jasvinder" CC: "Pattan, Reshma" , "Rao, Nikhil" Thread-Topic: [dpdk-dev] [PATCH v2 1/3] mbuf: implement generic format for sched field Thread-Index: AQHUjjm1ScMi2X7W+ku0JIzyEfL9laV8YtDQ Date: Thu, 13 Dec 2018 08:51:56 +0000 Message-ID: <1F668163772FA946975B9466A9DFF729ED3B7DAB@ORSMSX110.amr.corp.intel.com> References: <20181123165423.134922-1-jasvinder.singh@intel.com> <1544193116-7058-1-git-send-email-reshma.pattan@intel.com> In-Reply-To: <1544193116-7058-1-git-send-email-reshma.pattan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWNiNTM5YTAtNGQ2NC00MTlmLWIyMzctM2RmNTcxNmZkZDRlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYlp6Rk9xZGlraGU2QlFcL3BuOTFiS1JwZ05tYThYNHNQaTBmUjNaWTNuZVNZQUVmM284NjNFYzN2VFlHb1NpcngifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 1/3] mbuf: implement generic format for sched field X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2018 08:51:59 -0000 Hi Reshma, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Reshma Pattan > Sent: Friday, December 7, 2018 8:02 PM > To: dev@dpdk.org; Dumitrescu, Cristian ; > jerin.jacob@caviumnetworks.com; Singh, Jasvinder > > Cc: Pattan, Reshma > Subject: [dpdk-dev] [PATCH v2 1/3] mbuf: implement generic format for > sched field >=20 > This patch implements the changes proposed in the deprecation notes [1][2= ]. >=20 > librte_mbuf changes: > The mbuf::hash::sched field is updated to support generic definition in l= ine > with the ethdev TM and MTR APIs. The new generic format contains: queue > ID, traffic class, color. >=20 > Added public APIs to set and get these new fields to and from mbuf. >=20 > librte_sched changes: > In addtion, following API functions of the sched library have been modifi= ed > with an additional parameter of type struct rte_sched_port to accommodate > the changes made to mbuf sched field. > (i) rte_sched_port_pkt_write() > (ii) rte_sched_port_pkt_read_tree_path() >=20 > librte_pipeline, qos_sched UT, qos_sched app are updated to make use of > new changes. >=20 > Also mbuf::hash::txadpater s/txadpater/txadapter > have been added for eventdev txq, s/have/has > rte_event_eth_tx_adapter_txq_set and rte_event_eth_tx_adapter_txq_get() > are updated to use uses mbuf::hash::txadpater.txq. s/txadpater/txadapter > >=20 > diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.h > b/lib/librte_eventdev/rte_event_eth_tx_adapter.h > index 81456d4a9..b406660ab 100644 > --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.h > +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.h > @@ -63,11 +63,11 @@ > * function can be used to retrieve the adapter's service function ID. > * > * The ethernet port and transmit queue index to transmit the mbuf on ar= e > - * specified using the mbuf port and the higher 16 bits of > - * struct rte_mbuf::hash::sched:hi. The application should use the > - * rte_event_eth_tx_adapter_txq_set() and > rte_event_eth_tx_adapter_txq_get() > - * functions to access the transmit queue index since it is expected tha= t the > - * transmit queue will be eventually defined within struct rte_mbuf and = using > + * specified using the mbuf port struct rte_mbuf::hash::txadapter:txq. > + * The application should use the rte_event_eth_tx_adapter_txq_set() > + * and rte_event_eth_tx_adapter_txq_get() functions to access the > + transmit > + * queue index=20 >since it is expected that the transmit queue will be > + * eventually defined within struct rte_mbuf and=20 Can we delete the text above ? > using > * these macros will help with minimizing application impact due to > * a change in how the transmit queue index is specified. > */ Retaining the macro looks OK to me. > @@ -300,7 +300,7 @@ rte_event_eth_tx_adapter_queue_del(uint8_t id, > static __rte_always_inline void __rte_experimental > rte_event_eth_tx_adapter_txq_set(struct rte_mbuf *pkt, uint16_t queue) { > - uint16_t *p =3D (uint16_t *)&pkt->hash.sched.hi; > + uint16_t *p =3D (uint16_t *)&pkt->hash.txadapter.txq; > p[1] =3D queue; > } Replace with=20 pkt->hash.txadapter.txq =3D queue; >=20 > @@ -320,7 +320,7 @@ rte_event_eth_tx_adapter_txq_set(struct rte_mbuf > *pkt, uint16_t queue) static __rte_always_inline uint16_t > __rte_experimental rte_event_eth_tx_adapter_txq_get(struct rte_mbuf > *pkt) { > - uint16_t *p =3D (uint16_t *)&pkt->hash.sched.hi; > + uint16_t *p =3D (uint16_t *)&pkt->hash.txadapter.txq; > return p[1]; > } Replace with=20 return pkt->hash.txadapter.txq; Thanks, Nikhil