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 D6E9CA00C4; Thu, 5 May 2022 09:45:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C2D814281D; Thu, 5 May 2022 09:45:41 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 2205F40042; Thu, 5 May 2022 09:45:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651736740; x=1683272740; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=uyFRV/Kjz2NAkXlQ48EwIlYnmXRIEyiczzEt0iBMMJQ=; b=njmkjcsUpEO4dCkdO2Lt8urv2aJLgnF7PKoHJ29FY8QYoN6fLl3YplQ8 MBO3g/fy6XjVUM5RivdpR9RxUQ4t+OMH682L3oB9uT+ZpcFszOVBqPj6c qS6dJ5GQr+NgFsVGkuB9a6y/R6DrSub8sY5LCdFcBoN2ECWgdDuYUGtJB fcoLJtNG1Wkwx3OYEluu4QXwLNNu29JWHkYjQVrbBIBp4ZxQ2PwB3aE1u C9Raxdl94MPTncbiR7Ufn4zKXUM+99Flb39uHLgKmd4yxxqZKurIJL5fk hStGJafgKn71HkBAgOIRLUuO1HnvjiO1Sx2S28M10jMfwc31/OzoIZjgY g==; X-IronPort-AV: E=McAfee;i="6400,9594,10337"; a="248567751" X-IronPort-AV: E=Sophos;i="5.91,200,1647327600"; d="scan'208";a="248567751" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 00:45:38 -0700 X-IronPort-AV: E=Sophos;i="5.91,200,1647327600"; d="scan'208";a="563121431" Received: from unknown (HELO localhost.localdomain) ([10.239.251.253]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 00:45:35 -0700 From: peng1x.zhang@intel.com To: qiming.yang@intel.com, qi.z.zhang@intel.com, yidingx.zhou@intel.com, dev@dpdk.org Cc: Peng Zhang , stable@dpdk.org Subject: [PATCH] net/ice: Modify DCF state checking mechanism and error code Date: Thu, 5 May 2022 15:39:32 +0000 Message-Id: <20220505153932.401749-1-peng1x.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Peng Zhang Add DCF state checking mechanism which will conduct whether reset is done.And modify error code to avoid misleading. Fixes: b71573ec2fc2 ("net/ice: retry getting VF VSI map after failure") Cc: stable@dpdk.org Signed-off-by: Peng Zhang --- drivers/net/ice/ice_dcf.c | 3 ++- drivers/net/ice/ice_switch_filter.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c index 7f0c074b01..3808272ea3 100644 --- a/drivers/net/ice/ice_dcf.c +++ b/drivers/net/ice/ice_dcf.c @@ -544,7 +544,8 @@ ice_dcf_handle_vsi_update_event(struct ice_dcf_hw *hw) for (;;) { if (ice_dcf_get_vf_resource(hw) == 0 && - ice_dcf_get_vf_vsi_map(hw) >= 0) { + ice_dcf_get_vf_vsi_map(hw) >= 0 && + ice_dcf_check_reset_done(hw) == 0) { err = 0; break; } diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 36c9bffb73..199a981018 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -434,7 +434,7 @@ ice_switch_create(struct ice_adapter *ad, flow->rule = filter_conf_ptr; } else { if (ice_dcf_adminq_need_retry(ad)) - ret = -EAGAIN; + ret = -EBUSY; else ret = -EINVAL; -- 2.25.1