Skip to content

Commit d23239a

Browse files
author
Pravin B Shelar
committed
datapath: backport kfree_skb_list()
Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
1 parent 9899125 commit d23239a

3 files changed

Lines changed: 18 additions & 0 deletions

File tree

acinclude.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [
344344
# quoting rules.
345345
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [[[^@]]proto_data_valid],
346346
[OVS_DEFINE([HAVE_PROTO_DATA_VALID])])
347+
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [kfree_skb_list])
347348
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [rxhash])
348349
OVS_GREP_IFELSE([$KSRC/include/linux/skbuff.h], [u16.*rxhash],
349350
[OVS_DEFINE([HAVE_U16_RXHASH])])

datapath/linux/compat/include/linux/skbuff.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,4 +368,8 @@ int rpl_skb_vlan_pop(struct sk_buff *skb);
368368
int rpl_skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci);
369369
#endif
370370

371+
#ifndef HAVE_KFREE_SKB_LIST
372+
void rpl_kfree_skb_list(struct sk_buff *segs);
373+
#define kfree_skb_list rpl_kfree_skb_list
374+
#endif
371375
#endif

datapath/linux/compat/skbuff-openvswitch.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,16 @@ int rpl_pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
267267
EXPORT_SYMBOL(rpl_pskb_expand_head);
268268

269269
#endif
270+
271+
#ifndef HAVE_KFREE_SKB_LIST
272+
void rpl_kfree_skb_list(struct sk_buff *segs)
273+
{
274+
while (segs) {
275+
struct sk_buff *next = segs->next;
276+
277+
kfree_skb(segs);
278+
segs = next;
279+
}
280+
}
281+
EXPORT_SYMBOL(rpl_kfree_skb_list);
282+
#endif

0 commit comments

Comments
 (0)