From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id CC9BB1B0FC for ; Wed, 5 Dec 2018 12:15:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Dec 2018 03:15:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,317,1539673200"; d="scan'208";a="125260987" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by fmsmga004.fm.intel.com with ESMTP; 05 Dec 2018 03:15:32 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.253]) by IRSMSX109.ger.corp.intel.com ([169.254.13.38]) with mapi id 14.03.0415.000; Wed, 5 Dec 2018 11:15:31 +0000 From: "Singh, Jasvinder" To: Jerin Jacob CC: "dev@dpdk.org" , "Dumitrescu, Cristian" , "Pattan, Reshma" , "Rao, Nikhil" Thread-Topic: [dpdk-dev] [PATCH] mbuf: implement generic format for sched field Thread-Index: AQHUg00/wmpDG3PyC0yDDdndQx7aMKVp/BAAgAYUxDA= Date: Wed, 5 Dec 2018 11:15:30 +0000 Message-ID: <54CBAA185211B4429112C315DA58FF6D33668BDA@IRSMSX103.ger.corp.intel.com> References: <20181123165423.134922-1-jasvinder.singh@intel.com> <20181201142237.GB17147@jerin> In-Reply-To: <20181201142237.GB17147@jerin> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjhmNWVkMzctZjk5My00ZGM3LWE4YmUtMDRkMjI5MTYzODdjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiK0lGelBCMlBYK2JLNlpndStKVzdENHNYNXhWY1VJOXFlMldRUmVBcnNmMWV6cGlWQlwvaUNseVJJaTFDRWc3cGEifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] 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: Wed, 05 Dec 2018 11:15:34 -0000 > -----Original Message----- > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > Sent: Saturday, December 1, 2018 2:23 PM > To: Singh, Jasvinder > Cc: dev@dpdk.org; Dumitrescu, Cristian ; > Pattan, Reshma ; Rao, Nikhil > > Subject: Re: [dpdk-dev] [PATCH] mbuf: implement generic format for sched > field >=20 > -----Original Message----- > > Date: Fri, 23 Nov 2018 16:54:23 +0000 > > From: Jasvinder Singh > > To: dev@dpdk.org > > CC: cristian.dumitrescu@intel.com, Reshma Pattan > > > > Subject: [dpdk-dev] [PATCH] mbuf: implement generic format for sched > > field > > X-Mailer: git-send-email 2.17.1 > > > > This patch implements the changes proposed in the deprecation notes > > [1][2]. > > > > The opaque mbuf->hash.sched field is updated to support generic > > definition in line with the ethdev TM and MTR APIs. The new generic > > format contains: queue ID, traffic class, color. > > > > In addtion, following API functions of the sched library have been > > modified with an additional parameter of type struct rte_sched_port to > > accomodate the changes made to mbuf sched field. > > (i) rte_sched_port_pkt_write() > > (ii) rte_sched_port_pkt_read() > > > > The other libraries, sample applications and tests which use mbuf > > sched field have been updated as well. > > > > [1] http://mails.dpdk.org/archives/dev/2018-February/090651.html > > [2] https://mails.dpdk.org/archives/dev/2018-November/119051.html > > > > Signed-off-by: Jasvinder Singh > > Signed-off-by: Reshma Pattan > > --- > > @@ -575,12 +575,10 @@ struct rte_mbuf { > > */ > > } fdir; /**< Filter identifier if FDIR enabled = */ > > struct { > > - uint32_t lo; > > - uint32_t hi; > > - /**< The event eth Tx adapter uses this= field > > - * to store Tx queue id. > > - * @see rte_event_eth_tx_adapter_txq_se= t() > > - */ > > + uint32_t queue_id; /**< Queue ID. */ > > + uint8_t traffic_class; /**< Traffic c= lass ID. */ > > + uint8_t color; /**< Color. */ > > + uint16_t reserved; /**< Reserved. */ > > } sched; /**< Hierarchical scheduler *= / >=20 > +Nikhil. >=20 > Currently rte_event_eth_tx_adapter_txq_set() and > rte_event_eth_tx_adapter_txq_get() implemented using > hash.sched.queue_id. How about moving out from "sched" to "txadapter"? > Something like below, >=20 > $ git diff > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h inde= x > 3dbc6695e..b73bbef93 100644 > --- a/lib/librte_mbuf/rte_mbuf.h > +++ b/lib/librte_mbuf/rte_mbuf.h > @@ -575,13 +575,20 @@ struct rte_mbuf { > */ > } fdir; /**< Filter identifier if FDIR enabled */ > struct { > - uint32_t lo; > - uint32_t hi; > + uint32_t queue_id; /**< Queue ID. */ > + uint8_t traffic_class; /**< Traffic cla= ss ID. */ > + uint8_t color; /**< Color. */ > + uint16_t reserved; /**< Reserved. */ > + } sched; /**< Hierarchical scheduler */ > + struct { > + uint32_t reserved1; > + uint16_t reserved2; > + uint16_t txq; > /**< The event eth Tx adapter uses this f= ield > * to store Tx queue id. > * @see rte_event_eth_tx_adapter_txq_set(= ) > */ > - } sched; /**< Hierarchical scheduler */ > + } txadapter; /**< Eventdev ethdev Tx adapter */ > /**< User defined tags. See rte_distributor_proce= ss() */ > uint32_t usr; > } hash; /**< hash information */ >=20 >=20 > > 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.sched.queue_id; > > p[1] =3D queue; > > } > > > > @@ -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.sched.queue_id; > > return p[1]; > > } > > Will make this change in the next version. Thanks.