From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 93D94A034C for ; Fri, 29 Apr 2022 10:11:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6FA04410E3; Fri, 29 Apr 2022 10:11:03 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 28B50410E3 for ; Fri, 29 Apr 2022 10:11:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651219862; x=1682755862; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=fa23/TX4N3vQ0xPoxoU+FrMELXwsm7Yn0pqDbEsMrXA=; b=JNAF/peXBhmDvdOVd2K5R9TDiejz3Q5DTLG2jf3qTeNrOWVvZhnK1LoP d4epRuJkufPF971QSma93nXKRi82/FABBa1aA7GQJrbSm3xP9xMTKhF/3 QXOIj70Zzb6dwJi7IGBktXCnfI3yQNYnvsNpHzYdKAQUmLIgIuiiBXgP/ nianGaxDzWbqODf9rWJe0pPZ/pCAdBxgnuwbV+BgBibWS05p9Fgu8urWa tuv2IF55Bryhl4G+iQgbxUTDOv3W68fe8h0X7lcdDovDns1oQPRVEUYsn KbDGwRHB/WuXfeYIU+Rs0bAy3CYBdmAm0G9FvPVjwdCX2TUsSFrGWy4d6 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10331"; a="265419426" X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="265419426" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 01:11:00 -0700 X-IronPort-AV: E=Sophos;i="5.91,297,1647327600"; d="scan'208";a="581979927" Received: from unknown (HELO localhost.localdomain) ([10.239.251.253]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2022 01:10:58 -0700 From: peng1x.zhang@intel.com To: yidingx.zhou@intel.com Cc: Peng Zhang , stable@dpdk.org Subject: [PATCH] net/ice: modify related error code to avoid misleading Date: Fri, 29 Apr 2022 16:05:10 +0000 Message-Id: <20220429160510.718487-1-peng1x.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Peng Zhang Modify related error code to avoid misleading when fail to create rule. Signed-off-by: Peng Zhang 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