Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1638536
| From | Jason Wang <jasowang@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next V4 05/10] skb_array: introduce batch dequeuing |
| Date | 2017-05-10 05:40 +0200 |
| Message-ID | <tFqDM-3bV-19@gated-at.bofh.it> (permalink) |
| References | <tFqDL-3bV-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
include/linux/skb_array.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index 79850b6..35226cd 100644
--- a/include/linux/skb_array.h
+++ b/include/linux/skb_array.h
@@ -97,21 +97,46 @@ static inline struct sk_buff *skb_array_consume(struct skb_array *a)
return ptr_ring_consume(&a->ring);
}
+static inline int skb_array_consume_batched(struct skb_array *a,
+ struct sk_buff **array, int n)
+{
+ return ptr_ring_consume_batched(&a->ring, (void **)array, n);
+}
+
static inline struct sk_buff *skb_array_consume_irq(struct skb_array *a)
{
return ptr_ring_consume_irq(&a->ring);
}
+static inline int skb_array_consume_batched_irq(struct skb_array *a,
+ struct sk_buff **array, int n)
+{
+ return ptr_ring_consume_batched_irq(&a->ring, (void **)array, n);
+}
+
static inline struct sk_buff *skb_array_consume_any(struct skb_array *a)
{
return ptr_ring_consume_any(&a->ring);
}
+static inline int skb_array_consume_batched_any(struct skb_array *a,
+ struct sk_buff **array, int n)
+{
+ return ptr_ring_consume_batched_any(&a->ring, (void **)array, n);
+}
+
+
static inline struct sk_buff *skb_array_consume_bh(struct skb_array *a)
{
return ptr_ring_consume_bh(&a->ring);
}
+static inline int skb_array_consume_batched_bh(struct skb_array *a,
+ struct sk_buff **array, int n)
+{
+ return ptr_ring_consume_batched_bh(&a->ring, (void **)array, n);
+}
+
static inline int __skb_array_len_with_tag(struct sk_buff *skb)
{
if (likely(skb)) {
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next V4 00/10] vhost_net batch dequeuing Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 [PATCH net-next V4 04/10] ptr_ring: introduce batch dequeuing Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 [PATCH net-next V4 08/10] tun: support receiving skb through msg_control Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 [PATCH net-next V4 09/10] tap: support receiving skb from msg_control Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 [PATCH net-next V4 05/10] skb_array: introduce batch dequeuing Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 [PATCH net-next V4 01/10] ptr_ring: batch ring zeroing Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 [PATCH net-next V4 07/10] tap: export skb_array Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 [PATCH net-next V4 03/10] skb_array: introduce skb_array_unconsume Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 [PATCH net-next V4 02/10] ptr_ring: add ptr_ring_unconsume Jason Wang <jasowang@redhat.com> - 2017-05-10 05:40 +0200 Re: [PATCH net-next V4 00/10] vhost_net batch dequeuing "Michael S. Tsirkin" <mst@redhat.com> - 2017-05-10 14:40 +0200
csiph-web