* [PATCH v1 1/2] net/ice: remove unused flow handle from engines
@ 2026-10-21 10:15 Anatoly Burakov
2026-10-21 10:15 ` [PATCH v1 2/2] net/ice: rename flow metadata parameter to rule Anatoly Burakov
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Anatoly Burakov @ 2026-10-21 10:15 UTC (permalink / raw)
To: dev
The generic flow layer now assigns the parsed rule to `flow->rule`
after successful creation. Engine create callbacks no longer use the
flow handle, and all four implementations mark it as unused.
Remove the parameter from the callback type, declarations,
implementations and generic invocation.
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
drivers/net/intel/ice/ice_acl_filter.c | 1 -
drivers/net/intel/ice/ice_fdir_filter.c | 1 -
drivers/net/intel/ice/ice_generic_flow.c | 2 +-
drivers/net/intel/ice/ice_generic_flow.h | 1 -
drivers/net/intel/ice/ice_hash.c | 2 --
drivers/net/intel/ice/ice_switch_filter.c | 1 -
6 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c
index 9414bb3f122..08695b554f1 100644
--- a/drivers/net/intel/ice/ice_acl_filter.c
+++ b/drivers/net/intel/ice/ice_acl_filter.c
@@ -505,7 +505,6 @@ ice_acl_hw_rem_conf(struct ice_pf *pf, struct acl_rule *rule, int32_t entry_idx)
static int
ice_acl_create_filter(struct ice_adapter *ad,
- struct rte_flow *flow __rte_unused,
void *meta,
struct rte_flow_error *error)
{
diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c
index f4c886dded3..e3f2cf2e3dd 100644
--- a/drivers/net/intel/ice/ice_fdir_filter.c
+++ b/drivers/net/intel/ice/ice_fdir_filter.c
@@ -1537,7 +1537,6 @@ ice_fdir_entry_del(struct ice_pf *pf, struct ice_fdir_fltr_pattern *key)
static int
ice_fdir_create_filter(struct ice_adapter *ad,
- struct rte_flow *flow __rte_unused,
void *meta,
struct rte_flow_error *error)
{
diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c
index 25aa7aa41e2..f5ae6f7d013 100644
--- a/drivers/net/intel/ice/ice_generic_flow.c
+++ b/drivers/net/intel/ice/ice_generic_flow.c
@@ -2269,7 +2269,7 @@ ice_parse_engine_create(struct ice_adapter *ad,
RTE_ASSERT(parser->engine->create != NULL);
- if (parser->engine->create(ad, flow, meta, error) != 0) {
+ if (parser->engine->create(ad, meta, error) != 0) {
ice_flow_rule_free(parser->engine, meta);
return false;
}
diff --git a/drivers/net/intel/ice/ice_generic_flow.h b/drivers/net/intel/ice/ice_generic_flow.h
index efb3ee9b695..ca0f7abe9aa 100644
--- a/drivers/net/intel/ice/ice_generic_flow.h
+++ b/drivers/net/intel/ice/ice_generic_flow.h
@@ -506,7 +506,6 @@ struct ice_flow_redirect {
typedef int (*engine_init_t)(struct ice_adapter *ad);
typedef void (*engine_uninit_t)(struct ice_adapter *ad);
typedef int (*engine_create_t)(struct ice_adapter *ad,
- struct rte_flow *flow,
void *meta,
struct rte_flow_error *error);
typedef int (*engine_destroy_t)(struct ice_adapter *ad,
diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c
index fe66b1dd5a6..980abb58f3b 100644
--- a/drivers/net/intel/ice/ice_hash.c
+++ b/drivers/net/intel/ice/ice_hash.c
@@ -82,7 +82,6 @@ ice_hash_init(struct ice_adapter *ad);
static int
ice_hash_create(struct ice_adapter *ad,
- struct rte_flow *flow,
void *meta,
struct rte_flow_error *error);
@@ -1314,7 +1313,6 @@ ice_hash_add_raw_cfg(struct ice_adapter *ad,
static int
ice_hash_create(struct ice_adapter *ad,
- struct rte_flow *flow __rte_unused,
void *meta,
struct rte_flow_error *error)
{
diff --git a/drivers/net/intel/ice/ice_switch_filter.c b/drivers/net/intel/ice/ice_switch_filter.c
index 4dd4707c406..59e18269206 100644
--- a/drivers/net/intel/ice/ice_switch_filter.c
+++ b/drivers/net/intel/ice/ice_switch_filter.c
@@ -285,7 +285,6 @@ ice_pattern_match_item ice_switch_supported_pattern[] = {
static int
ice_switch_create(struct ice_adapter *ad,
- struct rte_flow *flow __rte_unused,
void *meta,
struct rte_flow_error *error)
{
--
2.52.0
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH v1 2/2] net/ice: rename flow metadata parameter to rule 2026-10-21 10:15 [PATCH v1 1/2] net/ice: remove unused flow handle from engines Anatoly Burakov @ 2026-10-21 10:15 ` Anatoly Burakov 2026-10-21 10:23 ` Bruce Richardson 2026-10-21 10:17 ` [PATCH v1 1/2] net/ice: remove unused flow handle from engines Burakov, Anatoly ` (2 subsequent siblings) 3 siblings, 1 reply; 11+ messages in thread From: Anatoly Burakov @ 2026-10-21 10:15 UTC (permalink / raw) To: dev Parsers now return the final engine-specific rule rather than temporary metadata. The generic flow layer passes this object to engine creation and stores it in `flow->rule`. Rename the `meta` parameters and related local variables to reflect their role as persistent rules. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> --- drivers/net/intel/ice/ice_acl_filter.c | 36 +++++++++---------- drivers/net/intel/ice/ice_fdir_filter.c | 8 ++--- drivers/net/intel/ice/ice_generic_flow.c | 16 ++++----- drivers/net/intel/ice/ice_generic_flow.h | 6 ++-- drivers/net/intel/ice/ice_hash.c | 42 +++++++++++------------ drivers/net/intel/ice/ice_switch_filter.c | 8 ++--- 6 files changed, 58 insertions(+), 58 deletions(-) diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c index 08695b554f1..fdd841b062d 100644 --- a/drivers/net/intel/ice/ice_acl_filter.c +++ b/drivers/net/intel/ice/ice_acl_filter.c @@ -505,11 +505,11 @@ ice_acl_hw_rem_conf(struct ice_pf *pf, struct acl_rule *rule, int32_t entry_idx) static int ice_acl_create_filter(struct ice_adapter *ad, - void *meta, + void *rule, struct rte_flow_error *error) { - struct acl_rule *rule = meta; - struct ice_acl_conf *filter = &rule->conf; + struct acl_rule *acl_rule = rule; + struct ice_acl_conf *filter = &acl_rule->conf; enum ice_fltr_ptype flow_type = filter->input.flow_type; struct ice_flow_action acts[1]; struct ice_pf *pf = &ad->pf; @@ -538,7 +538,7 @@ ice_acl_create_filter(struct ice_adapter *ad, } input->acl_fltr = true; - ret = ice_acl_hw_set_conf(pf, input, acts, rule, flow_type, 0); + ret = ice_acl_hw_set_conf(pf, input, acts, acl_rule, flow_type, 0); if (ret) { return rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, @@ -547,29 +547,29 @@ ice_acl_create_filter(struct ice_adapter *ad, if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_OTHER || flow_type == ICE_FLTR_PTYPE_FRAG_IPV4) { - ret = ice_acl_hw_set_conf(pf, input, acts, rule, + ret = ice_acl_hw_set_conf(pf, input, acts, acl_rule, ICE_FLTR_PTYPE_NONF_IPV4_UDP, 1); if (ret) goto err_acl_hw_set_conf_udp; - ret = ice_acl_hw_set_conf(pf, input, acts, rule, + ret = ice_acl_hw_set_conf(pf, input, acts, acl_rule, ICE_FLTR_PTYPE_NONF_IPV4_TCP, 2); if (ret) goto err_acl_hw_set_conf_tcp; - ret = ice_acl_hw_set_conf(pf, input, acts, rule, + ret = ice_acl_hw_set_conf(pf, input, acts, acl_rule, ICE_FLTR_PTYPE_NONF_IPV4_SCTP, 3); if (ret) goto err_acl_hw_set_conf_sctp; } - rule->flow_type = flow_type; + acl_rule->flow_type = flow_type; return 0; err_acl_hw_set_conf_sctp: - ice_acl_hw_rem_conf(pf, rule, 3); + ice_acl_hw_rem_conf(pf, acl_rule, 3); err_acl_hw_set_conf_tcp: - ice_acl_hw_rem_conf(pf, rule, 2); + ice_acl_hw_rem_conf(pf, acl_rule, 2); err_acl_hw_set_conf_udp: - ice_acl_hw_rem_conf(pf, rule, 1); + ice_acl_hw_rem_conf(pf, acl_rule, 1); return ret; } @@ -948,7 +948,7 @@ ice_acl_parse(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **rule, struct rte_flow_error *error) { struct ci_flow_actions parsed_actions = {0}; @@ -962,7 +962,7 @@ ice_acl_parse(struct ice_adapter *ad, .check = ice_acl_parse_action_check, .driver_ctx = ad, }; - struct acl_rule *rule; + struct acl_rule *acl_rule; struct ice_acl_conf *filter; struct ice_pattern_match_item item; uint64_t input_set; @@ -981,13 +981,13 @@ ice_acl_parse(struct ice_adapter *ad, if (ret != 0) return ret; - rule = rte_zmalloc("acl_rule", sizeof(*rule), 0); - if (rule == NULL) { + acl_rule = rte_zmalloc("acl_rule", sizeof(*acl_rule), 0); + if (acl_rule == NULL) { return rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, "Failed to allocate memory for acl rule"); } - filter = &rule->conf; + filter = &acl_rule->conf; ret = ice_acl_parse_pattern(ad, pattern, error, filter); if (ret) @@ -1005,11 +1005,11 @@ ice_acl_parse(struct ice_adapter *ad, if (ret) goto error; - *meta = rule; + *rule = acl_rule; return 0; error: - rte_free(rule); + rte_free(acl_rule); return ret; } diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c index e3f2cf2e3dd..996d46819c9 100644 --- a/drivers/net/intel/ice/ice_fdir_filter.c +++ b/drivers/net/intel/ice/ice_fdir_filter.c @@ -1537,11 +1537,11 @@ ice_fdir_entry_del(struct ice_pf *pf, struct ice_fdir_fltr_pattern *key) static int ice_fdir_create_filter(struct ice_adapter *ad, - void *meta, + void *rule, struct rte_flow_error *error) { struct ice_pf *pf = &ad->pf; - struct ice_fdir_filter_conf *filter = meta; + struct ice_fdir_filter_conf *filter = rule; struct ice_fdir_info *fdir_info = &pf->fdir; struct ice_fdir_filter_conf *node; struct ice_fdir_fltr_pattern key; @@ -2975,7 +2975,7 @@ ice_fdir_parse(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **rule, struct rte_flow_error *error) { struct ci_flow_actions parsed_actions = {0}; @@ -3047,7 +3047,7 @@ ice_fdir_parse(struct ice_adapter *ad, if (ret) goto error; - *meta = filter; + *rule = filter; return ret; error: diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c index f5ae6f7d013..51a953ebfe9 100644 --- a/drivers/net/intel/ice/ice_generic_flow.c +++ b/drivers/net/intel/ice/ice_generic_flow.c @@ -2251,7 +2251,7 @@ ice_parse_engine_create(struct ice_adapter *ad, const struct rte_flow_action actions[], struct rte_flow_error *error) { - void *meta = NULL; + void *rule = NULL; if (ICE_FLOW_ENGINE_DISABLED(ad->disabled_engine_mask, parser->engine->type)) { @@ -2264,17 +2264,17 @@ ice_parse_engine_create(struct ice_adapter *ad, if (parser->parse_pattern_action(ad, parser->array, parser->array_len, - pattern, actions, attr, &meta, error) < 0) + pattern, actions, attr, &rule, error) < 0) return false; RTE_ASSERT(parser->engine->create != NULL); - if (parser->engine->create(ad, meta, error) != 0) { - ice_flow_rule_free(parser->engine, meta); + if (parser->engine->create(ad, rule, error) != 0) { + ice_flow_rule_free(parser->engine, rule); return false; } - flow->rule = meta; + flow->rule = rule; return true; } @@ -2287,7 +2287,7 @@ ice_parse_engine_validate(struct ice_adapter *ad, const struct rte_flow_action actions[], struct rte_flow_error *error) { - void *meta = NULL; + void *rule = NULL; int ret; if (ICE_FLOW_ENGINE_DISABLED(ad->disabled_engine_mask, @@ -2302,9 +2302,9 @@ ice_parse_engine_validate(struct ice_adapter *ad, parser->array, parser->array_len, pattern, actions, attr, - &meta, error); + &rule, error); if (ret >= 0) - ice_flow_rule_free(parser->engine, meta); + ice_flow_rule_free(parser->engine, rule); return ret >= 0; } diff --git a/drivers/net/intel/ice/ice_generic_flow.h b/drivers/net/intel/ice/ice_generic_flow.h index ca0f7abe9aa..97fc3b43ac5 100644 --- a/drivers/net/intel/ice/ice_generic_flow.h +++ b/drivers/net/intel/ice/ice_generic_flow.h @@ -506,7 +506,7 @@ struct ice_flow_redirect { typedef int (*engine_init_t)(struct ice_adapter *ad); typedef void (*engine_uninit_t)(struct ice_adapter *ad); typedef int (*engine_create_t)(struct ice_adapter *ad, - void *meta, + void *rule, struct rte_flow_error *error); typedef int (*engine_destroy_t)(struct ice_adapter *ad, struct rte_flow *flow, @@ -521,7 +521,7 @@ typedef int(*engine_redirect_t)(struct ice_adapter *ad, /* Free nested rule allocations only, without accessing hardware resources. */ typedef void (*engine_free_t)(void *rule); /* - * Parsers return an allocated final rule through meta on success, and clean up + * Parsers return an allocated final rule through rule on success, and clean up * their own allocations on failure. The generic layer owns successful results, * including during validation; engine create/destroy callbacks must not free them. */ @@ -531,7 +531,7 @@ typedef int (*parse_pattern_action_t)(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **rule, struct rte_flow_error *error); /* Struct to store engine created. */ diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c index 980abb58f3b..5644c89a642 100644 --- a/drivers/net/intel/ice/ice_hash.c +++ b/drivers/net/intel/ice/ice_hash.c @@ -82,7 +82,7 @@ ice_hash_init(struct ice_adapter *ad); static int ice_hash_create(struct ice_adapter *ad, - void *meta, + void *rule, struct rte_flow_error *error); static int @@ -100,7 +100,7 @@ ice_hash_parse_pattern_action(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **rule, struct rte_flow_error *error); /* Rss configuration template */ @@ -656,7 +656,7 @@ static int ice_hash_parse_raw_pattern(struct ice_adapter *ad, const struct rte_flow_item *item, struct rte_flow_error *error, - struct ice_hash_flow_cfg *meta) + struct ice_hash_flow_cfg *rule) { const struct rte_flow_item_raw *raw_spec, *raw_mask; struct ice_parser_profile prof; @@ -744,7 +744,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad, if (ret) goto free_mem; - memcpy(&meta->rss_cfg.raw.prof, &prof, sizeof(prof)); + memcpy(&rule->rss_cfg.raw.prof, &prof, sizeof(prof)); free_mem: free(pkt_buf); @@ -1122,7 +1122,7 @@ ice_hash_parse_action_check(const struct ci_flow_actions *actions, static int ice_hash_parse_rss_action(struct ice_pattern_match_item *pattern_match_item, const struct rte_flow_action_rss *rss, - uint64_t pattern_hint, struct ice_hash_flow_cfg *rss_meta, + uint64_t pattern_hint, struct ice_hash_flow_cfg *rule, struct rte_flow_error *error) { struct ice_rss_hash_cfg *cfg = pattern_match_item->meta; @@ -1135,7 +1135,7 @@ ice_hash_parse_rss_action(struct ice_pattern_match_item *pattern_match_item, RTE_FLOW_ERROR_TYPE_ACTION_CONF, rss, "XOR hash function is only supported for empty pattern"); } - rss_meta->simple_xor = true; + rule->simple_xor = true; return 0; } @@ -1145,7 +1145,7 @@ ice_hash_parse_rss_action(struct ice_pattern_match_item *pattern_match_item, /* If pattern type is raw, no need to refine rss type */ if (pattern_hint == ICE_PHINT_RAW) { - rss_meta->rss_cfg.raw.symm = symm; + rule->rss_cfg.raw.symm = symm; return 0; } cfg->symm = symm; @@ -1162,8 +1162,8 @@ ice_hash_parse_rss_action(struct ice_pattern_match_item *pattern_match_item, RTE_FLOW_ERROR_TYPE_ACTION_CONF, rss, "RSS type not supported"); - rss_meta->rss_cfg.hash = *cfg; - ice_refine_hash_cfg(&rss_meta->rss_cfg.hash, + rule->rss_cfg.hash = *cfg; + ice_refine_hash_cfg(&rule->rss_cfg.hash, rss_type, pattern_hint); return 0; @@ -1176,7 +1176,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **rule, struct rte_flow_error *error) { struct ci_flow_actions parsed_actions = {0}; @@ -1190,7 +1190,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, }; const struct rte_flow_action_rss *rss; struct ice_pattern_match_item pattern_match_item; - struct ice_hash_flow_cfg *rss_meta_ptr; + struct ice_hash_flow_cfg *filter; uint64_t phint = ICE_PHINT_NONE; int ret = 0; @@ -1202,11 +1202,11 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, if (ret) return ret; - rss_meta_ptr = rte_zmalloc(NULL, sizeof(*rss_meta_ptr), 0); - if (!rss_meta_ptr) { + filter = rte_zmalloc(NULL, sizeof(*filter), 0); + if (!filter) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, - "No memory for rss_meta_ptr"); + "No memory for RSS rule"); return -ENOMEM; } @@ -1223,8 +1223,8 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, if (phint == ICE_PHINT_RAW) { const struct rte_flow_item *raw_item = ice_pattern_skip_void(pattern); - rss_meta_ptr->rss_cfg.raw.raw_ena = true; - ret = ice_hash_parse_raw_pattern(ad, raw_item, error, rss_meta_ptr); + filter->rss_cfg.raw.raw_ena = true; + ret = ice_hash_parse_raw_pattern(ad, raw_item, error, filter); if (ret) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL, @@ -1235,13 +1235,13 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, rss = parsed_actions.actions[0]->conf; ret = ice_hash_parse_rss_action(&pattern_match_item, rss, phint, - rss_meta_ptr, error); + filter, error); error: if (!ret) - *meta = rss_meta_ptr; + *rule = filter; else - rte_free(rss_meta_ptr); + rte_free(filter); return ret; } @@ -1313,7 +1313,7 @@ ice_hash_add_raw_cfg(struct ice_adapter *ad, static int ice_hash_create(struct ice_adapter *ad, - void *meta, + void *rule, struct rte_flow_error *error) { struct ice_pf *pf = &ad->pf; @@ -1321,7 +1321,7 @@ ice_hash_create(struct ice_adapter *ad, struct ice_vsi *vsi = pf->main_vsi; int ret; uint32_t reg; - struct ice_hash_flow_cfg *filter_ptr = meta; + struct ice_hash_flow_cfg *filter_ptr = rule; if (filter_ptr->simple_xor) { /* Enable registers for simple_xor hash function. */ diff --git a/drivers/net/intel/ice/ice_switch_filter.c b/drivers/net/intel/ice/ice_switch_filter.c index 59e18269206..ade6ca6640f 100644 --- a/drivers/net/intel/ice/ice_switch_filter.c +++ b/drivers/net/intel/ice/ice_switch_filter.c @@ -285,14 +285,14 @@ ice_pattern_match_item ice_switch_supported_pattern[] = { static int ice_switch_create(struct ice_adapter *ad, - void *meta, + void *rule, struct rte_flow_error *error) { int ret = 0; struct ice_pf *pf = &ad->pf; struct ice_hw *hw = ICE_PF_TO_HW(pf); struct ice_rule_query_data rule_added = {0}; - struct ice_switch_filter_conf *filter_conf_ptr = meta; + struct ice_switch_filter_conf *filter_conf_ptr = rule; struct ice_adv_lkup_elem *list = filter_conf_ptr->lkups; uint16_t lkups_cnt = filter_conf_ptr->lkups_num; struct ice_adv_rule_info *rule_info = &filter_conf_ptr->rule_info; @@ -1705,7 +1705,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **rule, struct rte_flow_error *error) { struct ice_pf *pf = &ad->pf; @@ -1845,7 +1845,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, filter->lkups = list; filter->lkups_num = lkups_num; filter->rule_info = rule_info; - *meta = filter; + *rule = filter; return 0; -- 2.52.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v1 2/2] net/ice: rename flow metadata parameter to rule 2026-10-21 10:15 ` [PATCH v1 2/2] net/ice: rename flow metadata parameter to rule Anatoly Burakov @ 2026-10-21 10:23 ` Bruce Richardson 0 siblings, 0 replies; 11+ messages in thread From: Bruce Richardson @ 2026-10-21 10:23 UTC (permalink / raw) To: Anatoly Burakov; +Cc: dev On Wed, Oct 21, 2026 at 11:15:02AM +0100, Anatoly Burakov wrote: > Parsers now return the final engine-specific rule rather than temporary > metadata. The generic flow layer passes this object to engine creation > and stores it in `flow->rule`. > > Rename the `meta` parameters and related local variables to reflect > their role as persistent rules. > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> > --- > drivers/net/intel/ice/ice_acl_filter.c | 36 +++++++++---------- > drivers/net/intel/ice/ice_fdir_filter.c | 8 ++--- > drivers/net/intel/ice/ice_generic_flow.c | 16 ++++----- > drivers/net/intel/ice/ice_generic_flow.h | 6 ++-- > drivers/net/intel/ice/ice_hash.c | 42 +++++++++++------------ > drivers/net/intel/ice/ice_switch_filter.c | 8 ++--- > 6 files changed, 58 insertions(+), 58 deletions(-) > > diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c > index 08695b554f1..fdd841b062d 100644 > --- a/drivers/net/intel/ice/ice_acl_filter.c > +++ b/drivers/net/intel/ice/ice_acl_filter.c > @@ -505,11 +505,11 @@ ice_acl_hw_rem_conf(struct ice_pf *pf, struct acl_rule *rule, int32_t entry_idx) > > static int > ice_acl_create_filter(struct ice_adapter *ad, > - void *meta, > + void *rule, > struct rte_flow_error *error) > { > - struct acl_rule *rule = meta; > - struct ice_acl_conf *filter = &rule->conf; > + struct acl_rule *acl_rule = rule; > + struct ice_acl_conf *filter = &acl_rule->conf; I dislike the churn that this rename causes. For this function can you not name the parameter "acl_rule" or even just "_rule" to avoid renaming the local variable? > enum ice_fltr_ptype flow_type = filter->input.flow_type; > struct ice_flow_action acts[1]; > struct ice_pf *pf = &ad->pf; > @@ -538,7 +538,7 @@ ice_acl_create_filter(struct ice_adapter *ad, > } > > input->acl_fltr = true; > - ret = ice_acl_hw_set_conf(pf, input, acts, rule, flow_type, 0); > + ret = ice_acl_hw_set_conf(pf, input, acts, acl_rule, flow_type, 0); > if (ret) { > return rte_flow_error_set(error, -ret, > RTE_FLOW_ERROR_TYPE_HANDLE, NULL, > @@ -547,29 +547,29 @@ ice_acl_create_filter(struct ice_adapter *ad, <snip> ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] net/ice: remove unused flow handle from engines 2026-10-21 10:15 [PATCH v1 1/2] net/ice: remove unused flow handle from engines Anatoly Burakov 2026-10-21 10:15 ` [PATCH v1 2/2] net/ice: rename flow metadata parameter to rule Anatoly Burakov @ 2026-10-21 10:17 ` Burakov, Anatoly 2026-10-21 10:19 ` Bruce Richardson 2026-10-21 10:52 ` [PATCH v2 1/3] " Anatoly Burakov 3 siblings, 0 replies; 11+ messages in thread From: Burakov, Anatoly @ 2026-10-21 10:17 UTC (permalink / raw) To: dev On 10/21/2026 12:15 PM, Anatoly Burakov wrote: > The generic flow layer now assigns the parsed rule to `flow->rule` > after successful creation. Engine create callbacks no longer use the > flow handle, and all four implementations mark it as unused. > > Remove the parameter from the callback type, declarations, > implementations and generic invocation. > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> > --- Missed a Suggested-by: Bruce Richardson <bruce.richardson@intel.com> -- Thanks, Anatoly ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v1 1/2] net/ice: remove unused flow handle from engines 2026-10-21 10:15 [PATCH v1 1/2] net/ice: remove unused flow handle from engines Anatoly Burakov 2026-10-21 10:15 ` [PATCH v1 2/2] net/ice: rename flow metadata parameter to rule Anatoly Burakov 2026-10-21 10:17 ` [PATCH v1 1/2] net/ice: remove unused flow handle from engines Burakov, Anatoly @ 2026-10-21 10:19 ` Bruce Richardson 2026-10-21 10:52 ` [PATCH v2 1/3] " Anatoly Burakov 3 siblings, 0 replies; 11+ messages in thread From: Bruce Richardson @ 2026-10-21 10:19 UTC (permalink / raw) To: Anatoly Burakov; +Cc: dev On Wed, Oct 21, 2026 at 11:15:01AM +0100, Anatoly Burakov wrote: > The generic flow layer now assigns the parsed rule to `flow->rule` > after successful creation. Engine create callbacks no longer use the > flow handle, and all four implementations mark it as unused. > > Remove the parameter from the callback type, declarations, > implementations and generic invocation. > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> > --- Acked-by: Bruce Richardson <bruce.richardson@intel.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 1/3] net/ice: remove unused flow handle from engines 2026-10-21 10:15 [PATCH v1 1/2] net/ice: remove unused flow handle from engines Anatoly Burakov ` (2 preceding siblings ...) 2026-10-21 10:19 ` Bruce Richardson @ 2026-10-21 10:52 ` Anatoly Burakov 2026-10-21 10:52 ` [PATCH v2 2/3] net/ice: rename flow metadata parameter to rule Anatoly Burakov ` (2 more replies) 3 siblings, 3 replies; 11+ messages in thread From: Anatoly Burakov @ 2026-10-21 10:52 UTC (permalink / raw) To: dev, Bruce Richardson The generic flow layer now assigns the parsed rule to `flow->rule` after successful creation. Engine create callbacks no longer use the flow handle, and all four implementations mark it as unused. Remove the parameter from the callback type, declarations, implementations and generic invocation. Suggested-by: Bruce Richardson <bruce.richardson@intel.com> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> --- drivers/net/intel/ice/ice_acl_filter.c | 1 - drivers/net/intel/ice/ice_fdir_filter.c | 1 - drivers/net/intel/ice/ice_generic_flow.c | 2 +- drivers/net/intel/ice/ice_generic_flow.h | 1 - drivers/net/intel/ice/ice_hash.c | 2 -- drivers/net/intel/ice/ice_switch_filter.c | 1 - 6 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c index 9414bb3f122..08695b554f1 100644 --- a/drivers/net/intel/ice/ice_acl_filter.c +++ b/drivers/net/intel/ice/ice_acl_filter.c @@ -505,7 +505,6 @@ ice_acl_hw_rem_conf(struct ice_pf *pf, struct acl_rule *rule, int32_t entry_idx) static int ice_acl_create_filter(struct ice_adapter *ad, - struct rte_flow *flow __rte_unused, void *meta, struct rte_flow_error *error) { diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c index f4c886dded3..e3f2cf2e3dd 100644 --- a/drivers/net/intel/ice/ice_fdir_filter.c +++ b/drivers/net/intel/ice/ice_fdir_filter.c @@ -1537,7 +1537,6 @@ ice_fdir_entry_del(struct ice_pf *pf, struct ice_fdir_fltr_pattern *key) static int ice_fdir_create_filter(struct ice_adapter *ad, - struct rte_flow *flow __rte_unused, void *meta, struct rte_flow_error *error) { diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c index 25aa7aa41e2..f5ae6f7d013 100644 --- a/drivers/net/intel/ice/ice_generic_flow.c +++ b/drivers/net/intel/ice/ice_generic_flow.c @@ -2269,7 +2269,7 @@ ice_parse_engine_create(struct ice_adapter *ad, RTE_ASSERT(parser->engine->create != NULL); - if (parser->engine->create(ad, flow, meta, error) != 0) { + if (parser->engine->create(ad, meta, error) != 0) { ice_flow_rule_free(parser->engine, meta); return false; } diff --git a/drivers/net/intel/ice/ice_generic_flow.h b/drivers/net/intel/ice/ice_generic_flow.h index efb3ee9b695..ca0f7abe9aa 100644 --- a/drivers/net/intel/ice/ice_generic_flow.h +++ b/drivers/net/intel/ice/ice_generic_flow.h @@ -506,7 +506,6 @@ struct ice_flow_redirect { typedef int (*engine_init_t)(struct ice_adapter *ad); typedef void (*engine_uninit_t)(struct ice_adapter *ad); typedef int (*engine_create_t)(struct ice_adapter *ad, - struct rte_flow *flow, void *meta, struct rte_flow_error *error); typedef int (*engine_destroy_t)(struct ice_adapter *ad, diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c index fe66b1dd5a6..980abb58f3b 100644 --- a/drivers/net/intel/ice/ice_hash.c +++ b/drivers/net/intel/ice/ice_hash.c @@ -82,7 +82,6 @@ ice_hash_init(struct ice_adapter *ad); static int ice_hash_create(struct ice_adapter *ad, - struct rte_flow *flow, void *meta, struct rte_flow_error *error); @@ -1314,7 +1313,6 @@ ice_hash_add_raw_cfg(struct ice_adapter *ad, static int ice_hash_create(struct ice_adapter *ad, - struct rte_flow *flow __rte_unused, void *meta, struct rte_flow_error *error) { diff --git a/drivers/net/intel/ice/ice_switch_filter.c b/drivers/net/intel/ice/ice_switch_filter.c index 4dd4707c406..59e18269206 100644 --- a/drivers/net/intel/ice/ice_switch_filter.c +++ b/drivers/net/intel/ice/ice_switch_filter.c @@ -285,7 +285,6 @@ ice_pattern_match_item ice_switch_supported_pattern[] = { static int ice_switch_create(struct ice_adapter *ad, - struct rte_flow *flow __rte_unused, void *meta, struct rte_flow_error *error) { -- 2.52.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v2 2/3] net/ice: rename flow metadata parameter to rule 2026-10-21 10:52 ` [PATCH v2 1/3] " Anatoly Burakov @ 2026-10-21 10:52 ` Anatoly Burakov 2026-10-21 16:24 ` Bruce Richardson 2026-10-21 10:52 ` [PATCH v2 3/3] net/ice: rename RSS flow configuration variables Anatoly Burakov 2026-10-22 11:50 ` [PATCH v2 1/3] net/ice: remove unused flow handle from engines Bruce Richardson 2 siblings, 1 reply; 11+ messages in thread From: Anatoly Burakov @ 2026-10-21 10:52 UTC (permalink / raw) To: dev, Bruce Richardson Parsers now return the final engine-specific rule rather than temporary metadata. The generic flow layer passes this object to engine creation and stores it in `flow->rule`. Rename the `meta` parameters and related local variables to reflect their role as persistent rules. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> --- drivers/net/intel/ice/ice_acl_filter.c | 8 ++++---- drivers/net/intel/ice/ice_fdir_filter.c | 8 ++++---- drivers/net/intel/ice/ice_generic_flow.c | 16 ++++++++-------- drivers/net/intel/ice/ice_generic_flow.h | 6 +++--- drivers/net/intel/ice/ice_hash.c | 12 ++++++------ drivers/net/intel/ice/ice_switch_filter.c | 8 ++++---- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/drivers/net/intel/ice/ice_acl_filter.c b/drivers/net/intel/ice/ice_acl_filter.c index 08695b554f1..21b48e10091 100644 --- a/drivers/net/intel/ice/ice_acl_filter.c +++ b/drivers/net/intel/ice/ice_acl_filter.c @@ -505,10 +505,10 @@ ice_acl_hw_rem_conf(struct ice_pf *pf, struct acl_rule *rule, int32_t entry_idx) static int ice_acl_create_filter(struct ice_adapter *ad, - void *meta, + void *flow_rule, struct rte_flow_error *error) { - struct acl_rule *rule = meta; + struct acl_rule *rule = flow_rule; struct ice_acl_conf *filter = &rule->conf; enum ice_fltr_ptype flow_type = filter->input.flow_type; struct ice_flow_action acts[1]; @@ -948,7 +948,7 @@ ice_acl_parse(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **flow_rule, struct rte_flow_error *error) { struct ci_flow_actions parsed_actions = {0}; @@ -1005,7 +1005,7 @@ ice_acl_parse(struct ice_adapter *ad, if (ret) goto error; - *meta = rule; + *flow_rule = rule; return 0; error: diff --git a/drivers/net/intel/ice/ice_fdir_filter.c b/drivers/net/intel/ice/ice_fdir_filter.c index e3f2cf2e3dd..0ff9c567196 100644 --- a/drivers/net/intel/ice/ice_fdir_filter.c +++ b/drivers/net/intel/ice/ice_fdir_filter.c @@ -1537,11 +1537,11 @@ ice_fdir_entry_del(struct ice_pf *pf, struct ice_fdir_fltr_pattern *key) static int ice_fdir_create_filter(struct ice_adapter *ad, - void *meta, + void *flow_rule, struct rte_flow_error *error) { struct ice_pf *pf = &ad->pf; - struct ice_fdir_filter_conf *filter = meta; + struct ice_fdir_filter_conf *filter = flow_rule; struct ice_fdir_info *fdir_info = &pf->fdir; struct ice_fdir_filter_conf *node; struct ice_fdir_fltr_pattern key; @@ -2975,7 +2975,7 @@ ice_fdir_parse(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **flow_rule, struct rte_flow_error *error) { struct ci_flow_actions parsed_actions = {0}; @@ -3047,7 +3047,7 @@ ice_fdir_parse(struct ice_adapter *ad, if (ret) goto error; - *meta = filter; + *flow_rule = filter; return ret; error: diff --git a/drivers/net/intel/ice/ice_generic_flow.c b/drivers/net/intel/ice/ice_generic_flow.c index f5ae6f7d013..1602691b1cc 100644 --- a/drivers/net/intel/ice/ice_generic_flow.c +++ b/drivers/net/intel/ice/ice_generic_flow.c @@ -2251,7 +2251,7 @@ ice_parse_engine_create(struct ice_adapter *ad, const struct rte_flow_action actions[], struct rte_flow_error *error) { - void *meta = NULL; + void *flow_rule = NULL; if (ICE_FLOW_ENGINE_DISABLED(ad->disabled_engine_mask, parser->engine->type)) { @@ -2264,17 +2264,17 @@ ice_parse_engine_create(struct ice_adapter *ad, if (parser->parse_pattern_action(ad, parser->array, parser->array_len, - pattern, actions, attr, &meta, error) < 0) + pattern, actions, attr, &flow_rule, error) < 0) return false; RTE_ASSERT(parser->engine->create != NULL); - if (parser->engine->create(ad, meta, error) != 0) { - ice_flow_rule_free(parser->engine, meta); + if (parser->engine->create(ad, flow_rule, error) != 0) { + ice_flow_rule_free(parser->engine, flow_rule); return false; } - flow->rule = meta; + flow->rule = flow_rule; return true; } @@ -2287,7 +2287,7 @@ ice_parse_engine_validate(struct ice_adapter *ad, const struct rte_flow_action actions[], struct rte_flow_error *error) { - void *meta = NULL; + void *flow_rule = NULL; int ret; if (ICE_FLOW_ENGINE_DISABLED(ad->disabled_engine_mask, @@ -2302,9 +2302,9 @@ ice_parse_engine_validate(struct ice_adapter *ad, parser->array, parser->array_len, pattern, actions, attr, - &meta, error); + &flow_rule, error); if (ret >= 0) - ice_flow_rule_free(parser->engine, meta); + ice_flow_rule_free(parser->engine, flow_rule); return ret >= 0; } diff --git a/drivers/net/intel/ice/ice_generic_flow.h b/drivers/net/intel/ice/ice_generic_flow.h index ca0f7abe9aa..b6eedaa202d 100644 --- a/drivers/net/intel/ice/ice_generic_flow.h +++ b/drivers/net/intel/ice/ice_generic_flow.h @@ -506,7 +506,7 @@ struct ice_flow_redirect { typedef int (*engine_init_t)(struct ice_adapter *ad); typedef void (*engine_uninit_t)(struct ice_adapter *ad); typedef int (*engine_create_t)(struct ice_adapter *ad, - void *meta, + void *flow_rule, struct rte_flow_error *error); typedef int (*engine_destroy_t)(struct ice_adapter *ad, struct rte_flow *flow, @@ -521,7 +521,7 @@ typedef int(*engine_redirect_t)(struct ice_adapter *ad, /* Free nested rule allocations only, without accessing hardware resources. */ typedef void (*engine_free_t)(void *rule); /* - * Parsers return an allocated final rule through meta on success, and clean up + * Parsers return an allocated final rule through flow_rule on success, and clean up * their own allocations on failure. The generic layer owns successful results, * including during validation; engine create/destroy callbacks must not free them. */ @@ -531,7 +531,7 @@ typedef int (*parse_pattern_action_t)(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **flow_rule, struct rte_flow_error *error); /* Struct to store engine created. */ diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c index 980abb58f3b..951a9d3aa2c 100644 --- a/drivers/net/intel/ice/ice_hash.c +++ b/drivers/net/intel/ice/ice_hash.c @@ -82,7 +82,7 @@ ice_hash_init(struct ice_adapter *ad); static int ice_hash_create(struct ice_adapter *ad, - void *meta, + void *flow_rule, struct rte_flow_error *error); static int @@ -100,7 +100,7 @@ ice_hash_parse_pattern_action(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **flow_rule, struct rte_flow_error *error); /* Rss configuration template */ @@ -1176,7 +1176,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **flow_rule, struct rte_flow_error *error) { struct ci_flow_actions parsed_actions = {0}; @@ -1239,7 +1239,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, error: if (!ret) - *meta = rss_meta_ptr; + *flow_rule = rss_meta_ptr; else rte_free(rss_meta_ptr); @@ -1313,7 +1313,7 @@ ice_hash_add_raw_cfg(struct ice_adapter *ad, static int ice_hash_create(struct ice_adapter *ad, - void *meta, + void *flow_rule, struct rte_flow_error *error) { struct ice_pf *pf = &ad->pf; @@ -1321,7 +1321,7 @@ ice_hash_create(struct ice_adapter *ad, struct ice_vsi *vsi = pf->main_vsi; int ret; uint32_t reg; - struct ice_hash_flow_cfg *filter_ptr = meta; + struct ice_hash_flow_cfg *filter_ptr = flow_rule; if (filter_ptr->simple_xor) { /* Enable registers for simple_xor hash function. */ diff --git a/drivers/net/intel/ice/ice_switch_filter.c b/drivers/net/intel/ice/ice_switch_filter.c index 59e18269206..8a550ed4c86 100644 --- a/drivers/net/intel/ice/ice_switch_filter.c +++ b/drivers/net/intel/ice/ice_switch_filter.c @@ -285,14 +285,14 @@ ice_pattern_match_item ice_switch_supported_pattern[] = { static int ice_switch_create(struct ice_adapter *ad, - void *meta, + void *flow_rule, struct rte_flow_error *error) { int ret = 0; struct ice_pf *pf = &ad->pf; struct ice_hw *hw = ICE_PF_TO_HW(pf); struct ice_rule_query_data rule_added = {0}; - struct ice_switch_filter_conf *filter_conf_ptr = meta; + struct ice_switch_filter_conf *filter_conf_ptr = flow_rule; struct ice_adv_lkup_elem *list = filter_conf_ptr->lkups; uint16_t lkups_cnt = filter_conf_ptr->lkups_num; struct ice_adv_rule_info *rule_info = &filter_conf_ptr->rule_info; @@ -1705,7 +1705,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, const struct rte_flow_item pattern[], const struct rte_flow_action actions[], const struct rte_flow_attr *attr, - void **meta, + void **flow_rule, struct rte_flow_error *error) { struct ice_pf *pf = &ad->pf; @@ -1845,7 +1845,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, filter->lkups = list; filter->lkups_num = lkups_num; filter->rule_info = rule_info; - *meta = filter; + *flow_rule = filter; return 0; -- 2.52.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 2/3] net/ice: rename flow metadata parameter to rule 2026-10-21 10:52 ` [PATCH v2 2/3] net/ice: rename flow metadata parameter to rule Anatoly Burakov @ 2026-10-21 16:24 ` Bruce Richardson 0 siblings, 0 replies; 11+ messages in thread From: Bruce Richardson @ 2026-10-21 16:24 UTC (permalink / raw) To: Anatoly Burakov; +Cc: dev On Wed, Oct 21, 2026 at 11:52:49AM +0100, Anatoly Burakov wrote: > Parsers now return the final engine-specific rule rather than temporary > metadata. The generic flow layer passes this object to engine creation > and stores it in `flow->rule`. > > Rename the `meta` parameters and related local variables to reflect > their role as persistent rules. > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> > --- Acked-by: Bruce Richardson <bruce.richardson@intel.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 3/3] net/ice: rename RSS flow configuration variables 2026-10-21 10:52 ` [PATCH v2 1/3] " Anatoly Burakov 2026-10-21 10:52 ` [PATCH v2 2/3] net/ice: rename flow metadata parameter to rule Anatoly Burakov @ 2026-10-21 10:52 ` Anatoly Burakov 2026-10-21 16:25 ` Bruce Richardson 2026-10-22 11:50 ` [PATCH v2 1/3] net/ice: remove unused flow handle from engines Bruce Richardson 2 siblings, 1 reply; 11+ messages in thread From: Anatoly Burakov @ 2026-10-21 10:52 UTC (permalink / raw) To: dev, Bruce Richardson RSS parsing now constructs the final flow configuration rather than temporary metadata, but its variable names still describe metadata. Rename `meta`, `rss_meta`, and `rss_meta_ptr` to `rss_conf` in the RSS flow parsing functions. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> --- drivers/net/intel/ice/ice_hash.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/intel/ice/ice_hash.c b/drivers/net/intel/ice/ice_hash.c index 951a9d3aa2c..2930aca2287 100644 --- a/drivers/net/intel/ice/ice_hash.c +++ b/drivers/net/intel/ice/ice_hash.c @@ -656,7 +656,7 @@ static int ice_hash_parse_raw_pattern(struct ice_adapter *ad, const struct rte_flow_item *item, struct rte_flow_error *error, - struct ice_hash_flow_cfg *meta) + struct ice_hash_flow_cfg *rss_conf) { const struct rte_flow_item_raw *raw_spec, *raw_mask; struct ice_parser_profile prof; @@ -744,7 +744,7 @@ ice_hash_parse_raw_pattern(struct ice_adapter *ad, if (ret) goto free_mem; - memcpy(&meta->rss_cfg.raw.prof, &prof, sizeof(prof)); + memcpy(&rss_conf->rss_cfg.raw.prof, &prof, sizeof(prof)); free_mem: free(pkt_buf); @@ -1122,7 +1122,7 @@ ice_hash_parse_action_check(const struct ci_flow_actions *actions, static int ice_hash_parse_rss_action(struct ice_pattern_match_item *pattern_match_item, const struct rte_flow_action_rss *rss, - uint64_t pattern_hint, struct ice_hash_flow_cfg *rss_meta, + uint64_t pattern_hint, struct ice_hash_flow_cfg *rss_conf, struct rte_flow_error *error) { struct ice_rss_hash_cfg *cfg = pattern_match_item->meta; @@ -1135,7 +1135,7 @@ ice_hash_parse_rss_action(struct ice_pattern_match_item *pattern_match_item, RTE_FLOW_ERROR_TYPE_ACTION_CONF, rss, "XOR hash function is only supported for empty pattern"); } - rss_meta->simple_xor = true; + rss_conf->simple_xor = true; return 0; } @@ -1145,7 +1145,7 @@ ice_hash_parse_rss_action(struct ice_pattern_match_item *pattern_match_item, /* If pattern type is raw, no need to refine rss type */ if (pattern_hint == ICE_PHINT_RAW) { - rss_meta->rss_cfg.raw.symm = symm; + rss_conf->rss_cfg.raw.symm = symm; return 0; } cfg->symm = symm; @@ -1162,8 +1162,8 @@ ice_hash_parse_rss_action(struct ice_pattern_match_item *pattern_match_item, RTE_FLOW_ERROR_TYPE_ACTION_CONF, rss, "RSS type not supported"); - rss_meta->rss_cfg.hash = *cfg; - ice_refine_hash_cfg(&rss_meta->rss_cfg.hash, + rss_conf->rss_cfg.hash = *cfg; + ice_refine_hash_cfg(&rss_conf->rss_cfg.hash, rss_type, pattern_hint); return 0; @@ -1190,7 +1190,7 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, }; const struct rte_flow_action_rss *rss; struct ice_pattern_match_item pattern_match_item; - struct ice_hash_flow_cfg *rss_meta_ptr; + struct ice_hash_flow_cfg *rss_conf; uint64_t phint = ICE_PHINT_NONE; int ret = 0; @@ -1202,11 +1202,11 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, if (ret) return ret; - rss_meta_ptr = rte_zmalloc(NULL, sizeof(*rss_meta_ptr), 0); - if (!rss_meta_ptr) { + rss_conf = rte_zmalloc(NULL, sizeof(*rss_conf), 0); + if (!rss_conf) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, - "No memory for rss_meta_ptr"); + "No memory for RSS configuration"); return -ENOMEM; } @@ -1223,8 +1223,8 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, if (phint == ICE_PHINT_RAW) { const struct rte_flow_item *raw_item = ice_pattern_skip_void(pattern); - rss_meta_ptr->rss_cfg.raw.raw_ena = true; - ret = ice_hash_parse_raw_pattern(ad, raw_item, error, rss_meta_ptr); + rss_conf->rss_cfg.raw.raw_ena = true; + ret = ice_hash_parse_raw_pattern(ad, raw_item, error, rss_conf); if (ret) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL, @@ -1235,13 +1235,13 @@ ice_hash_parse_pattern_action(__rte_unused struct ice_adapter *ad, rss = parsed_actions.actions[0]->conf; ret = ice_hash_parse_rss_action(&pattern_match_item, rss, phint, - rss_meta_ptr, error); + rss_conf, error); error: if (!ret) - *flow_rule = rss_meta_ptr; + *flow_rule = rss_conf; else - rte_free(rss_meta_ptr); + rte_free(rss_conf); return ret; } -- 2.52.0 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 3/3] net/ice: rename RSS flow configuration variables 2026-10-21 10:52 ` [PATCH v2 3/3] net/ice: rename RSS flow configuration variables Anatoly Burakov @ 2026-10-21 16:25 ` Bruce Richardson 0 siblings, 0 replies; 11+ messages in thread From: Bruce Richardson @ 2026-10-21 16:25 UTC (permalink / raw) To: Anatoly Burakov; +Cc: dev On Wed, Oct 21, 2026 at 11:52:50AM +0100, Anatoly Burakov wrote: > RSS parsing now constructs the final flow configuration rather than > temporary metadata, but its variable names still describe metadata. > > Rename `meta`, `rss_meta`, and `rss_meta_ptr` to `rss_conf` in the RSS > flow parsing functions. > > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> > --- Acked-by: Bruce Richardson <bruce.richardson@intel.com> ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 1/3] net/ice: remove unused flow handle from engines 2026-10-21 10:52 ` [PATCH v2 1/3] " Anatoly Burakov 2026-10-21 10:52 ` [PATCH v2 2/3] net/ice: rename flow metadata parameter to rule Anatoly Burakov 2026-10-21 10:52 ` [PATCH v2 3/3] net/ice: rename RSS flow configuration variables Anatoly Burakov @ 2026-10-22 11:50 ` Bruce Richardson 2 siblings, 0 replies; 11+ messages in thread From: Bruce Richardson @ 2026-10-22 11:50 UTC (permalink / raw) To: Anatoly Burakov; +Cc: dev On Wed, Oct 21, 2026 at 11:52:48AM +0100, Anatoly Burakov wrote: > The generic flow layer now assigns the parsed rule to `flow->rule` > after successful creation. Engine create callbacks no longer use the > flow handle, and all four implementations mark it as unused. > > Remove the parameter from the callback type, declarations, > implementations and generic invocation. > > Suggested-by: Bruce Richardson <bruce.richardson@intel.com> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> > Acked-by: Bruce Richardson <bruce.richardson@intel.com> > --- > drivers/net/intel/ice/ice_acl_filter.c | 1 - > drivers/net/intel/ice/ice_fdir_filter.c | 1 - > drivers/net/intel/ice/ice_generic_flow.c | 2 +- > drivers/net/intel/ice/ice_generic_flow.h | 1 - > drivers/net/intel/ice/ice_hash.c | 2 -- > drivers/net/intel/ice/ice_switch_filter.c | 1 - > 6 files changed, 1 insertion(+), 7 deletions(-) > Patch series applied to dpdk-next-net-intel. Thanks, /Bruce ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-10-22 11:50 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-10-21 10:15 [PATCH v1 1/2] net/ice: remove unused flow handle from engines Anatoly Burakov 2026-10-21 10:15 ` [PATCH v1 2/2] net/ice: rename flow metadata parameter to rule Anatoly Burakov 2026-10-21 10:23 ` Bruce Richardson 2026-10-21 10:17 ` [PATCH v1 1/2] net/ice: remove unused flow handle from engines Burakov, Anatoly 2026-10-21 10:19 ` Bruce Richardson 2026-10-21 10:52 ` [PATCH v2 1/3] " Anatoly Burakov 2026-10-21 10:52 ` [PATCH v2 2/3] net/ice: rename flow metadata parameter to rule Anatoly Burakov 2026-10-21 16:24 ` Bruce Richardson 2026-10-21 10:52 ` [PATCH v2 3/3] net/ice: rename RSS flow configuration variables Anatoly Burakov 2026-10-21 16:25 ` Bruce Richardson 2026-10-22 11:50 ` [PATCH v2 1/3] net/ice: remove unused flow handle from engines Bruce Richardson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox