[dpdk-dev] [PATCH] ethdev: add new RX/TX queue state arrays in rte_eth_dev_data

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Thu Sep 17 10:31:59 CEST 2015



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Thursday, September 17, 2015 8:24 AM
> To: De Lara Guarch, Pablo
> Cc: dev at dpdk.org; Ananyev, Konstantin
> Subject: Re: [dpdk-dev] [PATCH] ethdev: add new RX/TX queue state arrays
> in rte_eth_dev_data
> 
> 2015-09-16 21:22, De Lara Guarch, Pablo:
> > From: Ananyev, Konstantin
> > > Why not something like:
> > > ret = dev->dev_ops->tx_queue_start(dev, tx_queue_id);
> > > if (ret == 0)
> > >   dev->data->tx_queue_state[tx_queue_id] =
> > > RTE_ETH_QUEUE_STATE_START;
> > >
> > > Same for dev_stop and RX.
> > > Then you hopefully wouldn't need to update each and every PMD,
> > > only rteh_ethdev* would be affected.
> >
> > Problem is that some PMDs call internally queue_start/stop, but not the
> generic rte_eth_rx_queue_start (stop and RX),
> > so in that case this would not update the state of the queue.
> 
> Why not changing PMD to call rte_eth_rx_queue_start? Do you think it will
> be
> too much error prone for later updates?

I thought PMDs didn't call API from rte_ethdev. In fact, that function needs a port id,
which is not available in the PMD functions usually.
Well, port id can be available in this case since the queues have it as a field, but I see it as a worse solution,
as it would be inconsistent with the way PMDs work, IMO.

Thanks,
Pablo


More information about the dev mailing list