From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 743A35587 for ; Fri, 9 Dec 2016 13:08:04 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP; 09 Dec 2016 04:08:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,324,1477983600"; d="scan'208";a="1070036527" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga001.jf.intel.com with ESMTP; 09 Dec 2016 04:08:03 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.159]) by IRSMSX104.ger.corp.intel.com ([169.254.5.52]) with mapi id 14.03.0248.002; Fri, 9 Dec 2016 12:08:02 +0000 From: "Iremonger, Bernard" To: "Yigit, Ferruh" , "thomas.monjalon@6wind.com" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v1 2/5] app/testpmd: use ixgbe public functions Thread-Index: AQHSUg9abZFJ2l2KlkGqjm9s8Y6Jx6D/gnCAgAAB7WA= Date: Fri, 9 Dec 2016 12:08:02 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C224D06049@IRSMSX108.ger.corp.intel.com> References: <1481282878-26176-1-git-send-email-bernard.iremonger@intel.com> <1481282878-26176-3-git-send-email-bernard.iremonger@intel.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzE0ZmRhOWUtODBhNy00M2FkLWEyMjQtYWRjZDAyMzlkYmU2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjIuMTEuMCIsIlRydXN0ZWRMYWJlbEhhc2giOiJxVnhtMlFuZUNqVGRzNFJuNDFzVEloMzRGNHBNWVpUOUE5SUJIdzBJelFFPSJ9 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 v1 2/5] app/testpmd: use ixgbe public functions 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: Fri, 09 Dec 2016 12:08:05 -0000 Hi Ferruh, > -----Original Message----- > From: Yigit, Ferruh > Sent: Friday, December 9, 2016 11:57 AM > To: Iremonger, Bernard ; > thomas.monjalon@6wind.com; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v1 2/5] app/testpmd: use ixgbe public > functions >=20 > On 12/9/2016 11:27 AM, Bernard Iremonger wrote: > > Use the the following ixgbe public functions: > > > > rte_pmd_ixgbe_set_vf_rate_limit > > rte_pmd_ixgbe_set_vf_rx > > rte_pmd_ixgbe_set_vf_rxmode > > rte_pmd_ixgbe_set_vf_tx > > rte_pmd_ixgbe_set_vf_vlan_filter > > > > Signed-off-by: Bernard Iremonger >=20 > <...> >=20 > > @@ -2388,23 +2391,11 @@ int > > set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, > > uint64_t q_msk) { > > int diag; > > - struct rte_eth_link link; > > - > > - if (q_msk =3D=3D 0) > > - return 0; > > > > - if (port_id_is_invalid(port_id, ENABLED_WARN)) > > - return 1; > > - rte_eth_link_get_nowait(port_id, &link); > > - if (rate > link.link_speed) { > > - printf("Invalid rate value:%u bigger than link speed: %u\n", > > - rate, link.link_speed); > > - return 1; > > - } >=20 > Why these changes required? Isn't only change is location and naming of t= he > ...set_vf_rate_limit() ? This change is a cleanup as the parameter checking is now done in rte_pmd_i= xgbe_set_vf_rate_limit(). It was not possible to test the parameter checking in rte_pmd_ixgbe_set_vf_= rate_limit() if the parameters were checked in the set_vf_rate_limit() fun= ction. >=20 > > - diag =3D rte_eth_set_vf_rate_limit(port_id, vf, rate, q_msk); > > + diag =3D rte_pmd_ixgbe_set_vf_rate_limit(port_id, vf, rate, q_msk); > > if (diag =3D=3D 0) > > return diag; > > - printf("rte_eth_set_vf_rate_limit for port_id=3D%d failed diag=3D%d\n= ", > > + printf("rte_pmd_ixgbe_set_vf_rate_limit for port_id=3D%d failed > > +diag=3D%d\n", > > port_id, diag); > > return diag; > > } > > Regards, Bernard.