From: Jason Wang <jasowang@redhat.com> To: mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, eric.dumazet@gmail.com, brouer@redhat.com, Jason Wang <jasowang@redhat.com> Subject: [PATCH net-next V3 4/6] skb_array: add wrappers for resizing Date: Thu, 30 Jun 2016 11:52:57 +0800 [thread overview] Message-ID: <1467258779-3539-5-git-send-email-jasowang@redhat.com> (raw) In-Reply-To: <1467258779-3539-1-git-send-email-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> --- include/linux/skb_array.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h index 2dd0d1e..f4dfade 100644 --- a/include/linux/skb_array.h +++ b/include/linux/skb_array.h @@ -161,6 +161,15 @@ 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); } +static inline int skb_array_resize_multiple(struct skb_array **rings, + int nrings, int size, gfp_t gfp) +{ + BUILD_BUG_ON(offsetof(struct skb_array, ring)); + return ptr_ring_resize_multiple((struct ptr_ring **)rings, + nrings, size, gfp, + __skb_array_destroy_skb); +} + static inline void skb_array_cleanup(struct skb_array *a) { ptr_ring_cleanup(&a->ring, __skb_array_destroy_skb); -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Jason Wang <jasowang@redhat.com> To: mst@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, davem@davemloft.net Cc: brouer@redhat.com, eric.dumazet@gmail.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH net-next V3 4/6] skb_array: add wrappers for resizing Date: Thu, 30 Jun 2016 11:52:57 +0800 [thread overview] Message-ID: <1467258779-3539-5-git-send-email-jasowang@redhat.com> (raw) In-Reply-To: <1467258779-3539-1-git-send-email-jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> --- include/linux/skb_array.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h index 2dd0d1e..f4dfade 100644 --- a/include/linux/skb_array.h +++ b/include/linux/skb_array.h @@ -161,6 +161,15 @@ 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); } +static inline int skb_array_resize_multiple(struct skb_array **rings, + int nrings, int size, gfp_t gfp) +{ + BUILD_BUG_ON(offsetof(struct skb_array, ring)); + return ptr_ring_resize_multiple((struct ptr_ring **)rings, + nrings, size, gfp, + __skb_array_destroy_skb); +} + static inline void skb_array_cleanup(struct skb_array *a) { ptr_ring_cleanup(&a->ring, __skb_array_destroy_skb); -- 2.7.4
next prev parent reply other threads:[~2016-06-30 4:01 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-06-30 3:52 [PATCH net-next V3 0/6] switch to use tx skb array in tun Jason Wang 2016-06-30 3:52 ` Jason Wang 2016-06-30 3:52 ` [PATCH net-next V3 1/6] ptr_ring: support zero length ring Jason Wang 2016-06-30 3:52 ` Jason Wang 2016-06-30 3:52 ` [PATCH net-next V3 2/6] skb_array: minor tweak Jason Wang 2016-06-30 3:52 ` Jason Wang 2016-06-30 3:52 ` [PATCH net-next V3 3/6] ptr_ring: support resizing multiple queues Jason Wang 2016-06-30 3:52 ` Jason Wang 2016-06-30 3:52 ` Jason Wang [this message] 2016-06-30 3:52 ` [PATCH net-next V3 4/6] skb_array: add wrappers for resizing Jason Wang 2016-06-30 3:52 ` [PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN Jason Wang 2016-06-30 3:52 ` Jason Wang 2016-06-30 4:56 ` John Fastabend 2016-06-30 5:12 ` Jason Wang 2016-06-30 5:12 ` Jason Wang 2016-06-30 5:59 ` Jason Wang 2016-06-30 5:59 ` Jason Wang 2016-06-30 6:43 ` Jason Wang 2016-06-30 6:43 ` Jason Wang 2016-06-30 4:56 ` John Fastabend 2016-06-30 3:52 ` [PATCH net-next V3 6/6] tun: switch to use skb array for tx Jason Wang 2016-06-30 3:52 ` Jason Wang 2016-06-30 6:20 ` [PATCH] tun: fix semicolon.cocci warnings kbuild test robot 2016-06-30 6:20 ` kbuild test robot 2016-06-30 6:20 ` [PATCH net-next V3 6/6] tun: switch to use skb array for tx kbuild test robot 2016-06-30 6:20 ` kbuild test robot 2016-06-30 5:37 ` [PATCH net-next V3 0/6] switch to use tx skb array in tun Michael S. Tsirkin 2016-06-30 5:37 ` Michael S. Tsirkin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1467258779-3539-5-git-send-email-jasowang@redhat.com \ --to=jasowang@redhat.com \ --cc=brouer@redhat.com \ --cc=davem@davemloft.net \ --cc=eric.dumazet@gmail.com \ --cc=kvm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mst@redhat.com \ --cc=netdev@vger.kernel.org \ --cc=virtualization@lists.linux-foundation.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.