Hi Olivier,
> -----Original Message-----
> From: Olivier Matz [mailto:[email protected]]
> Sent: Thursday, March 2, 2017 1:19 AM
> To: [email protected]; [email protected]; Ananyev, Konstantin; Lu,
> Wenzhuo; Zhang, Helin; Wu, Jingjing; [email protected];
> [email protected]
> Cc: Yigit, Ferruh; Richardson, Bruce
> Subject: [PATCH 3/6] net/e1000: implement descriptor status API (igb)
>
> Signed-off-by: Olivier Matz <[email protected]>
> +
> +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.
> + status = &txq->tx_ring[desc].wb.status;
> + if (*status & rte_cpu_to_le_32(E1000_TXD_STAT_DD))
> + return RTE_ETH_TX_DESC_DONE;
> +
> + return RTE_ETH_TX_DESC_FULL;
> +}
> +
> void
> igb_dev_clear_queues(struct rte_eth_dev *dev) {
> --
> 2.8.1