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 3107A10A7 for ; Tue, 13 Dec 2016 17:57:27 +0100 (CET) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP; 13 Dec 2016 08:57:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,342,1477983600"; d="scan'208";a="41907682" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by orsmga005.jf.intel.com with ESMTP; 13 Dec 2016 08:57:25 -0800 To: Wenzhuo Lu , dev@dpdk.org References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1480637533-37425-21-git-send-email-wenzhuo.lu@intel.com> Cc: "Chen Jing D(Mark)" , Bernard Iremonger From: Ferruh Yigit Message-ID: Date: Tue, 13 Dec 2016 16:57:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1480637533-37425-21-git-send-email-wenzhuo.lu@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 20/31] app/testpmd: use VFD APIs on i40e 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 16:57:28 -0000 On 12/2/2016 12:12 AM, Wenzhuo Lu wrote: > The new VF Daemon (VFD) APIs is implemented on i40e. Change > testpmd code to use them, inlcuding VF MAC anti-spoofing, > VF VLAN anti-spoofing, TX loopback, VF VLAN strip, VF VLAN > insert. > > Signed-off-by: Wenzhuo Lu > Signed-off-by: Chen Jing D(Mark) > Signed-off-by: Bernard Iremonger > --- > app/test-pmd/cmdline.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++---- > 1 file changed, 85 insertions(+), 7 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 63b55dc..1284d6c 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c <...> > @@ -11059,8 +11109,20 @@ struct cmd_vf_vlan_insert_result { > { > struct cmd_vf_vlan_insert_result *res = parsed_result; > int ret; > + struct rte_eth_dev_info dev_info; > + > + memset(&dev_info, 0, sizeof(dev_info)); > + rte_eth_dev_info_get(res->port_id, &dev_info); > + > + if (strstr(dev_info.driver_name, "ixgbe") != NULL) > + ret = rte_pmd_ixgbe_set_vf_vlan_insert(res->port_id, res->vf_id, > + res->vlan_id); > + else if (strstr(dev_info.driver_name, "i40e") != NULL) > + ret = rte_pmd_i40e_set_vf_vlan_insert(res->port_id, res->vf_id, > + res->vlan_id); This code is within "#ifdef RTE_LIBRTE_IXGBE_PMD", so i40e check can fail if IXGBE_PMD disabled, need to update surrounding ifdef. Same for rest. <...>