Watch
1
Fork
You've already forked kernel_a52xq
0
mirror of https://github.com/a52xq-dev/kernel.git synced 2026-10-19 14:18:12 +07:00
Commit graph kernel_a52xq/include/linux/skb_array.h
Message SHA1
pfifo_fast: drop unneeded additional lock on dequeue
After the previous patch, for NOLOCK qdiscs, q->seqlock is
always held when the dequeue() is invoked, we can drop
any additional locking to protect such operation.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Paolo Abeni   authored and   David S. Miller   commited 2018-05-17 12:46:54 -04:00
021a17ed79
skb_array: use __ptr_ring_empty
__skb_array_empty should use __ptr_ring_empty since that's the only
legal lockless function.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Michael S. Tsirkin   authored and   David S. Miller   commited 2018-01-29 12:02:54 -05:00
f417dc2818
net: skb_array: expose peek API
This adds a peek routine to skb_array.h for use with qdisc.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

John Fastabend   authored and   David S. Miller   commited 2017-12-08 13:32:26 -05:00
4a86a4cf68
ptr_ring: use kmalloc_array()
As found by syzkaller, malicious users can set whatever tx_queue_len
on a tun device and eventually crash the kernel.

Lets remove the ALIGN(XXX, SMP_CACHE_BYTES) thing since a small
ring buffer is not fast anyway.

Fixes: 2e0ab8ca83 ("ptr_ring: array based FIFO for pointers")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Eric Dumazet   authored and   David S. Miller   commited 2017-08-16 16:28:47 -07:00
81fbfe8ada
skb_array: introduce batch dequeuing
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jason Wang   authored and   David S. Miller   commited 2017-05-18 10:07:40 -04:00
3528c1a52e
skb_array: introduce skb_array_unconsume
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jason Wang   authored and   David S. Miller   commited 2017-05-18 10:07:39 -04:00
3acb696015
skb_array: add wrappers for resizing
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jason Wang   authored and   David S. Miller   commited 2016-07-01 05:32:17 -04:00
bf900b3dbe
skb_array: minor tweak
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Jason Wang   authored and   David S. Miller   commited 2016-07-01 05:32:16 -04:00
fd68adec9d
skb_array: resize support
Update skb_array after ptr_ring API changes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Michael S. Tsirkin   authored and   David S. Miller   commited 2016-06-15 13:58:27 -07:00
7d7072e3ba
skb_array: array based FIFO for skbs
A simple array based FIFO of pointers.  Intended for net stack so uses
skbs for type safety. Implemented as a set of wrappers around ptr_ring.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Tested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Michael S. Tsirkin   authored and   David S. Miller   commited 2016-06-15 13:58:27 -07:00
ad69f35d1d