LPM4 memory ordering changes
Status from this message: Applied, thanks
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest4 patches 2 repliesApplied
- v56 patches 2 repliesSuperseded
- v33 patches 20 repliesSuperseded
Changes in v6 from the cover letter
Merge multiple relaxed atomic store patches into one. v5:
Fix typo in commit message.
Remove all other inlines.
Change to use atomic_store in tbl8_alloc / tbl8_free. Merge multiple sigle field updates into one atomic store. v4:
Change alignment attribute parameter.
Use atomic store to avoid partial update.
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | lib/lpm: not inline unnecessary functionslib/ | +23 | 0 replies | |
| 2/4 | lib/lpm: memory orderings to avoid race conditions for v1604lib/ lib/ | +29 | 0 replies | |
| 3/4 | lib/lpm: memory orderings to avoid race conditions for v20lib/ lib/ | +27 | 0 replies | |
| 4/4 | lib/lpm: use atomic store to avoid partial updatelib/ | +104 | 0 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Gavin Hu | Honnappa Nagarahalli | Vladimir Medvedkin |
|---|---|---|---|
| Series | Series-acked-by | ||
| 1/4 | R-b | ||
| 2/4 | R-b | ||
| 3/4 | R-b | R-b | |
| 4/4 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [dpdk-dev] [PATCH v6 0/4] LPM4 memory ordering changes
LPM4 uses DIR24-8 method of routing info data organization. Routing rule with prefix longer than 24 bits will be stored in a tbl24 entry together with an associated tbl8 group.
When a tbl8 group is getting attached to a tbl24 entry, lookup might fail even though the entry is configured in the table.
For ex: consider a LPM table configured with 10.10.10.1/24. When a new entry 10.10.10.32/28 is being added, a new tbl8 group is allocated and tbl24 entry is changed to point to the tbl8 group. If the tbl24 entry is written without the tbl8 group entries updated, a lookup on 10.10.10.9 will return failure.
Correct memory orderings are required to ensure that the store to tbl24 does not happen before the stores to tbl8 group entries complete.
When memory orderings are imposed, API performance could drop. However, a patch to de-inline unnecessary functions is added, and this helps to keep API performance.
On Arm A72 platform, the whole patch series in general have no notable performance impact.
On x86 E5-2640 platform, the whole patch series showed 2.6% performance improvement on add, and no impact on lookup or delete.
v6:
Merge multiple relaxed atomic store patches into one. v5:
Fix typo in commit message.
Remove all other inlines.
Change to use atomic_store in tbl8_alloc / tbl8_free. Merge multiple sigle field updates into one atomic store. v4:
Change alignment attribute parameter.
Use atomic store to avoid partial update.
v3:
Use __rte_noinline to force no inline.
v2:
Fix clang building issue by supplying alignment attribute.
Ruifeng Wang (4):
lib/lpm: not inline unnecessary functions
lib/lpm: memory orderings to avoid race conditions for v1604 lib/lpm: memory orderings to avoid race conditions for v20 lib/lpm: use atomic store to avoid partial update
lib/librte_lpm/rte_lpm.c | 248 ++++++++++++++++++++++++++++----------- lib/librte_lpm/rte_lpm.h | 8 +- 2 files changed, 183 insertions(+), 73 deletions(-)
Signature · 1 line
2.17.1