Skip to content

rib: allow iteration to include the top-level route

Robin Jarry dpdk-dev 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

* fixed rib6 unit test (0 -> &unspec)
* added release notes entry
* changed enum names (rte_rib*_nxt_mode -> rte_rib*_get_nxt_mode)
* minor style nits

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rib: rename nxt flag parameter to modelib/rib/rte_rib.c lib/rib/rte_rib.h lib/rib/rte_rib6.c +1 more+18 -180 replies
2/2rib: add mode to include top-level route in traversalapp/test/test_rib.c app/test/test_rib6.c doc/guides/rel_notes/release_26_11.rst +4 more+73 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH dpdk v2 0/2] rib: allow iteration to include the top-level route

rte_rib_get_nxt() and rte_rib6_get_nxt() use an untyped int parameter and anonymous enums for the traversal mode. The first patch gives these enums proper type names (rte_rib_nxt_mode, rte_rib6_nxt_mode) and renames the parameter from "flag" to "mode".

The existing traversal modes (ALL and COVER) always skip the exact match top-level route. The second patch adds a RTE_RIB_GET_NXT_ALL_TOP mode (and its IPv6 counterpart) so that callers who need the full subtree including the root can get it without a separate rte_rib_lookup_exact() call.

v2:

* fixed rib6 unit test (0 -> &unspec)
* added release notes entry
* changed enum names (rte_rib*_nxt_mode -> rte_rib*_get_nxt_mode)
* minor style nits

Robin Jarry (2):
rib: rename nxt flag parameter to mode
rib: add mode to include top-level route in traversal

 app/test/test_rib.c                    | 16 ++++++++++++++++
 app/test/test_rib6.c                   | 16 ++++++++++++++++
 doc/guides/rel_notes/release_26_11.rst |  6 ++++++
 lib/rib/rte_rib.c                      | 20 ++++++++++++++------
 lib/rib/rte_rib.h                      | 19 ++++++++++++-------
 lib/rib/rte_rib6.c                     | 20 ++++++++++++++------
 lib/rib/rte_rib6.h                     | 20 +++++++++++++-------
 7 files changed, 91 insertions(+), 26 deletions(-)
Signature · 1 line
2.55.0