[dpdk-dev] [PATCH v6 0/4] LPM4 memory ordering changes
Medvedkin, Vladimir
vladimir.medvedkin at intel.com
Thu Jul 18 16:00:00 CEST 2019
Hi Wang,
On 18/07/2019 07:22, Ruifeng Wang wrote:
> 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(-)
Looks ok to me, thanks!
Series-acked-by: Vladimir Medvedkin <vladimir.medvedkin at intel.com>
--
Regards,
Vladimir
More information about the dev
mailing list