From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5FB32271 for ; Wed, 23 Jan 2019 14:29:41 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jan 2019 05:29:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,511,1539673200"; d="scan'208";a="138058679" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 23 Jan 2019 05:29:40 -0800 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 23 Jan 2019 05:29:40 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.196]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.224]) with mapi id 14.03.0415.000; Wed, 23 Jan 2019 21:29:38 +0800 From: "Wang, Xiao W" To: "maxime.coquelin@redhat.com" CC: "dev@dpdk.org" , "Bie, Tiwei" , "Ye, Xiaolong" Thread-Topic: [PATCH 1/2] vhost: introduce API to get vDPA device number Thread-Index: AQHUsxzhDynGstKIxEahSBr6nCjceaW82NwA Date: Wed, 23 Jan 2019 13:29:37 +0000 Message-ID: References: <20190123125726.162673-1-xiao.w.wang@intel.com> In-Reply-To: <20190123125726.162673-1-xiao.w.wang@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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzdiODQyZTYtYWUwZC00OWEzLTkyNTEtNmEwMGE0NzM1YWFhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoienJ0SGtWWHorZkZMdURzQmFCdklZZkowakZTbGV0NjFpdDZBU3FzYXduSElFZGxrSUZiT3o0dmRtd0lKeVlQdiJ9 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 1/2] vhost: introduce API to get vDPA device number 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, 23 Jan 2019 13:29:41 -0000 Please ignore this email I sent by mistake. BRs, Xiao > -----Original Message----- > From: Wang, Xiao W > Sent: Wednesday, January 23, 2019 8:57 PM > To: maxime.coquelin@redhat.com > Cc: dev@dpdk.org; Bie, Tiwei ; Ye, Xiaolong > > Subject: [PATCH 1/2] vhost: introduce API to get vDPA device number >=20 > From: Xiaolong Ye >=20 > It's used to get number of available registered vDPA devices. >=20 > Signed-off-by: Xiaolong Ye > Acked-by: Xiao Wang > Reviewed-by: Maxime Coquelin > --- > lib/librte_vhost/rte_vdpa.h | 3 +++ > lib/librte_vhost/rte_vhost_version.map | 1 + > lib/librte_vhost/vdpa.c | 6 ++++++ > 3 files changed, 10 insertions(+) >=20 > diff --git a/lib/librte_vhost/rte_vdpa.h b/lib/librte_vhost/rte_vdpa.h > index 90465ca26..b8223e337 100644 > --- a/lib/librte_vhost/rte_vdpa.h > +++ b/lib/librte_vhost/rte_vdpa.h > @@ -84,4 +84,7 @@ rte_vdpa_find_device_id(struct rte_vdpa_dev_addr > *addr); > struct rte_vdpa_device * __rte_experimental > rte_vdpa_get_device(int did); >=20 > +/* Get current available vdpa device number */ > +int __rte_experimental > +rte_vdpa_get_device_num(void); > #endif /* _RTE_VDPA_H_ */ > diff --git a/lib/librte_vhost/rte_vhost_version.map > b/lib/librte_vhost/rte_vhost_version.map > index da220dd02..ae39b6e21 100644 > --- a/lib/librte_vhost/rte_vhost_version.map > +++ b/lib/librte_vhost/rte_vhost_version.map > @@ -67,6 +67,7 @@ EXPERIMENTAL { > rte_vdpa_unregister_device; > rte_vdpa_find_device_id; > rte_vdpa_get_device; > + rte_vdpa_get_device_num; > rte_vhost_driver_attach_vdpa_device; > rte_vhost_driver_detach_vdpa_device; > rte_vhost_driver_get_vdpa_device_id; > diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c > index c82fd4370..c2c5dff1d 100644 > --- a/lib/librte_vhost/vdpa.c > +++ b/lib/librte_vhost/vdpa.c > @@ -113,3 +113,9 @@ rte_vdpa_get_device(int did) >=20 > return vdpa_devices[did]; > } > + > +int > +rte_vdpa_get_device_num(void) > +{ > + return vdpa_device_num; > +} > -- > 2.15.1