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 7A930A0516; Tue, 9 Jun 2020 13:56:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 66D5F2C58; Tue, 9 Jun 2020 13:56:12 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id E483D2BF5 for ; Tue, 9 Jun 2020 13:56:09 +0200 (CEST) IronPort-SDR: 3Q8/rWqexNviPlenekfL45sv4m+8Z4h/2JSZhzNSS/gsI0i3+Hj9hYfBFjFZ1cn8sASxfOcbZT ZdLfRYFZxzxQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jun 2020 04:56:09 -0700 IronPort-SDR: t4Q77/2VwUIjKYSaDv9jc3FBV1tvt9DIeMxCqQfeL58xv1Mt4jzntZk/j6rdJ/NHGGPV99aPi1 ur9ZD5h4CIZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,491,1583222400"; d="scan'208";a="473043934" Received: from dpdk51.sh.intel.com ([10.67.111.82]) by fmsmga005.fm.intel.com with ESMTP; 09 Jun 2020 04:56:08 -0700 From: Qi Zhang To: qiming.yang@intel.com Cc: xiaolong.ye@intel.com, dev@dpdk.org, Qi Zhang , Yahui Cao , "Paul M . Stillwell Jr" Date: Tue, 9 Jun 2020 19:59:12 +0800 Message-Id: <20200609120001.35110-4-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20200609120001.35110-1-qi.z.zhang@intel.com> References: <20200603024016.30636-1-qi.z.zhang@intel.com> <20200609120001.35110-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 v2 03/52] 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