Re: [dpdk-dev] [PATCH 22/40] net/virtio: remove last PCI refs in non-PCI code
From: Maxime Coquelin <hidden>
Date: 2021-01-15 11:10:55
On 1/6/21 5:18 PM, David Marchand wrote:
On Sun, Dec 20, 2020 at 10:15 PM Maxime Coquelin [off-list ref] wrote:quoted
This patch finalizes the bus isolation part of this refactoring. Signed-off-by: Maxime Coquelin <redacted> ---[snip]quoted
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.2I noticed: drivers/net/virtio/virtqueue.h: uint16_t vq_queue_index; /**< PCI queue index */ Worth cleaning while at it?
I removed the comment, it is self-explanatory. Thanks, Maxime
Reviewed-by: David Marchand <redacted> Same comment as Chenbo, this is a great cleanup so far. I'll look at the rest of the series probably tomorrow.