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 88E93A0093; Mon, 15 Jun 2020 04:01:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F30491B203; Mon, 15 Jun 2020 04:01:29 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id ECB7B4C87 for ; Mon, 15 Jun 2020 04:01:23 +0200 (CEST) IronPort-SDR: vgn0eR0GQ6vfk7kGlPY26ncMI235b4j4xmt+ksfhEwmexpiaOae9IIu54/XsLZ3IJBtWhS0Cx3 f1UJnWv3lpQw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2020 19:01:23 -0700 IronPort-SDR: f521p83gS6Lz1PoWSPZgsND9K+IS6+O4sgFMOO5EE8YGsSeECSX6LuCfFNqGAcfAJM22IJBB7O MWPHoJRktsQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,513,1583222400"; d="scan'208";a="298318802" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by fmsmga004.fm.intel.com with ESMTP; 14 Jun 2020 19:01:21 -0700 From: Qi Zhang To: ferruh.yigit@intel.com Cc: xiaolong.ye@intel.com, qiming.yang@intel.com, dev@dpdk.org, Qi Zhang , Yahui Cao , "Paul M . Stillwell Jr" Date: Mon, 15 Jun 2020 10:04:25 +0800 Message-Id: <20200615020515.1359-4-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200615020515.1359-1-qi.z.zhang@intel.com> References: <20200603024016.30636-1-qi.z.zhang@intel.com> <20200615020515.1359-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 03/53] net/ice/base: disable profile merge for FDIR 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" For Flow Director, we don't want to re-use an existed profile with the same field vector and mask. Merging two different flow_type’s field vector will also make them sharing trained rule and cause rule interference. For example: issue rule A: IPV4_TCP matching tcp src&dst port 80 to queue 8 issue rule B: IPV6_TCP matching tcp src&dst port 200 to queue 20 Below behavior is found but not expected: IPV4_TCP pkt with src&dst port 200 hits rule B and goes to queue 20 IPV6_TCP pkt with src&dst port 80 hits rule A and goes to queue 8 Signed-off-by: Yahui Cao Signed-off-by: Paul M. Stillwell Jr Signed-off-by: Qi Zhang --- drivers/net/ice/base/ice_flex_pipe.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c index 512ced6b8..1f7a05969 100644 --- a/drivers/net/ice/base/ice_flex_pipe.c +++ b/drivers/net/ice/base/ice_flex_pipe.c @@ -2811,6 +2811,12 @@ ice_find_prof_id_with_mask(struct ice_hw *hw, enum ice_block blk, struct ice_es *es = &hw->blk[blk].es; u8 i; + /* For FD, we don't want to re-use an existed profile with the same + * field vector and mask. This will cause rule interference. + */ + if (blk == ICE_BLK_FD) + return ICE_ERR_DOES_NOT_EXIST; + for (i = 0; i < (u8)es->count; i++) { u16 off = i * es->fvw; -- 2.13.6