From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id F35DCC6AE for ; Tue, 28 Apr 2015 19:37:46 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 28 Apr 2015 10:37:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,665,1422950400"; d="scan'208";a="720601176" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 28 Apr 2015 10:37:45 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t3SHbghj031388 for ; Tue, 28 Apr 2015 18:37:42 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t3SHbg6o029190 for ; Tue, 28 Apr 2015 18:37:42 +0100 Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id t3SHbg9v029186 for dev@dpdk.org; Tue, 28 Apr 2015 18:37:42 +0100 From: Pablo de Lara To: dev@dpdk.org Date: Tue, 28 Apr 2015 18:37:42 +0100 Message-Id: <1430242662-29154-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] kni: fix compilation issue on kernel 4.0.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Apr 2015 17:37:47 -0000 Due to API changes in function pointer ndo_bridge_setlink (commit ad41faa8) and the rename of functions vlan_tx_* (commit df8a39de) in kernel 4.0, DPDK would not build. This patch adds the properly checks to fix the compilation. Reported-by: Stephen Hemminger Signed-off-by: Pablo de Lara --- lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 6 ++++++ lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c index 24b147d..bc3c6a3 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c @@ -2198,8 +2198,14 @@ static int igb_ndo_fdb_dump(struct sk_buff *skb, #endif /* USE_DEFAULT_FDB_DEL_DUMP */ #ifdef HAVE_BRIDGE_ATTRIBS +#ifdef HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS +static int igb_ndo_bridge_setlink(struct net_device *dev, + struct nlmsghdr *nlh, + u16 flags) +#else static int igb_ndo_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh) +#endif /* HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS */ { struct igb_adapter *adapter = netdev_priv(dev); struct e1000_hw *hw = &adapter->hw; diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index 2e7e714..54d1f86 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3885,4 +3885,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #define HAVE_NDO_FDB_ADD_VID #endif /* >= 3.19.0 */ +#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) ) +/* vlan_tx_xx functions got renamed to skb_vlan */ +#define vlan_tx_tag_get skb_vlan_tag_get +#define vlan_tx_tag_present skb_vlan_tag_present +#define HAVE_NDO_BRIDGE_SET_DEL_LINK_FLAGS +#endif /* 4.0.0 */ #endif /* _KCOMPAT_H_ */ -- 1.7.4.1