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 9E459A0546; Wed, 26 May 2021 11:49:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1ED4F4067C; Wed, 26 May 2021 11:49:53 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 32E0E40150; Wed, 26 May 2021 11:49:51 +0200 (CEST) IronPort-SDR: lvbCcm6EUroyEzKprviPNRG9Y0FXgxneF6wXIcl6DCEGyfciTSG5NcKqRbHfi9npX4YoUu0d/n 8eQPKa6s3HJQ== X-IronPort-AV: E=McAfee;i="6200,9189,9995"; a="189803006" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="189803006" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 02:49:48 -0700 IronPort-SDR: sc+yMR7qkbj8Y1zZb/zXvfONoBYuKASw00U/2L60LRX0k1BpTqG+Rt6nmPsp2v5vVpEBTwpvkZ OattN6MEEYTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="476856860" Received: from dpdk51.sh.intel.com ([10.67.111.142]) by orsmga001.jf.intel.com with ESMTP; 26 May 2021 02:49:46 -0700 From: Qi Zhang To: beilei.xing@intel.com Cc: dev@dpdk.org, Qi Zhang , stable@dpdk.org Date: Wed, 26 May 2021 17:53:05 +0800 Message-Id: <20210526095305.1060069-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/iavf: fix error handle for unsupported promisc configure 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 Sender: "dev" iavf_execute_vf_cmd returns standard error code but not IAVF_xxx, The patch fix the wrong error handling in iavf_config_promisc. Fixes: 1e4d55a7fe71 ("net/iavf: optimize promiscuous device operations") Cc: stable@dpdk.org Signed-off-by: Qi Zhang --- drivers/net/iavf/iavf_vchnl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 5d57e8b541..02e828f9b7 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -1257,8 +1257,8 @@ iavf_config_promisc(struct iavf_adapter *adapter, PMD_DRV_LOG(ERR, "fail to execute command CONFIG_PROMISCUOUS_MODE"); - if (err == IAVF_NOT_SUPPORTED) - return -ENOTSUP; + if (err == -ENOTSUP) + return err; return -EAGAIN; } -- 2.26.2