All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Xiao Wang <xiao.w.wang@intel.com>
Cc: yuanhan.liu@linux.intel.com, dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] net/virtio: fix queue notify
Date: Wed, 12 Apr 2017 14:39:25 -0700	[thread overview]
Message-ID: <20170412143925.0916e609@xeon-e3> (raw)
In-Reply-To: <1491907468-68207-1-git-send-email-xiao.w.wang@intel.com>

On Tue, 11 Apr 2017 03:44:28 -0700
Xiao Wang <xiao.w.wang@intel.com> 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 <xiao.w.wang@intel.com>
> ---
>  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 <stephen@networkplumber.org>

  reply	other threads:[~2017-04-12 21:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-11 10:44 [PATCH] net/virtio: fix queue notify Xiao Wang
2017-04-12 21:39 ` Stephen Hemminger [this message]
2017-04-13  1:39   ` Yuanhan Liu

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=20170412143925.0916e609@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=xiao.w.wang@intel.com \
    --cc=yuanhan.liu@linux.intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.