[dpdk-dev] [PATCH 3/6] net/e1000: implement descriptor status API (igb)

Olivier Matz olivier.matz at 6wind.com
Thu Mar 2 14:58:29 CET 2017


Hi Wenzhuo,

On Thu, 2 Mar 2017 01:28:21 +0000, "Lu, Wenzhuo" <wenzhuo.lu at intel.com> wrote:
> Hi Olivier,
> 
> > -----Original Message-----
> > From: Olivier Matz [mailto:olivier.matz at 6wind.com]
> > Sent: Thursday, March 2, 2017 1:19 AM
> > To: dev at dpdk.org; thomas.monjalon at 6wind.com; Ananyev, Konstantin; Lu,
> > Wenzhuo; Zhang, Helin; Wu, Jingjing; adrien.mazarguil at 6wind.com;
> > nelio.laranjeiro at 6wind.com
> > Cc: Yigit, Ferruh; Richardson, Bruce
> > Subject: [PATCH 3/6] net/e1000: implement descriptor status API (igb)
> > 
> > Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
> > +
> > +int
> > +eth_igb_tx_descriptor_status(struct rte_eth_dev *dev, uint16_t tx_queue_id,
> > +	uint16_t offset)
> > +{
> > +	volatile uint32_t *status;
> > +	struct igb_tx_queue *txq;
> > +	uint32_t desc;
> > +
> > +	txq = dev->data->tx_queues[tx_queue_id];
> > +	if (unlikely(offset >= txq->nb_tx_desc))
> > +		return -EINVAL;
> > +
> > +	desc = txq->tx_tail + offset;  
> Should we check nb_tx_desc here? The same for em.

Correct, thanks.

Olivier


More information about the dev mailing list