| b5458e2c | 06-Dec-2024 |
Konstantin Ananyev <konstantin.ananyev@huawei.com> |
ring: introduce staged ordered ring
Staged-Ordered-Ring (SORING) provides a SW abstraction for 'ordered' queues with multiple processing 'stages'. It is based on conventional DPDK rte_ring, re-uses
ring: introduce staged ordered ring
Staged-Ordered-Ring (SORING) provides a SW abstraction for 'ordered' queues with multiple processing 'stages'. It is based on conventional DPDK rte_ring, re-uses many of its concepts, and even substantial part of its code. It can be viewed as an 'extension' of rte_ring functionality. In particular, main SORING properties: - circular ring buffer with fixed size objects - producer, consumer plus multiple processing stages in the middle. - allows to split objects processing into multiple stages. - objects remain in the same ring while moving from one stage to the other, initial order is preserved, no extra copying needed. - preserves the ingress order of objects within the queue across multiple stages, i.e.: at the same stage multiple threads can process objects from the ring in any order, but for the next stage objects will always appear in the original order. - each stage (and producer/consumer) can be served by single and/or multiple threads. - number of stages, size and number of objects in the ring are configurable at ring initialization time.
Data-path API provides four main operations: - enqueue/dequeue works in the same manner as for conventional rte_ring, all rte_ring synchronization types are supported. - acquire/release - for each stage there is an acquire (start) and release (finish) operation. after some objects are 'acquired' - given thread can safely assume that it has exclusive possession of these objects till 'release' for them is invoked. Note that right now user has to release exactly the same number of objects that was acquired before. After 'release', objects can be 'acquired' by next stage and/or dequeued by the consumer (in case of last stage).
Expected use-case: applications that uses pipeline model (probably with multiple stages) for packet processing, when preserving incoming packet order is important. I.E.: IPsec processing, etc.
Signed-off-by: Eimear Morrissey <eimear.morrissey@huawei.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| 700989f5 | 06-Dec-2024 |
Eimear Morrissey <eimear.morrissey@huawei.com> |
ring: make dump function more verbose
The current rte_ring_dump function uses the generic rte_ring_headtail structure to access head/tail positions. This is incorrect for the RTS case where the head
ring: make dump function more verbose
The current rte_ring_dump function uses the generic rte_ring_headtail structure to access head/tail positions. This is incorrect for the RTS case where the head is stored in a different offset in the union of structs. Switching to a separate function for each sync type allows to dump correct head/tail values and extra metadata.
Signed-off-by: Eimear Morrissey <eimear.morrissey@huawei.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| e4251abd | 06-Dec-2024 |
Konstantin Ananyev <konstantin.ananyev@huawei.com> |
ring: make copying functions generic
Note upfront: that change doesn't introduce any functional or performance changes. It is just a code-reordering for: - improve code modularity and re-usability
ring: make copying functions generic
Note upfront: that change doesn't introduce any functional or performance changes. It is just a code-reordering for: - improve code modularity and re-usability - ability in future to re-use the same code to introduce new functionality
There is no real need for enqueue_elems()/dequeue_elems() to get pointer to actual rte_ring structure, instead it is enough to pass a pointer to actual elements buffer inside the ring. In return, we'll get a copying functions that could be used for other queueing abstractions that do have circular ring buffer inside.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com> Acked-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|
| 2e99bd65 | 19-Feb-2024 |
Jie Hai <haijie1@huawei.com> |
ring: add telemetry command for ring info
This patch supports dump of ring information by its name. An example using this command is shown below:
--> /ring/info,MP_mb_pool_0 { "/ring/info": {
ring: add telemetry command for ring info
This patch supports dump of ring information by its name. An example using this command is shown below:
--> /ring/info,MP_mb_pool_0 { "/ring/info": { "name": "MP_mb_pool_0", "socket": 0, "flags": 0, "producer_type": "MP", "consumer_type": "MC", "size": 262144, "mask": "0x3ffff", "capacity": 262143, "used_count": 153197, "mz_name": "RG_MP_mb_pool_0", "mz_len": 2097536, "mz_hugepage_sz": 1073741824, "mz_socket_id": 0, "mz_flags": "0x0" } }
Signed-off-by: Jie Hai <haijie1@huawei.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Acked-by: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru> Acked-by: Huisong Li <lihuisong@huawei.com> Acked-by: Chengwen Feng <fengchengwen@huawei.com> Acked-by: Morten Brørup <mb@smartsharesystems.com>
show more ...
|
| 21dc24b7 | 31-May-2022 |
Stephen Hemminger <stephen@networkplumber.org> |
ring: remove leftover comment about watermark
The watermark support was removed from rte_ring since version 17.02 but there is leftover in comments.
Fixes: 77dd3064270c ("ring: remove watermark sup
ring: remove leftover comment about watermark
The watermark support was removed from rte_ring since version 17.02 but there is leftover in comments.
Fixes: 77dd3064270c ("ring: remove watermark support") Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
show more ...
|