From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7B773F925 for ; Mon, 19 Dec 2016 12:13:23 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP; 19 Dec 2016 03:13:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,373,1477983600"; d="scan'208";a="44649846" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by fmsmga006.fm.intel.com with ESMTP; 19 Dec 2016 03:13:20 -0800 To: Vincent JARDIN , dev@dpdk.org References: <20161216143919.4909-1-ferruh.yigit@intel.com> <20161216190257.6921-1-ferruh.yigit@intel.com> <20161216190257.6921-24-ferruh.yigit@intel.com> <4ab71f12-5352-fa36-3691-929c8a2b8bbf@6wind.com> Cc: Jingjing Wu , Helin Zhang , Bernard Iremonger From: Ferruh Yigit Message-ID: <72f4a443-7116-b00f-85e1-c7792a010fee@intel.com> Date: Mon, 19 Dec 2016 11:13:18 +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: <4ab71f12-5352-fa36-3691-929c8a2b8bbf@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v5 23/29] app/testpmd: handle i40e in VF VLAN filter command 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: Mon, 19 Dec 2016 11:13:23 -0000 On 12/16/2016 8:31 PM, Vincent JARDIN wrote: > Le 16/12/2016 à 20:02, Ferruh Yigit a écrit : >> +#ifdef RTE_LIBRTE_IXGBE_PMD >> + if (strstr(dev_info.driver_name, "ixgbe") != NULL) >> + ret = rte_pmd_ixgbe_set_vf_vlan_filter(res->port_id, >> + res->vlan_id, res->vf_mask, is_add); >> +#endif >> +#ifdef RTE_LIBRTE_I40E_PMD >> + if (strstr(dev_info.driver_name, "i40e") != NULL) >> + ret = rte_pmd_i40e_set_vf_vlan_filter(res->port_id, >> + res->vlan_id, res->vf_mask, is_add); >> +#endif > > That's exactly what we need to avoid, it won't scale to many PMDs. > For a generic PMD feature, completely agree with you. Application shouldn't know/worry about underlying hardware. eth_dev layer should be used. But above usage is for an application that knows the hardware, and knowing that it is losing all the benefits of the portability and explicitly including the PMD header to use those PMD specific APIs. Thanks, ferruh