From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>
Subject: [dpdk-dev] [PATCH v2 10/14] net/ice/base: add priority check of matching recipe
Date: Tue, 13 Apr 2021 13:06:36 +0800 [thread overview]
Message-ID: <20210413050640.2586033-11-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20210413050640.2586033-1-qi.z.zhang@intel.com>
Check priority when look for a recipe which matches our request
to enable flow priority for switch filter.
Signed-off-by: Yuying Zhang <yuying.zhang@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
drivers/net/ice/base/ice_switch.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index d4203f2730..db0cc03324 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -6574,7 +6574,7 @@ static struct ice_protocol_entry ice_prot_id_tbl[ICE_PROTOCOL_LAST] = {
* Returns index of matching recipe, or ICE_MAX_NUM_RECIPES if not found.
*/
static u16 ice_find_recp(struct ice_hw *hw, struct ice_prot_lkup_ext *lkup_exts,
- enum ice_sw_tunnel_type tun_type)
+ enum ice_sw_tunnel_type tun_type, u32 priority)
{
bool refresh_required = true;
struct ice_sw_recipe *recp;
@@ -6636,7 +6636,8 @@ static u16 ice_find_recp(struct ice_hw *hw, struct ice_prot_lkup_ext *lkup_exts,
/* If for "i"th recipe the found was never set to false
* then it means we found our match
*/
- if (tun_type == recp[i].tun_type && found)
+ if (tun_type == recp[i].tun_type && found &&
+ priority == recp[i].priority)
return i; /* Return the recipe ID */
}
}
@@ -7650,7 +7651,7 @@ ice_add_adv_recipe(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
}
/* Look for a recipe which matches our requested fv / mask list */
- *rid = ice_find_recp(hw, lkup_exts, rinfo->tun_type);
+ *rid = ice_find_recp(hw, lkup_exts, rinfo->tun_type, rinfo->priority);
if (*rid < ICE_MAX_NUM_RECIPES)
/* Success if found a recipe that match the existing criteria */
goto err_unroll;
@@ -8779,7 +8780,7 @@ ice_rem_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
if (status)
return status;
- rid = ice_find_recp(hw, &lkup_exts, rinfo->tun_type);
+ rid = ice_find_recp(hw, &lkup_exts, rinfo->tun_type, rinfo->priority);
/* If did not find a recipe that match the existing criteria */
if (rid == ICE_MAX_NUM_RECIPES)
return ICE_ERR_PARAM;
--
2.26.2
next prev parent reply other threads:[~2021-04-13 5:04 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-29 14:14 [dpdk-dev] [PATCH 0/8] ice: base code update batch 2 Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 1/8] net/ice/base: code cleanup Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 2/8] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 3/8] net/ice/base: print link configure error Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 4/8] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 5/8] net/ice/base: set MAC type for E823C device Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 6/8] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 7/8] net/ice/base: enable I2C read/write commands Qi Zhang
2021-03-29 14:14 ` [dpdk-dev] [PATCH 8/8] net/ice/base: add RSS support for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 00/14] base code update batch 2 Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 01/14] net/ice/base: code cleanup Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 02/14] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 03/14] net/ice/base: print link configure error Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 04/14] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 05/14] net/ice/base: set MAC type for E823C device Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 06/14] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 07/14] net/ice/base: enable I2C read/write commands Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 08/14] net/ice/base: add RSS support for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 09/14] net/ice/base: add set/get GPIO helper functions Qi Zhang
2021-04-13 5:06 ` Qi Zhang [this message]
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 11/14] net/ice/base: add inner VLAN protocol type for QinQ filter Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 12/14] net/ice/base: fix QinQ PPPoE dummy pkt selection Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 13/14] net/ice/base: add PTYPE values for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 5:06 ` [dpdk-dev] [PATCH v2 14/14] net/ice/base: allow support for GTP-U filter using only inner protocols Qi Zhang
2021-04-13 6:16 ` [dpdk-dev] [PATCH v2 00/14] base code update batch 2 Yang, Qiming
2021-04-13 11:38 ` Ferruh Yigit
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 00/14] ice: " Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 01/14] net/ice/base: code cleanup Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 02/14] net/ice/base: support removing VSI from flow profile Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 03/14] net/ice/base: print link configure error Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 04/14] net/ice/base: remove unused ptype field in PTT definition Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 05/14] net/ice/base: set MAC type for E823C device Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 06/14] net/ice/base: add RSS support for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 07/14] net/ice/base: change protocol ID for VLAN in case of DVM Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 08/14] net/ice/base: add priority check of matching recipe Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 09/14] net/ice/base: enable I2C read/write commands Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 10/14] net/ice/base: add set/get GPIO helper functions Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 11/14] net/ice/base: add inner VLAN protocol type for QinQ filter Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 12/14] net/ice/base: fix QinQ PPPoE dummy pkt selection Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 13/14] net/ice/base: add PTYPE values for PPPoL2TPv2oUDP Qi Zhang
2021-04-13 14:30 ` [dpdk-dev] [PATCH v3 14/14] net/ice/base: allow support for GTP-U filter using only inner protocols Qi Zhang
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=20210413050640.2586033-11-qi.z.zhang@intel.com \
--to=qi.z.zhang@intel.com \
--cc=dev@dpdk.org \
--cc=qiming.yang@intel.com \
--cc=yuying.zhang@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).