DPDK patches and discussions
 help / color / mirror / Atom feed
From: Guinan Sun <guinanx.sun@intel.com>
To: dev@dpdk.org
Cc: Qi Zhang <qi.z.zhang@intel.com>,
	Qiming Yang <qiming.yang@intel.com>,
	Guinan Sun <guinanx.sun@intel.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/ice: fix flow validation for unsupported patterns
Date: Fri, 28 Aug 2020 02:33:28 +0000	[thread overview]
Message-ID: <20200828023328.62492-1-guinanx.sun@intel.com> (raw)

When loading the OS default package and the pipeline mode is enabled
by the "pipeline-mode-support=1" operation. In this case, the wrong
parser is selected for processing and it will cause the unsupported
patterns(pppoes/pfcp/l2tpv3/esp/ah) to be validated successfully.
This patch corrects the parser selection issue.

Fixes: 47d460d63233 ("net/ice: rework switch filter")
Cc: stable@dpdk.org

Signed-off-by: Guinan Sun <guinanx.sun@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index c4b00b6a2..884fbaae2 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1806,7 +1806,8 @@ ice_switch_init(struct ice_adapter *ad)
 	else
 		return -EINVAL;
 
-	if (ad->devargs.pipe_mode_support)
+	if (ad->devargs.pipe_mode_support &&
+	    ad->active_pkg_type != ICE_PKG_TYPE_OS_DEFAULT)
 		ret = ice_register_parser(perm_parser, ad);
 	else
 		ret = ice_register_parser(dist_parser, ad);
@@ -1824,7 +1825,8 @@ ice_switch_uninit(struct ice_adapter *ad)
 	else
 		dist_parser = &ice_switch_dist_parser_os;
 
-	if (ad->devargs.pipe_mode_support)
+	if (ad->devargs.pipe_mode_support &&
+	    ad->active_pkg_type != ICE_PKG_TYPE_OS_DEFAULT)
 		ice_unregister_parser(perm_parser, ad);
 	else
 		ice_unregister_parser(dist_parser, ad);
-- 
2.17.1


             reply	other threads:[~2020-08-28  2:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28  2:33 Guinan Sun [this message]
2020-08-31  4:22 ` Zhang, Qi Z
2020-09-01  7:19   ` Sun, GuinanX
2020-09-08  3:15 ` [dpdk-dev] [PATCH v2] " Guinan Sun
2020-09-09  8:48   ` 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=20200828023328.62492-1-guinanx.sun@intel.com \
    --to=guinanx.sun@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    /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).