From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id CC4DA2C27 for ; Wed, 12 Apr 2017 23:39:28 +0200 (CEST) Received: by mail-pf0-f180.google.com with SMTP id o126so19362332pfb.3 for ; Wed, 12 Apr 2017 14:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yzg7/0VM0kUFnwT4drD9+0JSr/TYBRIcKM+AWVMJJc4=; b=LeXao2G37SLZQZ2SmMLsOcqedLAMW+rhyE+mvUEwL+GanT8dciIJCAXIcvsjerjZuS GikWgp9M7k0cqJsj2Xm76DxkW6mU0GZ+kYIHJX6lkkMVM11VZGoZWA9Lgrr9KmK1amWH uiDJrprr9cRWDuTWPOyi/FvbYyLW4GNU/obbysJBfDFMiio7CjL+uc06YTpOba/bD3/8 DWymeSEWXiYkdo2DAM/XZT52WtGSVQa5DU2lhLxSA3juyzf/6TizF+pVhYj/5F/VOvn0 g0w3Vj8ryJxgd5D7quqDmXXwwkFF//tV6PrUYZGNo4ikqayCqt0WhzBgtiDcsAuCQHgD /3rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yzg7/0VM0kUFnwT4drD9+0JSr/TYBRIcKM+AWVMJJc4=; b=FJg0GLLZplYaY89bNvbSmhEqEkl10NqXQwXAPgfHHaRpxCRqYJpSqyCSxkUXC5DutN QWD/YTjZVpEqJRB7M8+zKzk1tS35ASxEgrI/w3+WkuegRLJKpuJVM89uxe5NnEs2Qg9n JlLNd0nHeafOvOtvB+c0pomSCdHIScjr2M9/tvTquRHojrV3rw7C1dQI4b4jIftEwq+T /92LWRd5ZuZjyoYk5TrFsSXLUHE5/wOqo3qdF9Cq8KfXmL/rNQNgMt0Cl4QTd21GxPok xTDOJ/n1KBjW2oOSWvLhtlKg72QDtgbMT1nOgkJkEe3mhQIo8lrxnDbOAKQG430u+urI OxBg== X-Gm-Message-State: AN3rC/5Uro7O5Bhn+Pv93SLgLIstvBss6qv/M32LkpmY7XABGIp8wKpvlissMm9BY0un5A== X-Received: by 10.98.153.76 with SMTP id d73mr24583512pfe.223.1492033167720; Wed, 12 Apr 2017 14:39:27 -0700 (PDT) Received: from xeon-e3 (76-14-206-252.or.wavecable.com. [76.14.206.252]) by smtp.gmail.com with ESMTPSA id s17sm38393750pgo.27.2017.04.12.14.39.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Apr 2017 14:39:27 -0700 (PDT) Date: Wed, 12 Apr 2017 14:39:25 -0700 From: Stephen Hemminger To: Xiao Wang Cc: yuanhan.liu@linux.intel.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20170412143925.0916e609@xeon-e3> In-Reply-To: <1491907468-68207-1-git-send-email-xiao.w.wang@intel.com> 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 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/virtio: fix queue notify X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 21:39:29 -0000 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