summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorJason Wang2013-11-01 07:07:47 +0100
committerDavid S. Miller2013-11-05 02:03:52 +0100
commitf8e617e100d7369a0108f96abf4414e9fb82ced7 (patch)
tree669f70c7c3ce6ed05097771890d708d83f1eb8be /include/linux/skbuff.h
parentvxlan: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) (diff)
downloadkernel-qcow2-linux-f8e617e100d7369a0108f96abf4414e9fb82ced7.tar.gz
kernel-qcow2-linux-f8e617e100d7369a0108f96abf4414e9fb82ced7.tar.xz
kernel-qcow2-linux-f8e617e100d7369a0108f96abf4414e9fb82ced7.zip
net: introduce skb_coalesce_rx_frag()
Sometimes we need to coalesce the rx frags to avoid frag list. One example is virtio-net driver which tries to use small frags for both MTU sized packet and GSO packet. So this patch introduce skb_coalesce_rx_frag() to do this. Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Michael Dalton <mwdalton@google.com> Cc: Eric Dumazet <edumazet@google.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 44727b5d4981..2e153b69d318 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1372,6 +1372,9 @@ static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
int size, unsigned int truesize);
+void skb_coalesce_rx_frag(struct sk_buff *skb, int i, int size,
+ unsigned int truesize);
+
#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_has_frag_list(skb))
#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb))