[PATCH v1 05/21] net/virtio: remove unused fields in Tx queue struct

Xia, Chenbo chenbo.xia at intel.com
Mon Jan 30 08:51:55 CET 2023


> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin at redhat.com>
> Sent: Wednesday, November 30, 2022 11:56 PM
> To: dev at dpdk.org; Xia, Chenbo <chenbo.xia at intel.com>;
> david.marchand at redhat.com; eperezma at redhat.com
> Cc: Maxime Coquelin <maxime.coquelin at redhat.com>
> Subject: [PATCH v1 05/21] net/virtio: remove unused fields in Tx queue
> struct
> 
> The port and queue IDs are not used in virtnet_tx struct,
> this patch removes them.
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---
>  drivers/net/virtio/virtio_ethdev.c | 1 -
>  drivers/net/virtio/virtio_rxtx.c   | 1 -
>  drivers/net/virtio/virtio_rxtx.h   | 3 ---
>  3 files changed, 5 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_ethdev.c
> b/drivers/net/virtio/virtio_ethdev.c
> index 1c68e5a283..a581fae408 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -466,7 +466,6 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t
> queue_idx)
>  		rxvq->fake_mbuf = fake_mbuf;
>  	} else if (queue_type == VTNET_TQ) {
>  		txvq = &vq->txq;
> -		txvq->port_id = dev->data->port_id;
>  		txvq->mz = mz;
>  	} else if (queue_type == VTNET_CQ) {
>  		cvq = &vq->cq;
> diff --git a/drivers/net/virtio/virtio_rxtx.c
> b/drivers/net/virtio/virtio_rxtx.c
> index 45c04aa3f8..304403d46c 100644
> --- a/drivers/net/virtio/virtio_rxtx.c
> +++ b/drivers/net/virtio/virtio_rxtx.c
> @@ -831,7 +831,6 @@ virtio_dev_tx_queue_setup(struct rte_eth_dev *dev,
>  	vq->vq_free_cnt = RTE_MIN(vq->vq_free_cnt, nb_desc);
> 
>  	txvq = &vq->txq;
> -	txvq->queue_id = queue_idx;
> 
>  	tx_free_thresh = tx_conf->tx_free_thresh;
>  	if (tx_free_thresh == 0)
> diff --git a/drivers/net/virtio/virtio_rxtx.h
> b/drivers/net/virtio/virtio_rxtx.h
> index 97de9eb0a3..9bbcf32f66 100644
> --- a/drivers/net/virtio/virtio_rxtx.h
> +++ b/drivers/net/virtio/virtio_rxtx.h
> @@ -35,9 +35,6 @@ struct virtnet_tx {
>  	const struct rte_memzone *hdr_mz; /**< memzone to populate hdr. */
>  	rte_iova_t hdr_mem;               /**< hdr for each xmit packet */
> 
> -	uint16_t    queue_id;             /**< DPDK queue index. */
> -	uint16_t    port_id;              /**< Device port identifier. */
> -
>  	struct virtnet_stats stats;       /* Statistics */
> 
>  	const struct rte_memzone *mz;    /**< mem zone to populate TX ring.
> */
> --
> 2.38.1

Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>


More information about the dev mailing list