From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 372631B14D for ; Mon, 10 Dec 2018 18:49:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2018 09:49:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,339,1539673200"; d="scan'208";a="106352137" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga007.fm.intel.com with ESMTP; 10 Dec 2018 09:49:57 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.26]) by IRSMSX106.ger.corp.intel.com ([169.254.8.227]) with mapi id 14.03.0415.000; Mon, 10 Dec 2018 17:49:56 +0000 From: "Dumitrescu, Cristian" To: Jerin Jacob , "Singh, Jasvinder" CC: "dev@dpdk.org" , "Pattan, Reshma" , "Rao, Nikhil" Thread-Topic: [dpdk-dev] [PATCH] mbuf: implement generic format for sched field Thread-Index: AQHUg00z45byq1dxl0GBB/k5BakcbaVp/BAAgA5eQFA= Date: Mon, 10 Dec 2018 17:49:56 +0000 Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E811F17@IRSMSX108.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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGQwY2YwZGQtNjM5NS00MDU4LWJiNmItNThmOTc0ZjVjYThjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVFJXTFRmT2hIaXNzVThXanZyNkZRZGUyNGNWdmt6eE1YMDlcL3ZMcHZcLzRcL0FDZTQwNU9IeERnYmFSeG01REFoYiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.180] 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: Mon, 10 Dec 2018 17:49:59 -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 > index 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]; > > } > > Hi Jerin, Is there a reason why eventdev cannot use the generic 32-bit queue_id field= in mbuf->hash.sched? We can definitely do it the way you suggest, but want to check with you fir= st. Regards, Cristian