From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] net/virtio: fix queue notify Date: Wed, 12 Apr 2017 14:39:25 -0700 Message-ID: <20170412143925.0916e609@xeon-e3> References: <1491907468-68207-1-git-send-email-xiao.w.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: yuanhan.liu@linux.intel.com, dev@dpdk.org, stable@dpdk.org To: Xiao Wang Return-path: Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by dpdk.org (Postfix) with ESMTP id C93C5F94 for ; Wed, 12 Apr 2017 23:39:28 +0200 (CEST) Received: by mail-pf0-f173.google.com with SMTP id s16so19424266pfs.0 for ; Wed, 12 Apr 2017 14:39:28 -0700 (PDT) In-Reply-To: <1491907468-68207-1-git-send-email-xiao.w.wang@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 11 Apr 2017 03:44:28 -0700 Xiao Wang wrote: > According to spec, we should write virtqueue index into the notify > address, rather than 1. Besides, some HW backend may rely on the data > written to identify which queue need to serve. > > Fixes: 6ba1f63b5ab0 ("virtio: support specification 1.0") > Cc: stable@dpdk.org > > Signed-off-by: Xiao Wang > --- > drivers/net/virtio/virtio_pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c > index ce9a9d3..b767c03 100644 > --- a/drivers/net/virtio/virtio_pci.c > +++ b/drivers/net/virtio/virtio_pci.c > @@ -504,7 +504,7 @@ > static void > modern_notify_queue(struct virtio_hw *hw __rte_unused, struct virtqueue *vq) > { > - rte_write16(1, vq->notify_addr); > + rte_write16(vq->vq_queue_index, vq->notify_addr); > } Yes, this looks correct. It is what Linux and FreeBSD drivers do. Reviewed-by: Stephen Hemminger