Thread (149 messages) 149 messages, 6 authors, 2021-01-18

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

From: David Marchand <hidden>
Date: 2021-01-06 16:19:29

On Sun, Dec 20, 2020 at 10:15 PM Maxime Coquelin
[off-list ref] wrote:
This patch finalizes the bus isolation part of this
refactoring.

Signed-off-by: Maxime Coquelin <redacted>
---
[snip]
quoted hunk ↗ jump to hunk
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 <redacted>



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

-- 
David Marchand
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help