From: Zhirun Yan Date: Tue, 2 Mar 2021 02:54:03 +0000 (+0800) Subject: net/ice: refactor flow director filter structure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=387e72ed7f7f5d5336c3aafe50bb2b81f2c73080;p=dpdk.git net/ice: refactor flow director filter structure This patch use input_set_o and input_set_i to distinguish inner/outer input set. input_set_i is only used for inner field. Signed-off-by: Zhirun Yan Acked-by: Qi Zhang --- diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h index 7a7a5d5bfb..2a8a8169d5 100644 --- a/drivers/net/ice/ice_ethdev.h +++ b/drivers/net/ice/ice_ethdev.h @@ -301,8 +301,8 @@ struct ice_fdir_filter_conf { struct ice_fdir_counter *counter; /* flow specific counter context */ struct rte_flow_action_count act_count; - uint64_t input_set; - uint64_t outer_input_set; /* only for tunnel packets outer fields */ + uint64_t input_set_o; /* used for non-tunnel or tunnel outer fields */ + uint64_t input_set_i; /* only for tunnel inner fields */ uint32_t mark_flag; }; diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c index 4e99df1272..570ec56058 100644 --- a/drivers/net/ice/ice_fdir_filter.c +++ b/drivers/net/ice/ice_fdir_filter.c @@ -1249,7 +1249,7 @@ ice_fdir_create_filter(struct ice_adapter *ad, is_tun = ice_fdir_is_tunnel_profile(filter->tunnel_type); ret = ice_fdir_input_set_conf(pf, filter->input.flow_type, - filter->input_set, filter->outer_input_set, + filter->input_set_i, filter->input_set_o, filter->tunnel_type); if (ret) { rte_flow_error_set(error, -ret, @@ -1982,7 +1982,7 @@ ice_fdir_parse_pattern(__rte_unused struct ice_adapter *ad, filter->tunnel_type = tunnel_type; filter->input.flow_type = flow_type; - filter->input_set = input_set; + filter->input_set_o = input_set; return 0; } @@ -2011,7 +2011,7 @@ ice_fdir_parse(struct ice_adapter *ad, ret = ice_fdir_parse_pattern(ad, pattern, error, filter); if (ret) goto error; - input_set = filter->input_set | filter->outer_input_set; + input_set = filter->input_set_o | filter->input_set_i; if (!input_set || input_set & ~item->input_set_mask) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM_SPEC,