]> git.baikalelectronics.ru Git - kernel.git/commit
ptr_ring: add ptr_ring_unconsume
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 17 May 2017 04:14:37 +0000 (12:14 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 May 2017 14:07:39 +0000 (10:07 -0400)
commite7a721579e922dde2acfa171437d1e14bfb6b697
treec02cc773a624a138d29e7b0ae1f27ce47cbb8865
parente289825fcfbabd2e3ceb72cfc6fc2ce3e5424a84
ptr_ring: add ptr_ring_unconsume

Applications that consume a batch of entries in one go
can benefit from ability to return some of them back
into the ring.

Add an API for that - assuming there's space. If there's no space
naturally can't do this and have to drop entries, but this implies ring
is full so we'd likely drop some anyway.

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>
include/linux/ptr_ring.h