From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id DA566282 for ; Tue, 13 Dec 2016 15:35:07 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 13 Dec 2016 06:35:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,341,1477983600"; d="scan'208";a="911706666" Received: from irsmsx154.ger.corp.intel.com ([163.33.192.96]) by orsmga003.jf.intel.com with ESMTP; 13 Dec 2016 06:35:05 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.159]) by IRSMSX154.ger.corp.intel.com ([169.254.12.108]) with mapi id 14.03.0248.002; Tue, 13 Dec 2016 14:35:05 +0000 From: "Iremonger, Bernard" To: "Yigit, Ferruh" , "Lu, Wenzhuo" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 17/32] net/i40e: set VF broadcast mode from PF Thread-Index: AQHSUDqVXW4Z92mvZEGcRfhSStEsrqD8jREAgAlshdA= Date: Tue, 13 Dec 2016 14:35:05 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C224D06F26@IRSMSX108.ger.corp.intel.com> References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1481081535-37448-1-git-send-email-wenzhuo.lu@intel.com> <1481081535-37448-18-git-send-email-wenzhuo.lu@intel.com> <10f85acc-17d4-4ac3-29d2-6b27430b2240@intel.com> In-Reply-To: <10f85acc-17d4-4ac3-29d2-6b27430b2240@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjE0NzgwNmItYTc2OC00MjZkLWFjMjAtNmQ5ZWE4YjRkYTQzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjIuMTEuMCIsIlRydXN0ZWRMYWJlbEhhc2giOiJXNldzVDNvYUJ0eWdLaHAzY0RvUmdUb3RmQ3g4alNJQkpBdWpkRXZqZUVrPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 17/32] net/i40e: set VF broadcast mode from PF 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: Tue, 13 Dec 2016 14:35:08 -0000 Hi Ferruh, > -----Original Message----- > From: Yigit, Ferruh > Sent: Wednesday, December 7, 2016 2:33 PM > To: Lu, Wenzhuo ; dev@dpdk.org > Cc: Iremonger, Bernard > Subject: Re: [dpdk-dev] [PATCH v2 17/32] net/i40e: set VF broadcast mode > from PF >=20 > On 12/7/2016 3:32 AM, Wenzhuo Lu wrote: > > Support enabling/disabling VF broadcast mode from PF. > > User can call the API on PF to enable/disable a specific VF's > > broadcast mode. > > > > Signed-off-by: Bernard Iremonger >=20 > <...> >=20 > > +int rte_pmd_i40e_set_vf_broadcast(uint8_t port, uint16_t vf_id, > > +uint8_t on) { > > + struct rte_eth_dev *dev; > > + struct rte_eth_dev_info dev_info; > > + struct i40e_pf *pf; > > + struct i40e_pf_vf *vf; > > + struct i40e_hw *hw; > > + int ret; > > + > > + RTE_ETH_VALID_PORTID_OR_ERR_RET(port, -ENODEV); > > + > > + dev =3D &rte_eth_devices[port]; > > + rte_eth_dev_info_get(port, &dev_info); > > + > > + if (vf_id >=3D dev_info.max_vfs) > > + return -EINVAL; > > + > > + if (on > 1) > > + return -EINVAL; > > + > > + pf =3D I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private); > > + hw =3D I40E_PF_TO_HW(pf); > > + > > + if (vf_id > pf->vf_num) >=20 > if (vf_id > pf->vf_num - 1 || !pf->vfs) if (vf_id >=3D pf->vf_num || !pf->vfs) might be better. >=20 > > + return -EINVAL; > > + >=20 > <...> Regards, Bernard.