From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 2477E5B40 for ; Thu, 20 Dec 2018 15:55:52 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Dec 2018 06:55:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,377,1539673200"; d="scan'208";a="285293968" Received: from orsmsx110.amr.corp.intel.com ([10.22.240.8]) by orsmga005.jf.intel.com with ESMTP; 20 Dec 2018 06:55:52 -0800 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX110.amr.corp.intel.com (10.22.240.8) with Microsoft SMTP Server (TLS) id 14.3.408.0; Thu, 20 Dec 2018 06:55:51 -0800 Received: from orsmsx110.amr.corp.intel.com ([169.254.10.212]) by ORSMSX111.amr.corp.intel.com ([169.254.12.234]) with mapi id 14.03.0415.000; Thu, 20 Dec 2018 06:55:51 -0800 From: "Rao, Nikhil" To: "Pattan, Reshma" , "dev@dpdk.org" , "jerin.jacob@caviumnetworks.com" , "olivier.matz@6wind.com" , "thomas@monjalon.net" , "Singh, Jasvinder" , "Dumitrescu, Cristian" , "Ananyev, Konstantin" Thread-Topic: [PATCH v7 2/2] mbuf: implement generic format for sched field Thread-Index: AQHUmF3fUEKgtN1DFkSviClUNnJsVKWHtfrQ Date: Thu, 20 Dec 2018 14:55:50 +0000 Message-ID: <1F668163772FA946975B9466A9DFF729ED3BE771@ORSMSX110.amr.corp.intel.com> References: <20181219154237.836-1-reshma.pattan@intel.com> <20181220121609.16314-1-reshma.pattan@intel.com> <20181220121609.16314-2-reshma.pattan@intel.com> In-Reply-To: <20181220121609.16314-2-reshma.pattan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzRkMzE4MGUtMDM5My00NWVlLTlmNWEtMjRlZDU4MjYxMGY4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidmFyUFlsdm1DNkxLS0QyQUc0VkdhekR4XC9FSGRLSmoyQ0ZYSVAxNUllZ3VHbGlGcUtEcEtJVlRQTjAyNmNtVHQifQ== 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 v7 2/2] 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, 20 Dec 2018 14:55:53 -0000 > -----Original Message----- > From: Pattan, Reshma > Sent: Thursday, December 20, 2018 5:46 PM > To: dev@dpdk.org; jerin.jacob@caviumnetworks.com; Rao, Nikhil > ; olivier.matz@6wind.com; thomas@monjalon.net; > Singh, Jasvinder ; Dumitrescu, Cristian > ; Ananyev, Konstantin > > Cc: Pattan, Reshma > Subject: [PATCH v7 2/2] 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 li= ne > with the ethdev traffic manager and meter 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.txadapter has been added for eventdev txq, > rte_event_eth_tx_adapter_txq_set and rte_event_eth_tx_adapter_txq_get() > are updated to use mbuf->hash.txadapter.txq. >=20 > doc: > Release notes updated. > Removed deprecation notice for mbuf->hash.sched and sched API. >=20 > [1] http://mails.dpdk.org/archives/dev/2018-February/090651.html > [2] https://mails.dpdk.org/archives/dev/2018-November/119051.html >=20 > Signed-off-by: Jasvinder Singh > Signed-off-by: Reshma Pattan > Acked-by: Cristian Dumitrescu > Acked-by: Konstantin Ananyev > --- > v7: >=20 > Edited the commit message. > Moved rte_mbuf_sched inside the rte_mbuf struct. > Added missing empty line in doxygen comments of sched set and get > functions. >=20 > v6: added scheduler comment >=20 > v5: > Removed librte_meter from librte_mbuf dependency list. > Changed the mbuf set/get functions to use uint8_t for color. >=20 > v4: converted mbuf->hash.sched as instantiation of rte_mbuf_sched. >=20 > v3: addressed review comments given in the below link. > http://patches.dpdk.org/patch/48587/ > Updated library ABI versioning in meson build. > --- > --- > doc/guides/rel_notes/deprecation.rst | 10 -- > doc/guides/rel_notes/release_19_02.rst | 4 +- > examples/qos_sched/app_thread.c | 7 +- > examples/qos_sched/main.c | 1 + > .../rte_event_eth_tx_adapter.h | 18 ++- > lib/librte_mbuf/Makefile | 2 +- > lib/librte_mbuf/meson.build | 2 +- > lib/librte_mbuf/rte_mbuf.h | 119 +++++++++++++++++- > lib/librte_pipeline/rte_table_action.c | 44 +++---- > lib/librte_sched/Makefile | 2 +- > lib/librte_sched/meson.build | 1 + > lib/librte_sched/rte_sched.c | 90 ++++++------- > lib/librte_sched/rte_sched.h | 10 +- > test/test/test_sched.c | 9 +- > 14 files changed, 197 insertions(+), 122 deletions(-) >=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..2a50656d9 100644 > --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.h > +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.h > @@ -63,13 +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 > - * these macros will help with minimizing application impact due to > - * a change in how the transmit queue index is specified. > + * 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, using these macros will help with minimizing > + application > + * impact due to a change in how the transmit queue index is specified. > */ >=20 > #ifdef __cplusplus > @@ -300,8 +298,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; > - p[1] =3D queue; > + pkt->hash.txadapter.txq =3D queue; > } >=20 > /** > @@ -320,8 +317,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; > - return p[1]; > + return pkt->hash.txadapter.txq; > } >=20 Event Tx adapter changes=20 Tested-by: Nikhil Rao Reviewed-by: Nikhil Rao