]> git.proxmox.com Git - ovs.git/commitdiff
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 aab7df8c9d2b78858c840796eee1e8d4a0916476..d09a73fc104109f934c6c7b03ed93fdd2cb17fdf 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 0ae6c133f2a6a2741b504b205553835f27340ffd..1a576a00a3a99518ec8fbf72eb44d26c69c2e8f4 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 3ecf1fe293014740576487024b051daacd36860b..fad1cc7d0429097056ae9805e98097c2b21443c2 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