From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: [PATCH v10 03/20] ethtool: remove PMD specific API call Date: Tue, 4 Jul 2017 17:13:20 +0100 Message-ID: <20170704161337.45926-4-ferruh.yigit@intel.com> References: <20170630165140.59594-1-ferruh.yigit@intel.com> <20170704161337.45926-1-ferruh.yigit@intel.com> Cc: Ferruh Yigit , Stephen Hemminger , Bruce Richardson , Anatoly Burakov To: dev@dpdk.org Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E36D65905 for ; Tue, 4 Jul 2017 18:13:50 +0200 (CEST) In-Reply-To: <20170704161337.45926-1-ferruh.yigit@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" ethtool library has ixgbe specific API call, this needs to be removed when moved into lib folder, libraries shouldn't have PMD dependencies. Signed-off-by: Ferruh Yigit --- lib/librte_ethtool/rte_ethtool.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/lib/librte_ethtool/rte_ethtool.c b/lib/librte_ethtool/rte_ethtool.c index fabfcb2ba..2807a53ff 100644 --- a/lib/librte_ethtool/rte_ethtool.c +++ b/lib/librte_ethtool/rte_ethtool.c @@ -36,9 +36,6 @@ #include #include #include -#ifdef RTE_LIBRTE_IXGBE_PMD -#include -#endif #include "rte_ethtool.h" #define PKTPOOL_SIZE 512 @@ -361,26 +358,8 @@ rte_ethtool_net_vlan_rx_kill_vid(uint8_t port_id, uint16_t vid) int rte_ethtool_net_set_rx_mode(uint8_t port_id) { - uint16_t num_vfs; - struct rte_eth_dev_info dev_info; - uint16_t vf; - - memset(&dev_info, 0, sizeof(dev_info)); - rte_eth_dev_info_get(port_id, &dev_info); - num_vfs = dev_info.max_vfs; - - /* Set VF vf_rx_mode, VF unsupport status is discard */ - for (vf = 0; vf < num_vfs; vf++) { -#ifdef RTE_LIBRTE_IXGBE_PMD - rte_pmd_ixgbe_set_vf_rxmode(port_id, vf, - ETH_VMDQ_ACCEPT_UNTAG, 0); -#endif - } - /* Enable Rx vlan filter, VF unspport status is discard */ - rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK); - - return 0; + return rte_eth_dev_set_vlan_offload(port_id, ETH_VLAN_FILTER_MASK); } -- 2.13.0