Skip to contentSkip to conversation

kni:fix build failure as "ndo_change_mtu_rh74" not found in RHEL8

PATCH Applied Xiao Liang 3 participants 6 messages Dec 19, 2018 – Jan 14, 2019

lore
Share & tools
lore

Xiao Liang

author
#0 lore raw

PATCH v2 1/1 kni:fix build failure as "ndo_change_mtu_rh74" not found in RHEL8

'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.

Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean ‘ndo_change_mtu’?
#define ndo_change_mtu ndo_change_mtu_rh74

                        ^~~~~~~~~~~~~~~~~~~
---
 kernel/linux/kni/compat.h              | 3 ++-
 kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
kernel/linux/kni/compat.h +2 -1
index 5aadebbcd..bc81d0c8d 100644
@@ -103,7 +103,8 @@
 #endif
 
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
kernel/linux/kni/ethtool/igb/kcompat.h +2 -1
index ae1b53093..2681be684 100644
@@ -3930,7 +3930,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #endif
 
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
Signature · 1 line
2.17.2
author
#1 lore raw

PATCH v2 1/1 kni:fix build failure as "ndo_change_mtu_rh74" not found in RHEL8

'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.

Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean ‘ndo_change_mtu’?
#define ndo_change_mtu ndo_change_mtu_rh74

                        ^~~~~~~~~~~~~~~~~~~
---
 kernel/linux/kni/compat.h              | 3 ++-
 kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
kernel/linux/kni/compat.h +2 -1
index 5aadebbcd..bc81d0c8d 100644
@@ -103,7 +103,8 @@
 #endif
 
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
kernel/linux/kni/ethtool/igb/kcompat.h +2 -1
index ae1b53093..2681be684 100644
@@ -3930,7 +3930,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #endif
 
 #if (defined(RHEL_RELEASE_CODE) && \
-	(RHEL_RELEASE_VERSION(7, 5) <= RHEL_RELEASE_CODE))
+	(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 5)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 #define ndo_change_mtu ndo_change_mtu_rh74
 #endif
 
Signature · 1 line
2.17.2
#2 lore raw
In reply to Xiao Liang
Quoted 7 lines · Xiao Liang

'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.

Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean ‘ndo_change_mtu’?
#define ndo_change_mtu ndo_change_mtu_rh74

There is already a patch for it:
https://patches.dpdk.org/patch/48343/

But that one doesn't cover igb, so I suggest to go with this one.

Quoted 3 lines
                        ^~~~~~~~~~~~~~~~~~~

<...>

#3 lore raw
Quoted 9 lines · Ferruh Yigit
Quoted 7 lines · Xiao Liang

'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.

Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean ‘ndo_change_mtu’?
#define ndo_change_mtu ndo_change_mtu_rh74

Quoted 4 lines

There is already a patch for it:
https://patches.dpdk.org/patch/48343/

But that one doesn't cover igb, so I suggest to go with this one.

cc'ed correct person (Mohammed) this time.

Acked-by on v2 1/1
#4 lore raw
In reply to Xiao Liang
Quoted 10 lines · Xiao Liang

'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.

Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean ‘ndo_change_mtu’?
#define ndo_change_mtu ndo_change_mtu_rh74

                        ^~~~~~~~~~~~~~~~~~~

Suggested title: 'kni: fix build on RHEL 8'

And a request to backport:
Cc: [email protected]

#5 lore raw

19/12/2018 14:47, Ferruh Yigit:

Quoted 12 lines · Xiao Liang
Quoted 10 lines

'ndo_change_mtu_rh74' was changed to 'ndo_change_mtu' in RHEL8.

Build error log:
/home/dpdk-18.11/kernel/linux/kni/compat.h:107:24: error: ‘const struct net_device_ops’ has no member named ‘ndo_change_mtu_rh74’; did you mean ‘ndo_change_mtu’?
#define ndo_change_mtu ndo_change_mtu_rh74

                        ^~~~~~~~~~~~~~~~~~~
Quoted 6 lines

Suggested title: 'kni: fix build on RHEL 8'

And a request to backport:
Cc: [email protected]

Applied, thanks