On 4/12/21 5:19 PM, Gaetan Rivet wrote: > Add a lockless multi-producer/multi-consumer, array-based, > non-intrusive, bounded queue that will fail on overflow. > > Each operation (enqueue, dequeue) uses a CAS(). As such, both producer > and consumer sides guarantee lock-free forward progress. If the queue > is full, enqueuing will fail. Conversely, if the queue is empty, > dequeueing will fail. > > The bound of the queue are restricted to power-of-twos, to allow simpler > overflow on unsigned position markers. > > Signed-off-by: Gaetan Rivet <[email protected]> > Reviewed-by: Eli Britstein <[email protected]> > --- > lib/automake.mk | 2 + > lib/llring.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++++ > lib/llring.h | 76 ++++++++++++++++++++++++ > 3 files changed, 231 insertions(+) > create mode 100644 lib/llring.c > create mode 100644 lib/llring.h > Reviewed-by: Maxime Coquelin <[email protected]> Thanks, Maxime _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
- Re: [ovs-dev] [PATCH v2 13/28] netdev-offload: Add mu... Maxime Coquelin
- [ovs-dev] [PATCH v2 17/28] dpif-netdev: Introduce tagged u... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 17/28] dpif-netdev: Introduce... Maxime Coquelin
- [ovs-dev] [PATCH v2 24/28] dpif-netdev: Use lockless queue... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 24/28] dpif-netdev: Use lockl... Maxime Coquelin
- [ovs-dev] [PATCH v2 22/28] netdev-offload-dpdk: Lock rte_f... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 22/28] netdev-offload-dpdk: L... Maxime Coquelin
- [ovs-dev] [PATCH v2 25/28] dpif-netdev: Make megaflow and ... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 25/28] dpif-netdev: Make mega... Maxime Coquelin
- [ovs-dev] [PATCH v2 11/28] llring: Add lockless MPMC bound... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 11/28] llring: Add lockless M... Maxime Coquelin
- [ovs-dev] [PATCH v2 16/28] dpif-netdev: Use seq-pool for m... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 16/28] dpif-netdev: Use seq-p... Maxime Coquelin
- [ovs-dev] [PATCH v2 10/28] mpsc-queue: Module for lock-fre... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 10/28] mpsc-queue: Module for... Maxime Coquelin
- [ovs-dev] [PATCH v2 26/28] dpif-netdev: Replace port mutex... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 26/28] dpif-netdev: Replace p... Maxime Coquelin
- [ovs-dev] [PATCH v2 18/28] tests: Add ovs-barrier unit tes... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 18/28] tests: Add ovs-barrier... Maxime Coquelin
- [ovs-dev] [PATCH v2 28/28] netdev-dpdk: Remove rte-flow AP... Gaetan Rivet
- Re: [ovs-dev] [PATCH v2 28/28] netdev-dpdk: Remove rt... Maxime Coquelin
