[PATCH 2/2] acl: inline the match checks into the RVV search loops
Sun Yuechi
sunyuechi at iscas.ac.cn
Sun Nov 1 09:04:23 CET 2026
The match checks are called inside the search loops, between the
transitions; -O3 inlines them and is unchanged, at -O2 they are not.
Flatten the search functions so the loops hold no call.
Signed-off-by: Sun Yuechi <sunyuechi at iscas.ac.cn>
---
lib/acl/acl_run_rvv.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/lib/acl/acl_run_rvv.h b/lib/acl/acl_run_rvv.h
index 1d6fdff045..c4daf10224 100644
--- a/lib/acl/acl_run_rvv.h
+++ b/lib/acl/acl_run_rvv.h
@@ -182,9 +182,11 @@ transition_vec(vuint32m1_t v_next_input, const uint64_t *trans,
}
/*
- * Execute trie traversal with 8 traversals in parallel
+ * Execute trie traversal with 8 traversals in parallel.
+ * Flattened: a vector value live across a call is spilled, and the
+ * frame is then addressed through vlenb.
*/
-static inline int
+static inline __rte_flatten int
search_rvv_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
uint32_t *results, uint32_t total_packets, uint32_t categories)
{
@@ -270,7 +272,7 @@ search_rvv_8(const struct rte_acl_ctx *ctx, const uint8_t **data,
/*
* Execute trie traversal with 4 traversals in parallel
*/
-static inline int
+static inline __rte_flatten int
search_rvv_4(const struct rte_acl_ctx *ctx, const uint8_t **data,
uint32_t *results, uint32_t total_packets, uint32_t categories)
{
--
2.56.0
More information about the dev
mailing list