From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id F251E1B155 for ; Thu, 11 Oct 2018 06:44:12 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Oct 2018 21:44:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,367,1534834800"; d="scan'208";a="94187469" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 10 Oct 2018 21:40:39 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 10 Oct 2018 21:40:39 -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 21:40:39 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.60]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.183]) with mapi id 14.03.0319.002; Thu, 11 Oct 2018 12:39:51 +0800 From: "Wang, Xiao W" To: "Ye, Xiaolong" , "dev@dpdk.org" , "Zhang, Qi Z" Thread-Topic: [PATCH] net/ifc: invoke ifcvf HW init function in probe Thread-Index: AQHUYGNu8quxEo99k022peeGx+VDLKUZd3bw Date: Thu, 11 Oct 2018 04:39:50 +0000 Message-ID: References: <20181010132235.70579-1-xiaolong.ye@intel.com> In-Reply-To: <20181010132235.70579-1-xiaolong.ye@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWY4ZTQ5YzEtMWU4MS00YWMwLWFhM2ItODZkYjNiYTZlYWQ0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVjBNUG4yck42dk1NZXgzckNucEJHOWJlcnF3NFZ5amQwZHFEbHpndnlMc3Y3NUNqRmxhV3lWZXhhTU9ZOFFITiJ9 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 04:44:13 -0000 Hi, > -----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 >=20 > As ifcvf_init_hw is independent with ifcvf_vfio_setup, it's better to > invoke it directly in probe func. >=20 > Signed-off-by: Xiaolong Ye > --- > drivers/net/ifc/ifcvf_vdpa.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) >=20 > 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; >=20 > 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); >=20 > - return ret; > + return 0; >=20 > 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; >=20 > + 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 Acked-by: Xiao Wang BRs, Xiao