patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/ice: modify related error code to avoid misleading
@ 2022-04-29 16:05 peng1x.zhang
  0 siblings, 0 replies; only message in thread
From: peng1x.zhang @ 2022-04-29 16:05 UTC (permalink / raw)
  To: yidingx.zhou; +Cc: Peng Zhang, stable

From: Peng Zhang <peng1x.zhang@intel.com>

Modify related error code to avoid misleading when fail to create rule.

Signed-off-by: Peng Zhang <peng1x.zhang@intel.com>

Fixes: 285f63fc6bb7 ("net/ice: track DCF state of PF")
Cc: stable@dpdk.org
---
 drivers/net/ice/ice_switch_filter.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 36c9bffb73..80c6a076eb 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -433,11 +433,12 @@ ice_switch_create(struct ice_adapter *ad,
 
 		flow->rule = filter_conf_ptr;
 	} else {
-		if (ice_dcf_adminq_need_retry(ad))
-			ret = -EAGAIN;
+		if (ice_dcf_adminq_need_retry(ad) && ret!= ICE_ERR_ALREADY_EXISTS)
+			ret = -EBUSY;
+		else if(ret == ICE_ERR_ALREADY_EXISTS)
+			ret = -EALREADY;
 		else
 			ret = -EINVAL;
-
 		rte_flow_error_set(error, -ret,
 			RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
 			"switch filter create flow fail");
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-29  8:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29 16:05 [PATCH] net/ice: modify related error code to avoid misleading peng1x.zhang

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git