From: Wei Zhao <wei.zhao1@intel.com>
To: dev@dpdk.org
Cc: qi.z.zhang@intel.com, nannan.lu@intel.com,
Wei Zhao <wei.zhao1@intel.com>
Subject: [dpdk-dev] [PATCH 1/2] net/ice/base: fix tunnel type check for PPPoE
Date: Tue, 7 Jul 2020 17:40:47 +0800 [thread overview]
Message-ID: <20200707094048.17690-2-wei.zhao1@intel.com> (raw)
In-Reply-To: <20200707094048.17690-1-wei.zhao1@intel.com>
This patch fix tunnel type check for PPPoE type of recipe
when search for recipe which has been created before, and
also fix a bug of typo.
Fixes: 418d2563d10b ("net/ice/base: get tunnel type for recipe")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
drivers/net/ice/base/ice_switch.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 0e220580a..caa080da2 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -1086,15 +1086,11 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid)
tun_type = ICE_SW_TUN_PPPOE;
else if (!non_tun_valid && gtp_valid)
tun_type = ICE_SW_TUN_GTP;
- else if ((non_tun_valid && vxlan_valid) ||
- (non_tun_valid && gre_valid) ||
- (non_tun_valid && gtp_valid) ||
- (non_tun_valid && pppoe_valid))
+ else if (non_tun_valid &&
+ (vxlan_valid || gre_valid || gtp_valid || pppoe_valid))
tun_type = ICE_SW_TUN_AND_NON_TUN;
- else if ((non_tun_valid && !vxlan_valid) ||
- (non_tun_valid && !gre_valid) ||
- (non_tun_valid && !gtp_valid) ||
- (non_tun_valid && !pppoe_valid))
+ else if (non_tun_valid && !vxlan_valid && !gre_valid && !gtp_valid &&
+ !pppoe_valid)
tun_type = ICE_NON_TUN;
if (profile_num > 1 && tun_type == ICE_SW_TUN_PPPOE) {
@@ -1108,7 +1104,7 @@ static enum ice_sw_tunnel_type ice_get_tun_type_for_recipe(u8 rid)
tun_type = ICE_SW_TUN_PPPOE_IPV6;
}
- if (profile_num == 1 && (flag_valid || non_tun_valid)) {
+ if (profile_num == 1 && (flag_valid || non_tun_valid || pppoe_valid)) {
for (j = 0; j < ICE_MAX_NUM_PROFILES; j++) {
if (ice_is_bit_set(recipe_to_profile[rid], j)) {
switch (j) {
--
2.19.1
next prev parent reply other threads:[~2020-07-07 10:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 9:40 [dpdk-dev] [PATCH 0/2] update base code batch 4 Wei Zhao
2020-07-07 9:40 ` Wei Zhao [this message]
2020-07-07 9:40 ` [dpdk-dev] [PATCH 2/2] net/ice/base: fix add special words for tunnel rule Wei Zhao
2020-07-08 0:39 ` [dpdk-dev] [PATCH 0/2] update base code batch 4 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=20200707094048.17690-2-wei.zhao1@intel.com \
--to=wei.zhao1@intel.com \
--cc=dev@dpdk.org \
--cc=nannan.lu@intel.com \
--cc=qi.z.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).