DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: qiming.yang@intel.com
Cc: zhichaox.zeng@intel.com, dev@dpdk.org, Qi Zhang <qi.z.zhang@intel.com>
Subject: [PATCH v3 2/5] net/ice: refine flow engine disabling
Date: Tue, 12 Sep 2023 06:00:38 -0400	[thread overview]
Message-ID: <20230912100041.3697012-3-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20230912100041.3697012-1-qi.z.zhang@intel.com>

Only use "disable_engine_mask" for flow engine disabling

In PF mode, only ACL engine will be disabled.
In DCF mode, FDIR and HASH engine will be disabled.
In DCF mode with "acl=off", ACL engine will also be
disabled.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/ice_acl_filter.c  | 3 ---
 drivers/net/ice/ice_dcf_parent.c  | 3 +++
 drivers/net/ice/ice_ethdev.c      | 1 +
 drivers/net/ice/ice_fdir_filter.c | 3 ---
 drivers/net/ice/ice_hash.c        | 3 ---
 5 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/net/ice/ice_acl_filter.c b/drivers/net/ice/ice_acl_filter.c
index f2ddbd7b9b..51f4feced4 100644
--- a/drivers/net/ice/ice_acl_filter.c
+++ b/drivers/net/ice/ice_acl_filter.c
@@ -995,9 +995,6 @@ ice_acl_init(struct ice_adapter *ad)
 	struct ice_hw *hw = ICE_PF_TO_HW(pf);
 	struct ice_flow_parser *parser = &ice_acl_parser;
 
-	if (!ad->hw.dcf_enabled)
-		return 0;
-
 	ret = ice_acl_prof_alloc(hw);
 	if (ret) {
 		PMD_DRV_LOG(ERR, "Cannot allocate memory for "
diff --git a/drivers/net/ice/ice_dcf_parent.c b/drivers/net/ice/ice_dcf_parent.c
index ad98a531de..0a20f6b4ca 100644
--- a/drivers/net/ice/ice_dcf_parent.c
+++ b/drivers/net/ice/ice_dcf_parent.c
@@ -475,6 +475,9 @@ ice_dcf_init_parent_adapter(struct rte_eth_dev *eth_dev)
 	if (ice_devargs_check(eth_dev->device->devargs, ICE_DCF_DEVARG_ACL))
 		parent_adapter->disabled_engine_mask |= BIT(ICE_FLOW_ENGINE_ACL);
 
+	parent_adapter->disabled_engine_mask |= BIT(ICE_FLOW_ENGINE_FDIR);
+	parent_adapter->disabled_engine_mask |= BIT(ICE_FLOW_ENGINE_HASH);
+
 	err = ice_flow_init(parent_adapter);
 	if (err) {
 		PMD_INIT_LOG(ERR, "Failed to initialize flow");
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 036b068c22..f744bde8f4 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -2442,6 +2442,7 @@ ice_dev_init(struct rte_eth_dev *dev)
 	}
 
 	if (!ad->is_safe_mode) {
+		ad->disabled_engine_mask |= BIT(ICE_FLOW_ENGINE_ACL);
 		ret = ice_flow_init(ad);
 		if (ret) {
 			PMD_INIT_LOG(ERR, "Failed to initialize flow");
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index e9ee5a57d6..bc43883a92 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -1150,9 +1150,6 @@ ice_fdir_init(struct ice_adapter *ad)
 	struct ice_flow_parser *parser;
 	int ret;
 
-	if (ad->hw.dcf_enabled)
-		return 0;
-
 	ret = ice_fdir_setup(pf);
 	if (ret)
 		return ret;
diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c
index e36e7da2b5..37bee808c6 100644
--- a/drivers/net/ice/ice_hash.c
+++ b/drivers/net/ice/ice_hash.c
@@ -591,9 +591,6 @@ ice_hash_init(struct ice_adapter *ad)
 {
 	struct ice_flow_parser *parser = NULL;
 
-	if (ad->hw.dcf_enabled)
-		return 0;
-
 	parser = &ice_hash_parser;
 
 	return ice_register_parser(parser, ad);
-- 
2.31.1


  parent reply	other threads:[~2023-09-12  1:40 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 20:26 [PATCH 0/2] refactor rte_flow Qi Zhang
2023-08-14 20:26 ` [PATCH 1/2] net/ice: remove pipeline mode Qi Zhang
2023-08-14 20:26 ` [PATCH 2/2] net/ice: map group to pipeline stage Qi Zhang
2023-09-11 16:51 ` [PATCH v2 0/2] refactor rte_flow Qi Zhang
2023-09-11 16:51   ` [PATCH v2 1/2] net/ice: remove pipeline mode Qi Zhang
2023-09-11 16:51   ` [PATCH v2 2/2] net/ice: map group to pipeline stage Qi Zhang
2023-09-12 10:00 ` [PATCH v3 0/5] refactor rte_flow Qi Zhang
2023-09-12 10:00   ` [PATCH v3 1/5] net/ice: remove pipeline mode Qi Zhang
2023-09-12 10:00   ` Qi Zhang [this message]
2023-09-12 10:00   ` [PATCH v3 3/5] net/ice: map group to pipeline stage Qi Zhang
2023-09-12 10:00   ` [PATCH v3 4/5] net/ice: refine supported flow pattern name Qi Zhang
2023-09-12 10:00   ` [PATCH v3 5/5] doc: add generic flow doc for ice PMD Qi Zhang
2023-09-25 10:33 ` [PATCH v4 0/5] net/ice: refactor rte_flow Qi Zhang
2023-09-25 10:33   ` [PATCH v4 1/5] net/ice: remove pipeline mode Qi Zhang
2023-09-25 10:33   ` [PATCH v4 2/5] net/ice: refine flow engine disabling Qi Zhang
2023-09-25 10:33   ` [PATCH v4 3/5] net/ice: map group to pipeline stage Qi Zhang
2023-09-25 10:33   ` [PATCH v4 4/5] net/ice: refine supported flow pattern name Qi Zhang
2023-09-25 10:33   ` [PATCH v4 5/5] doc: add generic flow doc for ice PMD Qi Zhang
2023-09-26 11:29 ` [PATCH v5 0/5] net/ice: refactor rte_flow Qi Zhang
2023-09-26 11:29   ` [PATCH v5 1/5] net/ice: remove pipeline mode Qi Zhang
2023-09-26 11:29   ` [PATCH v5 2/5] net/ice: refine flow engine disabling Qi Zhang
2023-09-26 11:29   ` [PATCH v5 3/5] net/ice: map group to pipeline stage Qi Zhang
2023-09-26 11:29   ` [PATCH v5 4/5] net/ice: refine supported flow pattern name Qi Zhang
2023-09-26 11:29   ` [PATCH v5 5/5] doc: add generic flow doc for ice PMD Qi Zhang
2023-09-27  2:42     ` Zeng, ZhichaoX
2023-09-27  3:08       ` Zhang, Qi Z
2023-10-13 13:17     ` Thomas Monjalon
2023-10-26 10:43       ` 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=20230912100041.3697012-3-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qiming.yang@intel.com \
    --cc=zhichaox.zeng@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).