Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1642957

[PATCH net-next V5 2/9] skb_array: introduce skb_array_unconsume

From Jason Wang <jasowang@redhat.com>
Newsgroups linux.kernel
Subject [PATCH net-next V5 2/9] skb_array: introduce skb_array_unconsume
Date 2017-05-17 06:20 +0200
Message-ID <tHYBk-6Fi-21@gated-at.bofh.it> (permalink)
References <tHYBj-6Fi-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 include/linux/skb_array.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index f4dfade..79850b6 100644
--- a/include/linux/skb_array.h
+++ b/include/linux/skb_array.h
@@ -156,6 +156,12 @@ static void __skb_array_destroy_skb(void *ptr)
 	kfree_skb(ptr);
 }
 
+static inline void skb_array_unconsume(struct skb_array *a,
+				       struct sk_buff **skbs, int n)
+{
+	ptr_ring_unconsume(&a->ring, (void **)skbs, n, __skb_array_destroy_skb);
+}
+
 static inline int skb_array_resize(struct skb_array *a, int size, gfp_t gfp)
 {
 	return ptr_ring_resize(&a->ring, size, gfp, __skb_array_destroy_skb);
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next V5 0/9] vhost_net rx batch dequeuing Jason Wang <jasowang@redhat.com> - 2017-05-17 06:20 +0200
  [PATCH net-next V5 7/9] tun: support receiving skb through msg_control Jason Wang <jasowang@redhat.com> - 2017-05-17 06:20 +0200
  [PATCH net-next V5 1/9] ptr_ring: add ptr_ring_unconsume Jason Wang <jasowang@redhat.com> - 2017-05-17 06:20 +0200
  [PATCH net-next V5 8/9] tap: support receiving skb from msg_control Jason Wang <jasowang@redhat.com> - 2017-05-17 06:20 +0200
  [PATCH net-next V5 2/9] skb_array: introduce skb_array_unconsume Jason Wang <jasowang@redhat.com> - 2017-05-17 06:20 +0200
  Re: [PATCH net-next V5 0/9] vhost_net rx batch dequeuing "Michael S. Tsirkin" <mst@redhat.com> - 2017-05-17 23:10 +0200
    Re: [PATCH net-next V5 0/9] vhost_net rx batch dequeuing Jason Wang <jasowang@redhat.com> - 2017-05-19 08:30 +0200
      Re: [PATCH net-next V5 0/9] vhost_net rx batch dequeuing "Michael S. Tsirkin" <mst@redhat.com> - 2017-05-19 18:40 +0200
  Re: [PATCH net-next V5 0/9] vhost_net rx batch dequeuing David Miller <davem@davemloft.net> - 2017-05-18 16:10 +0200

csiph-web