* [dpdk-stable] [PATCH 18.11 1/2] kni: fix ethtool dev_open build error
2020-06-05 18:11 [dpdk-stable] [PATCH 18.11 0/2] fix ethtool build on RHEL/CentOS Kevin Traynor
@ 2020-06-05 18:11 ` Kevin Traynor
2020-06-05 18:11 ` [dpdk-stable] [PATCH 18.11 2/2] kni: fix ethtool pointer type " Kevin Traynor
2020-06-08 7:58 ` [dpdk-stable] [PATCH 18.11 0/2] fix ethtool build on RHEL/CentOS Luca Boccassi
2 siblings, 0 replies; 5+ messages in thread
From: Kevin Traynor @ 2020-06-05 18:11 UTC (permalink / raw)
To: stable, ferruh.yigit; +Cc: bluca, Kevin Traynor
Build error about dev_open() arguments similar to
commit 5c97df1243da ("kni: fix build for dev_open in Linux 5.0")
seen when building with RHEL 8.2 and ethtool enabled.
kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c:
In function ‘ixgbe_diag_test’:
kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c:1748:4:
error: too few arguments to function ‘dev_open’
dev_open(netdev);
^~~~~~~~
kernel/linux/kni/ethtool/ixgbe/ixgbe_ethtool.c:18:
./include/linux/netdevice.h:2795:5: note: declared here
int dev_open(struct net_device *dev, struct netlink_ext_ack *extack);
^~~~~~~~
This is because Linux kernel
commit 00f54e68924e ("net: core: dev: Add extack argument to dev_open()")
is backported to RHEL/CentOS since 8.1.
Extend the fix in
commit 5c97df1243da ("kni: fix build for dev_open in Linux 5.0")
to cover RHEL/CentOS 8.1 onwards.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
kernel/linux/kni/ethtool/igb/kcompat.h | 6 ++++--
kernel/linux/kni/ethtool/ixgbe/kcompat.h | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index 964317508d..adab05aa8a 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3948,8 +3948,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#endif
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) \
+ || (defined(RHEL_RELEASE_CODE) \
+ && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1))))
#define dev_open(x) dev_open(x, NULL)
#define HAVE_NDO_BRIDGE_SETLINK_EXTACK
-#endif /* >= 5.0.0 */
+#endif /* >= 5.0.0 or >= RHEL/CentOS 8.1 */
#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) )
diff --git a/kernel/linux/kni/ethtool/ixgbe/kcompat.h b/kernel/linux/kni/ethtool/ixgbe/kcompat.h
index e1671e91a9..73e2c3fb96 100644
--- a/kernel/linux/kni/ethtool/ixgbe/kcompat.h
+++ b/kernel/linux/kni/ethtool/ixgbe/kcompat.h
@@ -3132,7 +3132,9 @@ static inline int __kc_pci_vfs_assigned(struct pci_dev *dev)
#endif /* >= 3.16.0 */
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) )
+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)) \
+ || (defined(RHEL_RELEASE_CODE) \
+ && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1))))
#define dev_open(x) dev_open(x, NULL)
-#endif /* >= 5.0.0 */
+#endif /* >= 5.0.0 or >= RHEL/CentOS 8.1 */
/*
--
2.21.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-stable] [PATCH 18.11 2/2] kni: fix ethtool pointer type build error
2020-06-05 18:11 [dpdk-stable] [PATCH 18.11 0/2] fix ethtool build on RHEL/CentOS Kevin Traynor
2020-06-05 18:11 ` [dpdk-stable] [PATCH 18.11 1/2] kni: fix ethtool dev_open build error Kevin Traynor
@ 2020-06-05 18:11 ` Kevin Traynor
2020-06-08 7:58 ` [dpdk-stable] [PATCH 18.11 0/2] fix ethtool build on RHEL/CentOS Luca Boccassi
2 siblings, 0 replies; 5+ messages in thread
From: Kevin Traynor @ 2020-06-05 18:11 UTC (permalink / raw)
To: stable, ferruh.yigit; +Cc: bluca, Kevin Traynor
Build error about incompatbile-pointer-types similar to
commit 219bfcc05796 ("kni: fix build with Linux 5.1")
seen when building with RHEL 8.2 and ethtool enabled.
kernel/linux/kni/ethtool/igb/igb_main.c:2358:18:
error: initialization of ‘int (*)...
[-Werror=incompatible-pointer-types]
.ndo_fdb_add = igb_ndo_fdb_add,
^~~~~~~~~~~~~~~
This is because Linux kernel
commit 87b0984ebfab ("net: Add extack argument to ndo_fdb_add()")
is backported to RHEL/CentOS since 8.1.
Extend the fix in
commit 219bfcc05796 ("kni: fix build with Linux 5.1")
to cover RHEL/CentOS 8.1 onwards.
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
kernel/linux/kni/ethtool/igb/kcompat.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/linux/kni/ethtool/igb/kcompat.h b/kernel/linux/kni/ethtool/igb/kcompat.h
index adab05aa8a..611a5b7c49 100644
--- a/kernel/linux/kni/ethtool/igb/kcompat.h
+++ b/kernel/linux/kni/ethtool/igb/kcompat.h
@@ -3955,7 +3955,9 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
#endif /* >= 5.0.0 or >= RHEL/CentOS 8.1 */
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) )
+#if ((LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)) \
+ || (defined(RHEL_RELEASE_CODE) \
+ && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8, 1))))
#define HAVE_NDO_FDB_ADD_EXTACK
-#endif /* >= 5.1.0 */
+#endif /* >= 5.1.0 or >= RHEL/CentOS 8.1 */
#if defined(timer_setup) && defined(from_timer)
--
2.21.3
^ permalink raw reply [flat|nested] 5+ messages in thread