From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B4955A04B1; Fri, 28 Aug 2020 04:50:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6D1A1BC24; Fri, 28 Aug 2020 04:50:02 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 244EA255; Fri, 28 Aug 2020 04:49:59 +0200 (CEST) IronPort-SDR: Xxg5rUlcQ6EgnyyFx2QPNBVhRevDc/5LEMA3q/QukZdkFoxxgHCUPWHKB8ZSAcqBhK7uaRseu3 MA3ekRZhQ2zg== X-IronPort-AV: E=McAfee;i="6000,8403,9726"; a="154013829" X-IronPort-AV: E=Sophos;i="5.76,362,1592895600"; d="scan'208";a="154013829" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Aug 2020 19:49:58 -0700 IronPort-SDR: fCulUpMD3ZafuzwVO7r2+Om9U2BOf1elFXuT5DFuvfFA/8smm7Jq1estLCe0r4saytadeG9kme JHWFVy99pg/Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,362,1592895600"; d="scan'208";a="313453365" Received: from dpdk.sh.intel.com ([10.239.255.12]) by orsmga002.jf.intel.com with ESMTP; 27 Aug 2020 19:49:54 -0700 From: Guinan Sun To: dev@dpdk.org Cc: Qi Zhang , Qiming Yang , Guinan Sun , stable@dpdk.org Date: Fri, 28 Aug 2020 02:33:28 +0000 Message-Id: <20200828023328.62492-1-guinanx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] net/ice: fix flow validation for unsupported patterns X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 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 --- 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