Skip to contentSkip to conversation

kni: define HAVE_VF_VLAN_PROTO for SLES12SP3

PATCH Superseded Nirmoy Das 2 participants 3 messages Mar 31, 2017 – Apr 3, 2017

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 kni: define HAVE_VF_VLAN_PROTO for SLES12SP3

Add support for SLES12SP3, which uses kernel 4.4,
but backported features from newer kernels.

---
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +4 -2
index 84826b26e..3d22d8e69 100644
@@ -3929,8 +3929,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #define vlan_tx_tag_present skb_vlan_tag_present
 #endif
 
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) )
+#if (( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) ) \
+    || (defined(CONFIG_SUSE_KERNEL) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,57))))
 #define HAVE_VF_VLAN_PROTO
-#endif /* >= 4.9.0 */
+#endif /* >= 4.9.0, >= SLES12SP3 */
 
 #endif /* _KCOMPAT_H_ */
Signature · 1 line
2.12.0
#1 lore raw
Quoted 13 lines · Nirmoy Das

Add support for SLES12SP3, which uses kernel 4.4,
but backported features from newer kernels.

---
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +0 -0
index 84826b26e..3d22d8e69 100644

lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) · line 3936

Quoted 10 lines
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +4 -2
@@ -3929,8 +3929,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #define vlan_tx_tag_present skb_vlan_tag_present
 #endif
 
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) )
+#if (( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) ) \
+    || (defined(CONFIG_SUSE_KERNEL) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,57))))
 #define HAVE_VF_VLAN_PROTO
-#endif /* >= 4.9.0 */
+#endif /* >= 4.9.0, >= SLES12SP3 */

To make condition simple, what about separating SUSE related check?

There is already "#ifdef CONFIG_SUSE_KERNEL" check in line 699, which is mainly to set SLE_VERSION_CODE, but this check can be added end of that block, what do you think?

Thanks,
ferruh

Quoted 3 lines
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +0 -0
 #endif /* _KCOMPAT_H_ */
 
author
#2 lore raw
Quoted 27 lines · Ferruh Yigit
Quoted 13 lines · Nirmoy Das

Add support for SLES12SP3, which uses kernel 4.4,
but backported features from newer kernels.

---
 lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +0 -0
index 84826b26e..3d22d8e69 100644

lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type) · line 3936

Quoted 10 lines
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +4 -2
@@ -3929,8 +3929,10 @@ skb_set_hash(struct sk_buff *skb, __u32 hash, __always_unused int type)
 #define vlan_tx_tag_present skb_vlan_tag_present
 #endif
 
-#if ( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) )
+#if (( LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0) ) \
+    || (defined(CONFIG_SUSE_KERNEL) && \
+       (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,57))))
 #define HAVE_VF_VLAN_PROTO
-#endif /* >= 4.9.0 */
+#endif /* >= 4.9.0, >= SLES12SP3 */

To make condition simple, what about separating SUSE related check?

Quoted 4 lines

There is already "#ifdef CONFIG_SUSE_KERNEL" check in line 699, which is mainly to set SLE_VERSION_CODE, but this check can be added end of that block, what do you think?

Thanks, looks like I missed that. I will come up with V2.

Quoted 7 lines

Thanks,
ferruh

Quoted 3 lines
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h +0 -0
 #endif /* _KCOMPAT_H_ */
 

Regards,
Nirmoy

Signature · 3 lines
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB
21284 (AG Nürnberg) Maxfeldstr. 5
D-90409 Nürnberg / Phone: +49-911-740 18-4