Kernels before 2.6.30 did not implement consume_skb() although RHEL backports it. For other kernels, this provides a backport.
Signed-off-by: Jesse Gross <[email protected]> --- acinclude.m4 | 1 + .../linux-2.6/compat-2.6/include/linux/skbuff.h | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 3cf793d..63a036e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -204,6 +204,7 @@ AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [ [OVS_DEFINE([HAVE_ICMP6_HDR])]) OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_warn_if_lro], [OVS_DEFINE([HAVE_SKB_WARN_LRO])]) + OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [consume_skb]) OVS_GREP_IFELSE([$KSRC26/include/linux/string.h], [kmemdup], [], [OVS_GREP_IFELSE([$KSRC26/include/linux/slab.h], [kmemdup])]) diff --git a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h index 9cd7e1d..b728c51 100644 --- a/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h +++ b/datapath/linux-2.6/compat-2.6/include/linux/skbuff.h @@ -228,4 +228,8 @@ static inline bool skb_warn_if_lro(const struct sk_buff *skb) #endif /* NETIF_F_LRO */ #endif /* HAVE_SKB_WARN_LRO */ +#ifndef HAVE_CONSUME_SKB +#define consume_skb kfree_skb +#endif + #endif -- 1.7.4.1 _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
