[dpdk-dev] [PATCH 22/40] net/virtio: remove last PCI refs in non-PCI code

David Marchand david.marchand at redhat.com
Wed Jan 6 17:18:50 CET 2021


On Sun, Dec 20, 2020 at 10:15 PM Maxime Coquelin
<maxime.coquelin at redhat.com> wrote:
>
> This patch finalizes the bus isolation part of this
> refactoring.
>
> Signed-off-by: Maxime Coquelin <maxime.coquelin at redhat.com>
> ---

[snip]

> diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
> index 6c1df6f8e5..9274c48080 100644
> --- a/drivers/net/virtio/virtqueue.h
> +++ b/drivers/net/virtio/virtqueue.h
> @@ -449,11 +449,11 @@ virtqueue_full(const struct virtqueue *vq)
>  }
>
>  static inline int
> -virtio_get_queue_type(struct virtio_hw *hw, uint16_t vtpci_queue_idx)
> +virtio_get_queue_type(struct virtio_hw *hw, uint16_t vq_idx)
>  {
> -       if (vtpci_queue_idx == hw->max_queue_pairs * 2)
> +       if (vq_idx == hw->max_queue_pairs * 2)
>                 return VTNET_CQ;
> -       else if (vtpci_queue_idx % 2 == 0)
> +       else if (vq_idx % 2 == 0)
>                 return VTNET_RQ;
>         else
>                 return VTNET_TQ;
> --
> 2.29.2
>

I noticed:
drivers/net/virtio/virtqueue.h: uint16_t  vq_queue_index;   /**< PCI
queue index */

Worth cleaning while at it?

Reviewed-by: David Marchand <david.marchand at redhat.com>



Same comment as Chenbo, this is a great cleanup so far.
I'll look at the rest of the series probably tomorrow.

-- 
David Marchand



More information about the dev mailing list