Skip to contentSkip to conversation

kni: fix build on RHEL8

PATCH In review [email protected] 4 participants 4 messages May 27, 2019 – Jun 4, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kni: fix build on RHEL8

From: Luo Gaoliang <[email protected]>

Build error was seen on RHEL8 when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.

Build error log:
/root/kni/dpdk-19.05/kernel/linux/kni/ethtool/igb/kcompat.h:3928:25:
error: 'const struct net_device_ops' has no member named 'extended'

 #define ndo_set_vf_vlan extended.ndo_set_vf_vlan
                         ^~~~~~~~

RHEL8 defined ndo_set_vf_vlan in net_device_ops as well as the mainline kernel.

---
 kernel/linux/kni/ethtool/igb/kcompat.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/linux/kni/ethtool/igb/kcompat.h +2 -1
index 649a69c..f041a3e 100644
@@ -3922,7 +3922,8 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
      (SLE_VERSION_CODE && SLE_VERSION_CODE >= SLE_VERSION(12, 3, 0)) || \
      (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4)))
 #define HAVE_VF_VLAN_PROTO
-#if (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4))
+#if ((RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7, 4)) && \
+	(RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8, 0)))
 /* 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
Signature · 1 line
2.7.4
#1 lore raw

27/05/2019 06:02, [email protected]:

Quoted 9 lines

From: Luo Gaoliang <[email protected]>

Build error was seen on RHEL8 when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.

Build error log:
/root/kni/dpdk-19.05/kernel/linux/kni/ethtool/igb/kcompat.h:3928:25:
error: 'const struct net_device_ops' has no member named 'extended'

 #define ndo_set_vf_vlan extended.ndo_set_vf_vlan
                         ^~~~~~~~

This module has been removed from DPDK:

	http://git.dpdk.org/dpdk/commit/?id=ea6b39b5b84

Do we want to apply this patch directly in older releases (LTS)?

Acked-by
#2 lore raw
Quoted 11 lines · Thomas Monjalon

27/05/2019 06:02, [email protected]:

Quoted 9 lines

From: Luo Gaoliang <[email protected]>

Build error was seen on RHEL8 when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.

Build error log:
/root/kni/dpdk-19.05/kernel/linux/kni/ethtool/igb/kcompat.h:3928:25:
error: 'const struct net_device_ops' has no member named 'extended'

 #define ndo_set_vf_vlan extended.ndo_set_vf_vlan
                         ^~~~~~~~
Quoted 4 lines

This module has been removed from DPDK:

	http://git.dpdk.org/dpdk/commit/?id=ea6b39b5b84

Do we want to apply this patch directly in older releases (LTS)?

stable mail list already in the cc, but

Kevin, Yongsek,
This patch won't be in the master repo, is there anything needs to be done to include the patch in LTS, or is this mail sufficient?

Thanks,
ferruh

#3 lore raw
Quoted 17 lines · Ferruh Yigit
Quoted 11 lines · Thomas Monjalon

27/05/2019 06:02, [email protected]:

Quoted 9 lines

From: Luo Gaoliang <[email protected]>

Build error was seen on RHEL8 when CONFIG_RTE_KNI_KMOD_ETHTOOL is enabled.

Build error log:
/root/kni/dpdk-19.05/kernel/linux/kni/ethtool/igb/kcompat.h:3928:25:
error: 'const struct net_device_ops' has no member named 'extended'

 #define ndo_set_vf_vlan extended.ndo_set_vf_vlan
                         ^~~~~~~~
Quoted 4 lines

This module has been removed from DPDK:

	http://git.dpdk.org/dpdk/commit/?id=ea6b39b5b84

Do we want to apply this patch directly in older releases (LTS)?

Quoted 8 lines

stable mail list already in the cc, but

Kevin, Yongsek,
This patch won't be in the master repo, is there anything needs to be done to include the patch in LTS, or is this mail sufficient?

Hi Ferruh, this mail is enough, will note it.

thanks,
Kevin.

Quoted 3 lines

Thanks,
ferruh