From: Sasha Levin <levinsasha928@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: mst@redhat.com, mashirle@us.ibm.com, krkumar2@in.ibm.com,
habanero@linux.vnet.ibm.com, rusty@rustcorp.com.au,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, edumazet@google.com,
tahm@linux.vnet.ibm.com, jwhan@filewood.snu.ac.kr,
davem@davemloft.net, akong@redhat.com, kvm@vger.kernel.org,
sri@us.ibm.com
Subject: Re: [net-next RFC V5 2/5] virtio_ring: move queue_index to vring_virtqueue
Date: Thu, 05 Jul 2012 13:40:54 +0200 [thread overview]
Message-ID: <1341488454.18786.15.camel@lappy> (raw)
In-Reply-To: <1341484194-8108-3-git-send-email-jasowang@redhat.com>
On Thu, 2012-07-05 at 18:29 +0800, Jason Wang wrote:
> Instead of storing the queue index in virtio infos, this patch moves them to
> vring_virtqueue and introduces helpers to set and get the value. This would
> simplify the management and tracing.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
This patch actually fails to compile:
drivers/virtio/virtio_mmio.c: In function ‘vm_notify’:
drivers/virtio/virtio_mmio.c:229:13: error: ‘struct virtio_mmio_vq_info’ has no member named ‘queue_index’
drivers/virtio/virtio_mmio.c: In function ‘vm_del_vq’:
drivers/virtio/virtio_mmio.c:278:13: error: ‘struct virtio_mmio_vq_info’ has no member named ‘queue_index’
make[2]: *** [drivers/virtio/virtio_mmio.o] Error 1
It probably misses the following hunks:
diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c
index f5432b6..12b6180 100644
--- a/drivers/virtio/virtio_mmio.c
+++ b/drivers/virtio/virtio_mmio.c
@@ -222,11 +222,10 @@ static void vm_reset(struct virtio_device *vdev)
static void vm_notify(struct virtqueue *vq)
{
struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev);
- struct virtio_mmio_vq_info *info = vq->priv;
/* We write the queue's selector into the notification register to
* signal the other end */
- writel(info->queue_index, vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY);
+ writel(virtqueue_get_queue_index(vq), vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY);
}
/* Notify all virtqueues on an interrupt. */
@@ -275,7 +274,7 @@ static void vm_del_vq(struct virtqueue *vq)
vring_del_virtqueue(vq);
/* Select and deactivate the queue */
- writel(info->queue_index, vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
+ writel(virtqueue_get_queue_index(vq), vm_dev->base + VIRTIO_MMIO_QUEUE_SEL);
writel(0, vm_dev->base + VIRTIO_MMIO_QUEUE_PFN);
size = PAGE_ALIGN(vring_size(info->num, VIRTIO_MMIO_VRING_ALIGN));
next prev parent reply other threads:[~2012-07-05 11:40 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-05 10:29 [net-next RFC V5 0/5] Multiqueue virtio-net Jason Wang
2012-07-05 10:29 ` [net-next RFC V5 1/5] virtio_net: Introduce VIRTIO_NET_F_MULTIQUEUE Jason Wang
2012-07-05 10:29 ` [net-next RFC V5 2/5] virtio_ring: move queue_index to vring_virtqueue Jason Wang
2012-07-05 11:40 ` Sasha Levin [this message]
2012-07-06 3:17 ` Jason Wang
2012-07-26 8:20 ` Paolo Bonzini
2012-07-30 3:30 ` Jason Wang
2012-07-05 10:29 ` [net-next RFC V5 3/5] virtio: intorduce an API to set affinity for a virtqueue Jason Wang
2012-07-27 14:38 ` Paolo Bonzini
2012-07-29 20:40 ` Michael S. Tsirkin
2012-07-30 6:27 ` Paolo Bonzini
2012-08-09 15:14 ` Paolo Bonzini
2012-08-09 15:13 ` Paolo Bonzini
2012-08-09 15:35 ` Avi Kivity
2012-07-05 10:29 ` [net-next RFC V5 4/5] virtio_net: multiqueue support Jason Wang
2012-07-05 20:02 ` Amos Kong
2012-07-06 7:45 ` Jason Wang
2012-07-20 13:40 ` Michael S. Tsirkin
2012-07-21 12:02 ` Sasha Levin
2012-07-23 5:54 ` Jason Wang
2012-07-23 9:28 ` Sasha Levin
2012-07-30 3:29 ` Jason Wang
2012-07-29 9:44 ` Michael S. Tsirkin
2012-07-30 3:26 ` Jason Wang
2012-07-30 13:00 ` Sasha Levin
2012-07-23 5:48 ` Jason Wang
2012-07-29 9:50 ` Michael S. Tsirkin
2012-07-30 5:15 ` Jason Wang
2012-07-05 10:29 ` [net-next RFC V5 5/5] virtio_net: support negotiating the number of queues through ctrl vq Jason Wang
2012-07-05 12:51 ` Sasha Levin
2012-07-05 20:07 ` Amos Kong
2012-07-06 7:46 ` Jason Wang
2012-07-06 3:20 ` Jason Wang
2012-07-06 6:38 ` Stephen Hemminger
2012-07-06 9:26 ` Jason Wang
2012-07-06 8:10 ` Sasha Levin
2012-07-09 20:13 ` Ben Hutchings
2012-07-20 12:33 ` Michael S. Tsirkin
2012-07-23 5:32 ` Jason Wang
2012-07-05 17:45 ` [net-next RFC V5 0/5] Multiqueue virtio-net Rick Jones
2012-07-06 7:42 ` Jason Wang
2012-07-06 16:23 ` Rick Jones
2012-07-09 3:23 ` Jason Wang
2012-07-09 16:46 ` Rick Jones
2012-07-08 8:19 ` Ronen Hod
2012-07-09 5:35 ` Jason Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341488454.18786.15.camel@lappy \
--to=levinsasha928@gmail.com \
--cc=akong@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=habanero@linux.vnet.ibm.com \
--cc=jasowang@redhat.com \
--cc=jwhan@filewood.snu.ac.kr \
--cc=krkumar2@in.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mashirle@us.ibm.com \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=sri@us.ibm.com \
--cc=tahm@linux.vnet.ibm.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).