From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 233EC6833 for ; Wed, 21 Nov 2018 17:46:50 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id w7-v6so6196538wmc.1 for ; Wed, 21 Nov 2018 08:46:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kNArPz7R+YRD0/LFOT81vEDYwLOnJaXfGOro7IZVYSo=; b=iBC/qiPpR1IcWCKjFznPL2sumAARt3IUentauWkNwNfVOBayweN9fbb+mCTc7sDFbD tiIt79clzi8FeLgt+8wcb225KnMmCrs0+fhx+I4W1J0YVtWvcw7Yr0zYCtm3TVQOodGb p4yDexuIR18FZ3hbtNMU4FOWhmYuZEL+b1yRpRhI1wjc+Mpc+ScghSAdbufUz84X36+6 UrpTSqbhCQxqXtvar2KfjwJehiivpLz7pwa2Tp/sPQ5+aMXWgarOFmY5GXfTwxSTrdb9 C5KJT88Olbkwu6kwX2q55YDXQRwshTQDgsw9SSyyo2JK+9Qvcsd+SdI+9bSlJmQ1Nw6Q juAQ== X-Gm-Message-State: AGRZ1gIG/JHXrqp7uY2hroFCiwVuAp1kLCBO5/2KMvQ+G6NF3sjh6MHD romYYbjJB3JMmNL5Ae6uuXxezRh8 X-Google-Smtp-Source: AJdET5dwqFI/SbUs5AMKABIpcXQ8kBcmphcoHfT08bCLQRdSh1QLl9IvAl6gm2EU+gVdcpcBtaWAow== X-Received: by 2002:a1c:7619:: with SMTP id r25mr6979263wmc.7.1542818809399; Wed, 21 Nov 2018 08:46:49 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id e66-v6sm2174719wmf.40.2018.11.21.08.46.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 08:46:48 -0800 (PST) From: Luca Boccassi To: stable@dpdk.org Cc: dg@adax.com, ferruh.yigit@intel.com Date: Wed, 21 Nov 2018 16:46:44 +0000 Message-Id: <20181121164644.7428-1-bluca@debian.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 16.11] kni: fix build on CentOS 7.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2018 16:46:50 -0000 From: Dan Gora [ backported from upstream commit 4005ad2556c4ad988d93cd1a1fa4815677e00714 ] Fix compilation errors on Centos 7.4 when CONFIG_RTE_KNI_KMOD_ETHTOOL is set to 'y'. Centos 7.4 needs HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK_VLAN_FILL: igb_main.c: In function ‘igb_ndo_bridge_getlink’: igb_main.c:2289:2: error: too few arguments to function ‘ndo_dflt_bridge_getlink’ return ndo_dflt_bridge_getlink(skb, pid, seq, dev, mode, 0, 0, nlflags); ^ Centos 7.4 needs HAVE_VF_VLAN_PROTO and needs to redefine ndo_set_vf_vlan to .extended.ndo_set_vf_vlan: igb_main.c:2318:2: error: unknown field ‘ndo_set_vf_vlan’ specified in initializer .ndo_set_vf_vlan = igb_ndo_set_vf_vlan, ^ Signed-off-by: Dan Gora Acked-by: Ferruh Yigit --- lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h index f20205d56..87d0096c7 100644 --- a/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h @@ -3915,7 +3915,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #define HAVE_NDO_BRIDGE_GETLINK_NLFLAGS #endif /* >= 4.1.0 */ -#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) ) +#if (( LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) ) \ + || ( RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,4) )) /* ndo_bridge_getlink adds new filter_mask and vlan_fill parameters */ #define HAVE_NDO_BRIDGE_GETLINK_FILTER_MASK_VLAN_FILL #endif /* >= 4.2.0 */ @@ -3933,9 +3934,15 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) #endif #if ((LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)) || \ - (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(12, 3, 0))) + (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(12, 3, 0)) || \ + (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4))) #define HAVE_VF_VLAN_PROTO -#endif /* >= 4.9.0, >= SLES12SP3 */ +#if (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4)) +/* In RHEL/Centos 7.4, the "new" version of ndo_set_vf_vlan + * is in the struct net_device_ops_extended */ +#define ndo_set_vf_vlan extended.ndo_set_vf_vlan +#endif +#endif #if (defined(RHEL_RELEASE_CODE) && \ (RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE)) -- 2.19.1