Signed-off-by: Pravin B Shelar <pshe...@nicira.com> Acked-by: Jesse Gross <je...@nicira.com> --- acinclude.m4 | 1 + datapath/linux/compat/include/linux/skbuff.h | 3 +++ datapath/linux/compat/skbuff-openvswitch.c | 12 ++++++++++++ 3 files changed, 16 insertions(+)
diff --git a/acinclude.m4 b/acinclude.m4 index 479da2e..89347fb 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -350,6 +350,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ # quoting rules. OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [[[^@]]proto_data_valid], [OVS_DEFINE([HAVE_PROTO_DATA_VALID])]) + OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [kfree_skb_list]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [rxhash]) OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [u16.*rxhash], [OVS_DEFINE([HAVE_U16_RXHASH])]) diff --git a/datapath/linux/compat/include/linux/skbuff.h b/datapath/linux/compat/include/linux/skbuff.h index d147192..2b3cbc1 100644 --- a/datapath/linux/compat/include/linux/skbuff.h +++ b/datapath/linux/compat/include/linux/skbuff.h @@ -355,4 +355,7 @@ int skb_vlan_pop(struct sk_buff *skb); int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci); #endif +#ifndef HAVE_KFREE_SKB_LIST +void kfree_skb_list(struct sk_buff *segs); +#endif #endif diff --git a/datapath/linux/compat/skbuff-openvswitch.c b/datapath/linux/compat/skbuff-openvswitch.c index 5de43b3..bf9948e 100644 --- a/datapath/linux/compat/skbuff-openvswitch.c +++ b/datapath/linux/compat/skbuff-openvswitch.c @@ -234,3 +234,15 @@ int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci) return 0; } #endif + +#ifndef HAVE_KFREE_SKB_LIST +void kfree_skb_list(struct sk_buff *segs) +{ + while (segs) { + struct sk_buff *next = segs->next; + + kfree_skb(segs); + segs = next; + } +} +#endif -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev