From patchwork Tue Mar 2 02:54:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yan, Zhirun" X-Patchwork-Id: 88337 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BDFA0A054F; Tue, 2 Mar 2021 04:01:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 877451CC3CE; Tue, 2 Mar 2021 04:01:36 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id ACF0D4069B for ; Tue, 2 Mar 2021 04:01:32 +0100 (CET) IronPort-SDR: DcPsXMZsgrli0DXTLZo3cKTSuRZSHITZ/v5dLDPzIBpPrw1AnXQIpx+J2SSUW/XJLgieTnNuEn TFmv47eotaaw== X-IronPort-AV: E=McAfee;i="6000,8403,9910"; a="183270150" X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="183270150" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2021 19:01:32 -0800 IronPort-SDR: zMleuSSWVlir1Ih9SDnzqH+sdBfoteXMa4oFUZ2Xpt8buN+b5O2BMTzgY6MezEzqtfnp4/YG62 jRThj+EwnkXg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,216,1610438400"; d="scan'208";a="366967399" Received: from dpdk-zhirun-dev.sh.intel.com ([10.67.118.176]) by orsmga003.jf.intel.com with ESMTP; 01 Mar 2021 19:01:29 -0800 From: Zhirun Yan To: dev@dpdk.org, qi.z.zhang@intel.com, yahui.cao@intel.com, xiao.w.wang@intel.com, junfeng.guo@intel.com Cc: simei.su@intel.com, ting.xu@intel.com, yuying.zhang@intel.com, xuan.ding@intel.com, Zhirun Yan Date: Tue, 2 Mar 2021 10:54:03 +0800 Message-Id: <20210302025407.1197434-3-zhirun.yan@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210302025407.1197434-1-zhirun.yan@intel.com> References: <20210127052933.2149243-1-zhirun.yan@intel.com> <20210302025407.1197434-1-zhirun.yan@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3 2/6] net/ice: refactor structure field X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- drivers/net/ice/ice_ethdev.h | 4 ++-- drivers/net/ice/ice_fdir_filter.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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,