From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=DU9UMo+N4mvVjo47gA+Gk5yRVZY1EnRlgPG/aniJXjdSmpo7+WmiPrcoUazII8WoVv rivh827HpCoCu7zavHS32AC+f62+yeNBTd9MUZ1OTyMjHuviTROwS46RsvjBgkuKy9o4 sW4R02cSWzGlL/9XrHG05nglYfqpHEtHMqh2ov/qokaX6XtHEEKwxPo/+x5OkNFoPT7t 54hq/zqR/v9ng9/YSxjFLNUDmYWriXPYe/8g4lv4TjTqLU1zl/sfSZo1yuUguMwYrp/r Vj1JwRX+osqw+MU4DJYLxQG+3vOtjd+gTu0eIMgTVe3ssVQiQdr+q+stwEzCoEUl3dgg 1kag== X-Gm-Message-State: AN3rC/4ujNGa3B6Aztuz7A2Ditw6pDRLk7MKof7W9Za+ZhjUYA2RaoiVto7zZgQEZaxNPw== 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-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: 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