[ovs-dev] [PATCH Branch 2.2 Backport] datapath: clear l4_rxhash in skb_clear_hash.

Pritesh Kothari pritesh.kothari at cisco.com
Thu May 1 22:50:50 UTC 2014


Signed-off-by: Pritesh Kothari <pritesh.kothari at cisco.com>
---
v1: backporting commit from master to fix skb_clear_rxhash.
---
 acinclude.m4      | 1 +
 datapath/compat.h | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index fdcdf44..4c569ce 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -289,6 +289,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_reset_mac_len])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_unclone])
   OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [skb_orphan_frags])
+  OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [l4_rxhash])
 
   OVS_GREP_IFELSE([$KSRC/include/linux/types.h], [bool],
                   [OVS_DEFINE([HAVE_BOOL_TYPE])])
diff --git a/datapath/compat.h b/datapath/compat.h
index f8f0469..60a9182 100644
--- a/datapath/compat.h
+++ b/datapath/compat.h
@@ -27,9 +27,12 @@
 
 static inline void skb_clear_rxhash(struct sk_buff *skb)
 {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)
+#if HAVE_RXHASH
 	skb->rxhash = 0;
 #endif
+#if HAVE_L4_RXHASH
+	skb->l4_rxhash = 0;
+#endif
 }
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
-- 
1.9.1




More information about the dev mailing list