* [dpdk-dev] [PATCH v2] kni: fix build on Centos 7.4 when Ethtool enabled
@ 2018-05-22 18:10 Dan Gora
2018-05-22 18:50 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Dan Gora @ 2018-05-22 18:10 UTC (permalink / raw)
To: Ferruh Yigit; +Cc: dev, Dan Gora
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 <dg@adax.com>
v2:
Reformatted according to recommendations from ferruh.yigit@intel.com
---
kernel/linux/kni/ethtool/igb/kcompat.h | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index fd3175b5d..40a8d99ce 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3900,7 +3900,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 */
@@ -3918,9 +3919,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 LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
#define HAVE_PCI_ENABLE_MSIX
--
2.13.2.556.g5116f79
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] kni: fix build on Centos 7.4 when Ethtool enabled
2018-05-22 18:10 [dpdk-dev] [PATCH v2] kni: fix build on Centos 7.4 when Ethtool enabled Dan Gora
@ 2018-05-22 18:50 ` Ferruh Yigit
2018-05-22 20:13 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-05-22 18:50 UTC (permalink / raw)
To: Dan Gora; +Cc: dev
On 5/22/2018 7:10 PM, Dan Gora wrote:
> 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 <dg@adax.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v2] kni: fix build on Centos 7.4 when Ethtool enabled
2018-05-22 18:50 ` Ferruh Yigit
@ 2018-05-22 20:13 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-05-22 20:13 UTC (permalink / raw)
To: Dan Gora; +Cc: dev, Ferruh Yigit
22/05/2018 20:50, Ferruh Yigit:
> On 5/22/2018 7:10 PM, Dan Gora wrote:
> > 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 <dg@adax.com>
>
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-22 20:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-22 18:10 [dpdk-dev] [PATCH v2] kni: fix build on Centos 7.4 when Ethtool enabled Dan Gora
2018-05-22 18:50 ` Ferruh Yigit
2018-05-22 20:13 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).