From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 7E1C237B0 for ; Wed, 19 Sep 2018 16:51:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2018 07:51:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,394,1531810800"; d="scan'208";a="91468075" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga001.fm.intel.com with ESMTP; 19 Sep 2018 07:46:24 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 19 Sep 2018 07:46:20 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 19 Sep 2018 07:46:20 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.39]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Wed, 19 Sep 2018 22:46:18 +0800 From: "Wang, Xiao W" To: "Ye, Xiaolong" , "dev@dpdk.org" , Maxime Coquelin , "Bie, Tiwei" , "Wang, Zhihong" CC: Rami Rosen , "Wang, Haiyue" Thread-Topic: [PATCH v2 1/2] vhost: introduce API to get vDPA device number Thread-Index: AQHUS1OztUvv6blOJUGbN3jHkiw05qT3rk3w Date: Wed, 19 Sep 2018 14:46:17 +0000 Message-ID: References: <20180913180658.20562-1-xiaolong.ye@intel.com> In-Reply-To: <20180913180658.20562-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTJlMzFkZGItMDkwZS00NmI5LWExMjMtOTYyNGVjNDUyYjMzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiMEZ3YTlxbE5La2l2TzFYaW5UaDhNOUI5WHprM1NiUVljY2ZkbGdDcHc4bVluV3NDMmM1cjVkbXBhWEV6cGZnZyJ9 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 v2 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, 19 Sep 2018 14:51:36 -0000 Hi, > -----Original Message----- > From: Ye, Xiaolong > Sent: Friday, September 14, 2018 2:07 AM > To: dev@dpdk.org; Maxime Coquelin ; Bie, > Tiwei ; Wang, Zhihong > Cc: Wang, Xiao W ; Rami Rosen > ; Wang, Haiyue ; Ye, > Xiaolong > Subject: [PATCH v2 1/2] vhost: introduce API to get vDPA device number >=20 > Signed-off-by: Xiaolong Ye > --- > lib/librte_vhost/rte_vdpa.h | 3 +++ > lib/librte_vhost/vdpa.c | 6 ++++++ > 2 files changed, 9 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); add it also to *version.map, so that we can link it as shared lib. >=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/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.17.1 It's better to have a cover letter for a patch set. BRs, Xiao