From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 27E848DB5 for ; Thu, 5 Nov 2015 16:51:24 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 05 Nov 2015 07:51:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,248,1444719600"; d="scan'208";a="594597553" Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99]) by FMSMGA003.fm.intel.com with ESMTP; 05 Nov 2015 07:51:22 -0800 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.116]) by IRSMSX107.ger.corp.intel.com ([169.254.10.49]) with mapi id 14.03.0248.002; Thu, 5 Nov 2015 15:51:10 +0000 From: "Richardson, Bruce" To: "Polehn, Mike A" , Shaham Fridenberg Thread-Topic: [dpdk-dev] SR-IOV: API to tell VF from PF Thread-Index: AdEXrYOqrq2ZCfPKTseY27szvYZGZQAAfFUAAAxOGwAAAB/JMA== Date: Thu, 5 Nov 2015 15:51:09 +0000 Message-ID: <59AF69C657FD0841A61C55336867B5B035969499@IRSMSX103.ger.corp.intel.com> References: <2E654B490240B7449C846A96A8D8FE0CC43A4C67@ILMB2.corp.radware.com> <20151105095052.GA15324@bricha3-MOBL3> <745DB4B8861F8E4B9849C970520ABBF1497577D1@ORSMSX102.amr.corp.intel.com> In-Reply-To: <745DB4B8861F8E4B9849C970520ABBF1497577D1@ORSMSX102.amr.corp.intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] SR-IOV: API to tell VF from PF X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Nov 2015 15:51:24 -0000 > -----Original Message----- > From: Polehn, Mike A > Sent: Thursday, November 5, 2015 3:43 PM > To: Richardson, Bruce ; Shaham Fridenberg > > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] SR-IOV: API to tell VF from PF >=20 > I can think of a very good reason to want to know if the device is VF or > PF. >=20 > The VF has to go through a layer 2 switch, not allowing it to just receiv= e > anything coming across the Ehternet. >=20 > The PF can receive all the packets, including packets with different NIC > addresses. This allow the packets to be just data and allows the > processing of data without needing to be adjusting each NIC L2 address > before sending through to the Ehternet. So data can be moved through a > series of NICs between systems without the extra processing. Not doing > unnecessary processing leaves more clock cycles to do high value > processing. >=20 > Mike >=20 Yes, the capabilities of the different types of devices are different. However, is a better solution not to provide the ability to query a NIC if = it supports promiscuous mode, rather than set up a specific query for a VF?= What if (hypothetically) you get a PF that doesn't support promiscuous mod= e, for instance, or a bifurcated driver where the kernel part prevents the = userspace part from enabling promiscuous mode? In both these cases have a d= irect feature query works better than asking about PF/VF. Regards, /Bruce > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Thursday, November 5, 2015 1:51 AM > To: Shaham Fridenberg > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] SR-IOV: API to tell VF from PF >=20 > On Thu, Nov 05, 2015 at 09:39:19AM +0000, Shaham Fridenberg wrote: > > Hey all, > > > > Is there some API to tell VF from PF? > > > > Only way I found so far is deducing that from driver name in the > rte_eth_devices struct. > > > > Thanks, > > Shaham >=20 > Hi Shaham, >=20 > yes, checking the driver name is probably the only way to do so. However, > why do you need or want to know this? If you want to know the capabilitie= s > of a device basing it on a list of known device types is probably not the > best way. >=20 > Regards, > /Bruce