From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id D90C81B158 for ; Thu, 11 Oct 2018 07:22:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2018 22:21:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,367,1534834800"; d="scan'208";a="77139252" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 10 Oct 2018 22:21:55 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 10 Oct 2018 22:21:54 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 10 Oct 2018 22:21:54 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.111]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.183]) with mapi id 14.03.0319.002; Thu, 11 Oct 2018 13:21:49 +0800 From: "Zhang, Qi Z" To: "Wang, Xiao W" , "Ye, Xiaolong" , "dev@dpdk.org" Thread-Topic: [PATCH] net/ifc: invoke ifcvf HW init function in probe Thread-Index: AQHUYGNufS4df28pVkWr0Dgv/X1NnKUY8gAAgACRuwA= Date: Thu, 11 Oct 2018 05:21:48 +0000 Message-ID: <039ED4275CED7440929022BC67E70611532BFEF3@SHSMSX103.ccr.corp.intel.com> References: <20181010132235.70579-1-xiaolong.ye@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWY4ZTQ5YzEtMWU4MS00YWMwLWFhM2ItODZkYjNiYTZlYWQ0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVjBNUG4yck42dk1NZXgzckNucEJHOWJlcnF3NFZ5amQwZHFEbHpndnlMc3Y3NUNqRmxhV3lWZXhhTU9ZOFFITiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ifc: invoke ifcvf HW init function in probe 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: Thu, 11 Oct 2018 05:22:02 -0000 > -----Original Message----- > From: Wang, Xiao W > Sent: Wednesday, October 10, 2018 9:40 PM > To: Ye, Xiaolong ; dev@dpdk.org; Zhang, Qi Z > > Subject: RE: [PATCH] net/ifc: invoke ifcvf HW init function in probe >=20 > Hi, >=20 > > -----Original Message----- > > From: Ye, Xiaolong > > Sent: Wednesday, October 10, 2018 9:23 PM > > To: dev@dpdk.org; Zhang, Qi Z > > Cc: Wang, Xiao W ; Ye, Xiaolong > > > > Subject: [PATCH] net/ifc: invoke ifcvf HW init function in probe > > > > As ifcvf_init_hw is independent with ifcvf_vfio_setup, it's better to > > invoke it directly in probe func. > > > > Signed-off-by: Xiaolong Ye > > --- > > drivers/net/ifc/ifcvf_vdpa.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/ifc/ifcvf_vdpa.c > > b/drivers/net/ifc/ifcvf_vdpa.c index 9d5594678..adc8f4166 100644 > > --- a/drivers/net/ifc/ifcvf_vdpa.c > > +++ b/drivers/net/ifc/ifcvf_vdpa.c > > @@ -112,7 +112,6 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) > > struct rte_pci_device *dev =3D internal->pdev; > > char devname[RTE_DEV_NAME_MAX_LEN] =3D {0}; > > int iommu_group_num; > > - int ret =3D 0; > > int i; > > > > internal->vfio_dev_fd =3D -1; > > @@ -146,9 +145,8 @@ ifcvf_vfio_setup(struct ifcvf_internal *internal) > > internal->hw.mem_resource[i].len =3D > > internal->pdev->mem_resource[i].len; > > } > > - ret =3D ifcvf_init_hw(&internal->hw, internal->pdev); > > > > - return ret; > > + return 0; > > > > err: > > rte_vfio_container_destroy(internal->vfio_container_fd); > > @@ -758,6 +756,9 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv > > __rte_unused, > > if (ifcvf_vfio_setup(internal) < 0) > > return -1; > > > > + if (ifcvf_init_hw(&internal->hw, internal->pdev) < 0) > > + return -1; > > + > > internal->max_queues =3D IFCVF_MAX_QUEUES; > > features =3D ifcvf_get_features(&internal->hw); > > internal->features =3D (features & > > -- > > 2.17.1 >=20 > Acked-by: Xiao Wang Applied to dpdk-next-net-intel. Thanks Qi >=20 > BRs, > Xiao