diff mbox series

[v3,2/6] net/ice: refactor structure field

Message ID 20210302025407.1197434-3-zhirun.yan@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers show
Series Refactor FDIR pattern parser | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Zhirun Yan March 2, 2021, 2:54 a.m. UTC
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 <zhirun.yan@intel.com>
---
 drivers/net/ice/ice_ethdev.h      | 4 ++--
 drivers/net/ice/ice_fdir_filter.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

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,