From patchwork Mon May 10 12:20:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvin Zhang X-Patchwork-Id: 93090 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D09D5A0A0E; Mon, 10 May 2021 14:21:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4763040140; Mon, 10 May 2021 14:21:01 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id AE9324003E; Mon, 10 May 2021 14:20:58 +0200 (CEST) IronPort-SDR: QUDoQlkFoYCvpNSdJfWVjUIzd/4JE2k5T6jMwNWX2RaJGUjnrHKJKKCgcWUtdyHFQsvDPu4HLG lFfape4I1dEw== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="196085952" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="196085952" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 05:20:57 -0700 IronPort-SDR: seMqUj0310ENuxm55ji7U0hLCa48JO+k/EhHlp7AwWLrN1VSrRfA3jLX4Rie93+9kndf7b+VwY 1niJazQEomUg== X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="454392039" Received: from shwdenpg235.ccr.corp.intel.com ([10.240.182.60]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 05:20:55 -0700 From: Alvin Zhang To: beilei.xing@intel.com, Ting.Xu@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Date: Mon, 10 May 2021 20:20:47 +0800 Message-Id: <20210510122050.32668-1-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 1/3] net/i40e: fix return status for unsupported VF message 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" This patch modifies the return status for unsupported VF messages, in order to make it the same as the return status of the kernel driver. Fixes: 4861cde46116 ("i40e: new poll mode driver") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/i40e/i40e_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c index 9804ed4..308da1b 100644 --- a/drivers/net/i40e/i40e_pf.c +++ b/drivers/net/i40e/i40e_pf.c @@ -1464,8 +1464,8 @@ */ default: PMD_DRV_LOG(ERR, "%u received, not supported", opcode); - i40e_pf_host_send_msg_to_vf(vf, opcode, I40E_ERR_PARAM, - NULL, 0); + i40e_pf_host_send_msg_to_vf(vf, opcode, + I40E_ERR_NOT_IMPLEMENTED, NULL, 0); break; } From patchwork Mon May 10 12:20:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvin Zhang X-Patchwork-Id: 93092 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06570A0A0E; Mon, 10 May 2021 14:21:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3C1441113; Mon, 10 May 2021 14:21:04 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id DFAF6410E3; Mon, 10 May 2021 14:21:01 +0200 (CEST) IronPort-SDR: rs0g6LSTr30W7IhijGhGMKX+B/1ArTcc3uHBAtO/Jsqdl8dcixLbzYYwo373UFlMK4Lmgj+Rrr 627OTfqirohA== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="196085962" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="196085962" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 05:21:01 -0700 IronPort-SDR: KOU9nYLwOjdA6Kt3A8LjVpxBVf0od+pisizYHMQpTDcMo8BKAhTvbQeSjEBxlsxHWaH3sxkmHZ jkp5ig9fY6SA== X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="454392080" Received: from shwdenpg235.ccr.corp.intel.com ([10.240.182.60]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 05:20:59 -0700 From: Alvin Zhang To: beilei.xing@intel.com, Ting.Xu@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Date: Mon, 10 May 2021 20:20:49 +0800 Message-Id: <20210510122050.32668-3-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210510122050.32668-1-alvinx.zhang@intel.com> References: <20210510122050.32668-1-alvinx.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/3] common/iavf: fix V-channel status 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" Add VIRTCHNL_STATUS_ERR_NOT_IMPLEMENTED to enum virtchnl_status_code. Fixes: e5b2a9e957e7 ("net/avf/base: add base code for avf PMD") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang --- drivers/common/iavf/virtchnl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/common/iavf/virtchnl.h b/drivers/common/iavf/virtchnl.h index 3a60faf..0558c99 100644 --- a/drivers/common/iavf/virtchnl.h +++ b/drivers/common/iavf/virtchnl.h @@ -47,6 +47,7 @@ enum virtchnl_status_code { VIRTCHNL_STATUS_ERR_CQP_COMPL_ERROR = -39, VIRTCHNL_STATUS_ERR_INVALID_VF_ID = -40, VIRTCHNL_STATUS_ERR_ADMIN_QUEUE_ERROR = -53, + VIRTCHNL_STATUS_ERR_NOT_IMPLEMENTED = -60, VIRTCHNL_STATUS_ERR_NOT_SUPPORTED = -64, }; From patchwork Mon May 10 12:20:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvin Zhang X-Patchwork-Id: 93093 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 16958A0A0E; Mon, 10 May 2021 14:27:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F19FD41104; Mon, 10 May 2021 14:27:07 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 8D0424003E; Mon, 10 May 2021 14:27:06 +0200 (CEST) IronPort-SDR: 0vxsRm2VAryURZZKqxr7YQ4riM8wcGl/haVFZBLEqALTEbo1HBHdylbkcRa/JBvoSx5ua7xEgO YuF32VubRiGg== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="196085969" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="196085969" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 05:21:03 -0700 IronPort-SDR: 9h+efY77gaMfYEXd9m3pAwQgUOncz5lboYp4ZJ0XM3Jpc3e6hF7OSgaWvdTRnmM8Z9mzy10ATp keAe7s3coAjw== X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="454392101" Received: from shwdenpg235.ccr.corp.intel.com ([10.240.182.60]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 05:21:01 -0700 From: Alvin Zhang To: beilei.xing@intel.com, Ting.Xu@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Date: Mon, 10 May 2021 20:20:50 +0800 Message-Id: <20210510122050.32668-4-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210510122050.32668-1-alvinx.zhang@intel.com> References: <20210510122050.32668-1-alvinx.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 3/3] net/iavf: fix V-channel status 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" Add support of VIRTCHNL_STATUS_ERR_NOT_IMPLEMENTED for facilitating compatibility with PF. Chang the error log-level from ERROR to WARNING when a V-channel message is not supported by PF, because the VF may still be able to run without certain features which not supported by PF. Fixes: 0c35eecfe8b5 ("net/iavf: fix VF to PF command failure handling") Cc: stable@dpdk.org Signed-off-by: Alvin Zhang --- drivers/net/iavf/iavf_vchnl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index 5d57e8b..ca5c56e 100644 --- a/drivers/net/iavf/iavf_vchnl.c +++ b/drivers/net/iavf/iavf_vchnl.c @@ -234,8 +234,10 @@ _clear_cmd(vf); err = -EIO; } else if (vf->cmd_retval == - VIRTCHNL_STATUS_ERR_NOT_SUPPORTED) { - PMD_DRV_LOG(ERR, "Cmd %d not supported", args->ops); + VIRTCHNL_STATUS_ERR_NOT_SUPPORTED || + vf->cmd_retval == + VIRTCHNL_STATUS_ERR_NOT_IMPLEMENTED) { + PMD_DRV_LOG(WARNING, "Cmd %d not supported", args->ops); err = -ENOTSUP; } else if (vf->cmd_retval != VIRTCHNL_STATUS_SUCCESS) { PMD_DRV_LOG(ERR, "Return failure %d for cmd %d",