> -----Original Message-----
> From: Nipun Gupta
> Sent: 03 January 2022 11:17
> To: Stephen Hemminger <step...@networkplumber.org>
> Cc: dev@dpdk.org; tho...@monjalon.net; ferruh.yi...@intel.com; Hemant
> Agrawal <hemant.agra...@nxp.com>; Jun Yang <jun.y...@nxp.com>
> Subject: RE: [PATCH v2 06/16] net/dpaa2: support multiple txqs en-queue for
> ordered
> 
> 
> 
> > -----Original Message-----
> > From: Stephen Hemminger <step...@networkplumber.org>
> > Sent: 27 December 2021 23:32
> > To: Nipun Gupta <nipun.gu...@nxp.com>
> > Cc: dev@dpdk.org; tho...@monjalon.net; ferruh.yi...@intel.com; Hemant
> > Agrawal <hemant.agra...@nxp.com>; Jun Yang <jun.y...@nxp.com>
> > Subject: Re: [PATCH v2 06/16] net/dpaa2: support multiple txqs en-queue for
> > ordered
> >
> > On Mon, 27 Dec 2021 21:46:35 +0530
> > nipun.gu...@nxp.com wrote:
> >
> > > @@ -1003,16 +1003,20 @@ dpaa2_eventdev_txa_enqueue(void *port,
> > >                      struct rte_event ev[],
> > >                      uint16_t nb_events)
> > >  {
> > > - struct rte_mbuf *m = (struct rte_mbuf *)ev[0].mbuf;
> > > + void *txq[32];
> > > + struct rte_mbuf *m[32];
> >
> > You are assuming nb_events <= 32.
> > Why not size the array based on nb_events.
> 
> Agree. Actually I will use DPAA2_EVENT_MAX_PORT_ENQUEUE_DEPTH here.
> 
> >
> > >   uint8_t qid, i;
> > >
> > >   RTE_SET_USED(port);
> > >
> > >   for (i = 0; i < nb_events; i++) {
> > > -         qid = rte_event_eth_tx_adapter_txq_get(m);
> > > -         rte_eth_tx_burst(m->port, qid, &m, 1);
> > > +         m[i] = (struct rte_mbuf *)ev[i].mbuf;
> >
> > Why the cast? it is already the right type.
> 
> Will remove the cast.

mbuf is void *type in event structure, so it seems better to cast here.

> 
> Thanks,
> Nipun
> 
> >
> > > +         qid = rte_event_eth_tx_adapter_txq_get(m[i]);
> > > +         txq[i] = rte_eth_devices[m[i]->port].data->tx_queues[qid];

Reply via email to