01 Jul, 2016
2 commits
-
Sometimes, we need support resizing multiple queues at once. This is
because it was not easy to recover to recover from a partial failure
of multiple queues resizing.Signed-off-by: Michael S. Tsirkin
Signed-off-by: Jason Wang
Signed-off-by: David S. Miller -
Sometimes, we need zero length ring. But current code will crash since
we don't do any check before accessing the ring. This patch fixes this.Signed-off-by: Jason Wang
Signed-off-by: David S. Miller
16 Jun, 2016
2 commits
-
This adds ring resize support. Seems to be necessary as
users such as tun allow userspace control over queue size.If resize is used, this costs us ability to peek at queue without
consumer lock - should not be a big deal as peek and consumer are
usually run on the same CPU.If ring is made bigger, ring contents is preserved. If ring is made
smaller, extra pointers are passed to an optional destructor callback.Cleanup function also gains destructor callback such that
all pointers in queue can be cleaned up.This changes some APIs but we don't have any users yet,
so it won't break bisect.Signed-off-by: Michael S. Tsirkin
Acked-by: Jesper Dangaard Brouer
Signed-off-by: David S. Miller -
A simple array based FIFO of pointers. Intended for net stack which
commonly has a single consumer/producer.Signed-off-by: Michael S. Tsirkin
Acked-by: Jesper Dangaard Brouer
Signed-off-by: David S. Miller