From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 27E0EA00E6 for ; Mon, 2 Sep 2019 08:20:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 07E721D165; Mon, 2 Sep 2019 08:20:09 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 928AF1C200; Mon, 2 Sep 2019 08:20:07 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Sep 2019 23:20:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,457,1559545200"; d="scan'208";a="333479565" Received: from dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.71]) by orsmga004.jf.intel.com with ESMTP; 01 Sep 2019 23:20:05 -0700 Date: Mon, 2 Sep 2019 14:17:38 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: zhihong.wang@intel.com, amorenoz@redhat.com, xiao.w.wang@intel.com, dev@dpdk.org, jfreimann@redhat.com, stable@dpdk.org Message-ID: <20190902061738.GA12932@___> References: <20190829080000.20806-1-maxime.coquelin@redhat.com> <20190829080000.20806-6-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190829080000.20806-6-maxime.coquelin@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH 05/15] net/virtio: save notify bar ID in virtio HW struct 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Aug 29, 2019 at 09:59:50AM +0200, Maxime Coquelin wrote: > SAving the notify bar ID in the virtio HW struct will be s/SAving/Saving/ > used by the virtio-vdpa driver in its .get_notify_area() > callback. > > Signed-off-by: Maxime Coquelin > --- > drivers/net/virtio/virtio_pci.c | 6 ++++-- > drivers/net/virtio/virtio_pci.h | 1 + > 2 files changed, 5 insertions(+), 2 deletions(-) Reviewed-by: Tiwei Bie > > diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c > index 4468e89cb..762847d70 100644 > --- a/drivers/net/virtio/virtio_pci.c > +++ b/drivers/net/virtio/virtio_pci.c > @@ -617,12 +617,14 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw) > ret = rte_pci_read_config(dev, > &hw->notify_off_multiplier, > 4, pos + sizeof(cap)); > - if (ret != 4) > + if (ret != 4) { > PMD_INIT_LOG(DEBUG, > "failed to read notify_off_multiplier, ret %d", > ret); > - else > + } else { > hw->notify_base = get_cfg_addr(dev, &cap); > + hw->notify_region = cap.bar; > + } > break; > case VIRTIO_PCI_CAP_DEVICE_CFG: > hw->dev_cfg = get_cfg_addr(dev, &cap); > diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h > index 56f89a454..afdcc906f 100644 > --- a/drivers/net/virtio/virtio_pci.h > +++ b/drivers/net/virtio/virtio_pci.h > @@ -256,6 +256,7 @@ struct virtio_hw { > uint32_t notify_off_multiplier; > uint8_t *isr; > uint16_t *notify_base; > + uint8_t notify_region; > struct virtio_pci_common_cfg *common_cfg; > struct virtio_net_config *dev_cfg; > void *virtio_user_dev; > -- > 2.21.0 >