datapath: backport kfree_skb_list()
authorPravin B Shelar <pshelar@nicira.com>
Fri, 15 May 2015 13:27:35 +0000 (06:27 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Sat, 16 May 2015 04:10:22 +0000 (21:10 -0700)
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
acinclude.m4
datapath/linux/compat/include/linux/skbuff.h
datapath/linux/compat/skbuff-openvswitch.c

index aab7df8..d09a73f 100644 (file)
@@ -344,6 +344,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])])
index 0ae6c13..1a576a0 100644 (file)
@@ -368,4 +368,8 @@ int rpl_skb_vlan_pop(struct sk_buff *skb);
 int rpl_skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci);
 #endif
 
+#ifndef HAVE_KFREE_SKB_LIST
+void rpl_kfree_skb_list(struct sk_buff *segs);
+#define kfree_skb_list rpl_kfree_skb_list
+#endif
 #endif
index 3ecf1fe..fad1cc7 100644 (file)
@@ -267,3 +267,16 @@ int rpl_pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
 EXPORT_SYMBOL(rpl_pskb_expand_head);
 
 #endif
+
+#ifndef HAVE_KFREE_SKB_LIST
+void rpl_kfree_skb_list(struct sk_buff *segs)
+{
+       while (segs) {
+               struct sk_buff *next = segs->next;
+
+               kfree_skb(segs);
+               segs = next;
+       }
+}
+EXPORT_SYMBOL(rpl_kfree_skb_list);
+#endif