mirror of
https://github.com/openvswitch/ovs
synced 2025-10-25 15:07:05 +00:00
datapath: backport kfree_skb_list()
Signed-off-by: Pravin B Shelar <pshelar@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
This commit is contained in:
@@ -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])])
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user