RFC Add usage counter helpers
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest8 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | eal: add usage count helpersdoc/ lib/ lib/ | +98 | 0 replies | |
| 2/8 | vfio: use usage counterslib/ lib/ lib/ | +9 | 0 replies | |
| 3/8 | dev: replace raw refcount with usage countlib/ | +9 | 0 replies | |
| 4/8 | vhost: use usage counters for vchan trackinglib/ lib/ | +4 | 0 replies | |
| 5/8 | acl: use usage counters for ref countinglib/ lib/ | +7 | 0 replies | |
| 6/8 | thash: use usage counters for ref countinglib/ | +5 | 0 replies | |
| 7/8 | lpm: use usage counters for ref countinglib/ | +7 | 0 replies | |
| 8/8 | net/nbl: track devices with usage countersdrivers/ | +12 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [27.03 RFC PATCH v1 0/8] Add usage counter helpers
There is a recurring pattern in DPDK code: on first use, do something, on last use, undo something. In a lot of cases, these reference counters are atomic or otherwise thread-safe, but in cases where they're not, we use raw integers and do manual checks and counter updates instead.
This patchset attempts to provide a really minimal "usage counter" library that does *only* that: track usage of resources. The patchset does not do a full DPDK conversion to these counters, but it does convert a few things to demonstrate what it would look like if we had them.
Anatoly Burakov (8):
eal: add usage count helpers
vfio: use usage counters
dev: replace raw refcount with usage count
vhost: use usage counters for vchan tracking
acl: use usage counters for ref counting
thash: use usage counters for ref counting
lpm: use usage counters for ref counting
net/nbl: track devices with usage counters
doc/api/doxy-api-index.md | 1 + drivers/net/nbl/nbl_common/nbl_userdev.c | 22 +++--- lib/acl/acl.h | 4 +- lib/acl/acl_bld.c | 9 +-- lib/eal/include/meson.build | 1 + lib/eal/include/rte_usage_count.h | 96 ++++++++++++++++++++++++ lib/eal/linux/eal_dev.c | 20 +++-- lib/eal/linux/eal_vfio.c | 7 +- lib/eal/linux/eal_vfio.h | 5 +- lib/eal/linux/eal_vfio_group.c | 11 +-- lib/hash/rte_thash.c | 10 +-- lib/lpm/rte_lpm6.c | 13 ++-- lib/vhost/vhost.c | 5 +- lib/vhost/vhost.h | 3 +- 14 files changed, 151 insertions(+), 56 deletions(-) create mode 100644 lib/eal/include/rte_usage_count.h
Signature · 1 line
2.52.0