[Trusty SRU] Provide compat macro for skb_get_hash

Stefan Bader stefan.bader at canonical.com
Mon Aug 18 10:28:50 UTC 2014


I think this should do the trick. Not tested, so given it looks so
simple, maybe it is wrong.

-Stefan

>From 4dcc78d81761d175433fbd0570373b3005464bbe Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader at canonical.com>
Date: Mon, 18 Aug 2014 10:29:32 +0200
Subject: [PATCH] UBUNTU: SAUCE: Add compat macro for skb_get_hash

Commit df4530d690a14dd net: Change skb_get_rxhash to skb_get_hash
changed a function that is part of the 3.13 kernel API to pull in
some newer driver code.
In order for external modules (which check the LINUX_VERSION_CODE
to find out which API functions to use) to still compile correctly,
add a compat definition for the old name.

BugLink: http://bugs.launchpad.net/bugs/1358162

Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
---
 include/linux/skbuff.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index e9b1a3c..fa71ce2 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -751,6 +751,7 @@ static inline __u32 skb_get_hash(struct sk_buff *skb)
 
 	return skb->rxhash;
 }
+#define skb_get_rxhash	skb_get_hash
 
 static inline void skb_clear_hash(struct sk_buff *skb)
 {
-- 
1.9.1





More information about the kernel-team mailing list