From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 39A2C2BD1; Tue, 11 Apr 2017 03:54:59 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 10 Apr 2017 18:54:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,184,1488873600"; d="scan'208";a="75990624" Received: from dpdk-wangxiao.sh.intel.com ([10.239.129.106]) by orsmga004.jf.intel.com with ESMTP; 10 Apr 2017 18:54:57 -0700 From: Xiao Wang To: yuanhan.liu@linux.intel.com Cc: dev@dpdk.org, Xiao Wang , stable@dpdk.org Date: Tue, 11 Apr 2017 03:44:28 -0700 Message-Id: <1491907468-68207-1-git-send-email-xiao.w.wang@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/virtio: fix queue notify X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 01:55:00 -0000 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); } const struct virtio_pci_ops modern_ops = { -- 1.8.3.1