From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B57B31BBE for ; Tue, 7 Mar 2017 12:13:52 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Mar 2017 03:13:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,258,1484035200"; d="scan'208";a="233194251" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.254.191.241]) ([10.254.191.241]) by fmsmga004.fm.intel.com with ESMTP; 07 Mar 2017 03:13:49 -0800 To: Qi Zhang , jingjing.wu@intel.com, helin.zhang@intel.com References: <20170303015924.68986-1-qi.z.zhang@intel.com> <20170303015924.68986-3-qi.z.zhang@intel.com> Cc: dev@dpdk.org From: Ferruh Yigit Message-ID: <8d111f4c-274d-e59f-1e7e-a2550b80d1bb@intel.com> Date: Tue, 7 Mar 2017 11:13:48 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170303015924.68986-3-qi.z.zhang@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 2/2] app/testpmd: enable VF untag drop in testpmd 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, 07 Mar 2017 11:13:53 -0000 On 3/3/2017 1:59 AM, Qi Zhang wrote: > Add command line to support untag drop to specific VF in > testpmd. > > Signed-off-by: Qi Zhang > --- > app/test-pmd/cmdline.c | 104 +++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 104 insertions(+) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index 43fc636..4ddc2c9 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -311,6 +311,10 @@ static void cmd_help_long_parsed(void *parsed_result, > > "set vf vlan antispoof (port_id) (vf_id) (on|off)\n" > " Set VLAN antispoof for a VF from the PF.\n\n" > +#ifdef RTE_LIBRTE_I40E_PMD > + "set vf vlan untagdrop (port_id) (vf_id) (on|off)\n" > + " Set VLAN untag drop for a VF from the PF.\n\n" > +#endif We should decide how to implement PMD specific APIs in testpmd, and be consistent about it. Currently there are two approaches: 1- Wrap PMD specific feature and API with and PMD #ifdef, as done here. 2- Enable feature by default, return -ENOTSUP for port_id that does not support it. Ex: cmd_vf_rxvlan_filter. I am for second option. And explicitly not disabling I40E driver does not mean you should have those NICs in your runtime environment, so the effect will be same as always enabling it. And since number of PMD specific APIs are increasing, perhaps we should find a better approach for testpmd to prevent them corrupting testpmd. Also it may worth to discuss why number of PMD specific APIs are increasing. > > "set vf vlan tag (port_id) (vf_id) (on|off)\n" > " Set VLAN tag for a VF from the PF.\n\n" > @@ -10995,6 +10999,103 @@ cmdline_parse_inst_t cmd_set_vf_vlan_anti_spoof = { > }, > }; > <...>