From: Haiyue Wang <haiyue.wang@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, Haiyue Wang <haiyue.wang@intel.com>,
Qiming Yang <qiming.yang@intel.com>
Subject: [dpdk-dev] [PATCH v1] net/ice: remove the redundant function type
Date: Mon, 29 Mar 2021 12:56:26 +0800 [thread overview]
Message-ID: <20210329045626.461621-1-haiyue.wang@intel.com> (raw)
The function 'ice_is_profile_rule' is defined as 'ice_is_prof_rule' in
base code, which has the exactly same function body.
So remove the 'ice_is_profile_rule', use the 'ice_is_prof_rule' instead.
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
---
drivers/net/ice/ice_switch_filter.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index bc7771abd5..0bf3660677 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1534,26 +1534,6 @@ ice_switch_check_action(const struct rte_flow_action *actions,
return 0;
}
-static bool
-ice_is_profile_rule(enum ice_sw_tunnel_type tun_type)
-{
- switch (tun_type) {
- case ICE_SW_TUN_PROFID_IPV6_ESP:
- case ICE_SW_TUN_PROFID_IPV6_AH:
- case ICE_SW_TUN_PROFID_MAC_IPV6_L2TPV3:
- case ICE_SW_TUN_PROFID_IPV6_NAT_T:
- case ICE_SW_TUN_PROFID_IPV4_PFCP_NODE:
- case ICE_SW_TUN_PROFID_IPV4_PFCP_SESSION:
- case ICE_SW_TUN_PROFID_IPV6_PFCP_NODE:
- case ICE_SW_TUN_PROFID_IPV6_PFCP_SESSION:
- return true;
- default:
- break;
- }
-
- return false;
-}
-
static int
ice_switch_parse_pattern_action(struct ice_adapter *ad,
struct ice_pattern_match_item *array,
@@ -1633,7 +1613,7 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad,
inputset = ice_switch_inset_get
(pattern, error, list, &lkups_num, &tun_type);
- if ((!inputset && !ice_is_profile_rule(tun_type)) ||
+ if ((!inputset && !ice_is_prof_rule(tun_type)) ||
(inputset & ~pattern_match_item->input_set_mask_o)) {
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM_SPEC,
--
2.31.1
next reply other threads:[~2021-03-29 5:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 4:56 Haiyue Wang [this message]
2021-03-29 9:51 ` Zhang, Qi Z
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210329045626.461621-1-haiyue.wang@intel.com \
--to=haiyue.wang@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=qiming.yang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).