[dpdk-dev] [PATCH v4 56/58] net/txgbe: add Rx and Tx descriptor status

Ferruh Yigit ferruh.yigit at intel.com
Mon Oct 26 15:54:56 CET 2020


On 10/19/2020 9:54 AM, Jiawen Wu wrote:
> Supports check the status of Rx and Tx descriptors.
> 
> Signed-off-by: Jiawen Wu <jiawenwu at trustnetic.com>

<...>

> @@ -480,6 +480,9 @@ eth_txgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
>   	PMD_INIT_FUNC_TRACE();
>   
>   	eth_dev->dev_ops = &txgbe_eth_dev_ops;
> +	eth_dev->rx_queue_count       = txgbe_dev_rx_queue_count;
> +	eth_dev->rx_descriptor_status = txgbe_dev_rx_descriptor_status;
> +	eth_dev->tx_descriptor_status = txgbe_dev_tx_descriptor_status;
>   	eth_dev->rx_pkt_burst = &txgbe_recv_pkts;
>   	eth_dev->tx_pkt_burst = &txgbe_xmit_pkts;
>   	eth_dev->tx_pkt_prepare = &txgbe_prep_pkts;
> @@ -4250,6 +4253,7 @@ static const struct eth_dev_ops txgbe_eth_dev_ops = {
>   	.timesync_adjust_time       = txgbe_timesync_adjust_time,
>   	.timesync_read_time         = txgbe_timesync_read_time,
>   	.timesync_write_time        = txgbe_timesync_write_time,
> +	.tx_done_cleanup            = txgbe_dev_tx_done_cleanup,

The '.tx_done_cleanup' is also added in this patch, can you please separate it 
to another patch?

<...>

> +int
> +txgbe_dev_rx_descriptor_done(void *rx_queue, uint16_t offset)
> +{
> +	volatile struct txgbe_rx_desc *rxdp;
> +	struct txgbe_rx_queue *rxq = rx_queue;
> +	uint32_t desc;
> +
> +	if (unlikely(offset >= rxq->nb_rx_desc))
> +		return 0;
> +	desc = rxq->rx_tail + offset;
> +	if (desc >= rxq->nb_rx_desc)
> +		desc -= rxq->nb_rx_desc;
> +
> +	rxdp = &rxq->rx_ring[desc];
> +	return !!(rxdp->qw1.lo.status &
> +			rte_cpu_to_le_32(TXGBE_RXD_STAT_DD));
> +}

'descriptor_done' dev_ops is removed from this patch in this version, but the 
clutter seems remained, like above function and relevant function declerations 
etc.., can you please clean them all?


dropping this patch form the patchset, because of the issues above. Can you 
please send new version as an icremental patch?


More information about the dev mailing list