Hi Reshma, > -----Original Message----- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Reshma Pattan > Sent: Friday, December 7, 2018 8:02 PM > To: dev@dpdk.org; Dumitrescu, Cristian <cristian.dumitre...@intel.com>; > jerin.ja...@caviumnetworks.com; Singh, Jasvinder > <jasvinder.si...@intel.com> > Cc: Pattan, Reshma <reshma.pat...@intel.com> > Subject: [dpdk-dev] [PATCH v2 1/3] mbuf: implement generic format for > sched field > > This patch implements the changes proposed in the deprecation notes [1][2]. > > librte_mbuf changes: > The 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. > > Added public APIs to set and get these new fields to and from mbuf. > > librte_sched changes: > In addtion, following API functions of the sched library have been modified > 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() > > librte_pipeline, qos_sched UT, qos_sched app are updated to make use of > new changes. > > 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 > <snip> > > 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 are > - * 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 that 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 >since it is expected that the transmit queue will be > + * eventually defined within struct rte_mbuf and 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 = (uint16_t *)&pkt->hash.sched.hi; > + uint16_t *p = (uint16_t *)&pkt->hash.txadapter.txq; > p[1] = queue; > } Replace with pkt->hash.txadapter.txq = 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 = (uint16_t *)&pkt->hash.sched.hi; > + uint16_t *p = (uint16_t *)&pkt->hash.txadapter.txq; > return p[1]; > } Replace with return pkt->hash.txadapter.txq; Thanks, Nikhil