* [dpdk-dev] [PATCH] virtio: fix wrong queue index for VIRTIO_PCI_QUEUE_SEL
@ 2015-12-08 3:05 Yuanhan Liu
2015-12-09 20:09 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Yuanhan Liu @ 2015-12-08 3:05 UTC (permalink / raw)
To: dev
We should provide VIRTIO_PCI_QUEUE_SEL with vq->vq_queue_idx,
but not vq->queue_id.
vq->queue_id is the queue id from rte_eth_rx/tx_queue_setup(),
which always starts from 0 no matter which queue it is. However,
for virtio, even number is for RX queue, and odd number is for
TX queue.
Fixes: 5382b188fb8a ("virtio: add queue release")
Cc: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
drivers/net/virtio/virtio_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 16ff827..d928339 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -273,7 +273,7 @@ virtio_dev_queue_release(struct virtqueue *vq) {
if (vq) {
hw = vq->hw;
/* Select and deactivate the queue */
- VIRTIO_WRITE_REG_2(hw, VIRTIO_PCI_QUEUE_SEL, vq->queue_id);
+ VIRTIO_WRITE_REG_2(hw, VIRTIO_PCI_QUEUE_SEL, vq->vq_queue_index);
VIRTIO_WRITE_REG_4(hw, VIRTIO_PCI_QUEUE_PFN, 0);
rte_free(vq->sw_ring);
--
1.9.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] virtio: fix wrong queue index for VIRTIO_PCI_QUEUE_SEL
2015-12-08 3:05 [dpdk-dev] [PATCH] virtio: fix wrong queue index for VIRTIO_PCI_QUEUE_SEL Yuanhan Liu
@ 2015-12-09 20:09 ` Thomas Monjalon
2015-12-10 1:33 ` Yuanhan Liu
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2015-12-09 20:09 UTC (permalink / raw)
To: Yuanhan Liu; +Cc: dev
2015-12-08 11:05, Yuanhan Liu:
> We should provide VIRTIO_PCI_QUEUE_SEL with vq->vq_queue_idx,
> but not vq->queue_id.
>
> vq->queue_id is the queue id from rte_eth_rx/tx_queue_setup(),
> which always starts from 0 no matter which queue it is. However,
> for virtio, even number is for RX queue, and odd number is for
> TX queue.
>
> Fixes: 5382b188fb8a ("virtio: add queue release")
>
> Cc: Bernard Iremonger <bernard.iremonger@intel.com>
Bernard was not CC'ed.
> Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] virtio: fix wrong queue index for VIRTIO_PCI_QUEUE_SEL
2015-12-09 20:09 ` Thomas Monjalon
@ 2015-12-10 1:33 ` Yuanhan Liu
0 siblings, 0 replies; 3+ messages in thread
From: Yuanhan Liu @ 2015-12-10 1:33 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Wed, Dec 09, 2015 at 09:09:27PM +0100, Thomas Monjalon wrote:
> 2015-12-08 11:05, Yuanhan Liu:
> > We should provide VIRTIO_PCI_QUEUE_SEL with vq->vq_queue_idx,
> > but not vq->queue_id.
> >
> > vq->queue_id is the queue id from rte_eth_rx/tx_queue_setup(),
> > which always starts from 0 no matter which queue it is. However,
> > for virtio, even number is for RX queue, and odd number is for
> > TX queue.
> >
> > Fixes: 5382b188fb8a ("virtio: add queue release")
> >
> > Cc: Bernard Iremonger <bernard.iremonger@intel.com>
>
> Bernard was not CC'ed.
Weird, it was indeed in the CC list (in the patch I sent) on my
email client.
--yliu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-12-10 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08 3:05 [dpdk-dev] [PATCH] virtio: fix wrong queue index for VIRTIO_PCI_QUEUE_SEL Yuanhan Liu
2015-12-09 20:09 ` Thomas Monjalon
2015-12-10 1:33 ` Yuanhan Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).