From patchwork Tue May 11 01:50:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvin Zhang X-Patchwork-Id: 93118 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 722C2A0C44; Tue, 11 May 2021 03:50:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF6B040140; Tue, 11 May 2021 03:50:11 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 35A564003C; Tue, 11 May 2021 03:50:10 +0200 (CEST) IronPort-SDR: vPdRNiWzv8nebXTYZ0mHsGYiJLct4PGd+U2sFgoOaGUvZ5AJRsLv6d/NYaN6AKYBIagS9WYGq8 x9HL2UD9wStQ== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="199007752" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="199007752" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 18:50:09 -0700 IronPort-SDR: N3FPI+ygm00vTdSwPKyFXvOsoAH8HUMjRovp4R9fBdbbaC1+zCYC4UFMqn7tDDO84JKJajthRB URvbaWB7lAVg== X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="454743269" 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 18:50:07 -0700 From: Alvin Zhang To: beilei.xing@intel.com, Ting.Xu@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Date: Tue, 11 May 2021 09:50:00 +0800 Message-Id: <20210511015002.16644-1-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 Tue May 11 01:50:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvin Zhang X-Patchwork-Id: 93119 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 778EEA0C44; Tue, 11 May 2021 03:50:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49413410FF; Tue, 11 May 2021 03:50:14 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 77C024003C; Tue, 11 May 2021 03:50:11 +0200 (CEST) IronPort-SDR: ir75Ivd6u9lAForqz38afz9mb90yENFXUZHyN8sF90cunDX9X7TYwDIRf8+Fhmd5LLL4ORr4BB ihiuNNkgv6aA== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="199007757" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="199007757" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 18:50:11 -0700 IronPort-SDR: YtgcMzAKAhxo4U4Z/FyAup8EULhMz4gJrnvf1dk11E36lyfUzHrDEUDpuUuskKJjqOuT3LtZ5+ BwWKV40/shag== X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="454743281" 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 18:50:09 -0700 From: Alvin Zhang To: beilei.xing@intel.com, Ting.Xu@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Date: Tue, 11 May 2021 09:50:01 +0800 Message-Id: <20210511015002.16644-2-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210511015002.16644-1-alvinx.zhang@intel.com> References: <20210511015002.16644-1-alvinx.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 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 Tue May 11 01:50:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alvin Zhang X-Patchwork-Id: 93120 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 B60A0A0C44; Tue, 11 May 2021 03:50:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C38C44110B; Tue, 11 May 2021 03:50:15 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 6A504410F4; Tue, 11 May 2021 03:50:13 +0200 (CEST) IronPort-SDR: qNWSonhPY8vVvXxJMznWCMiio6coDSitX+k2/8McHG8dK/2w51hJtWyPldHrHq7FbGcSjbUkA0 7Qc6LkpKtetQ== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="199007763" X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="199007763" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 18:50:13 -0700 IronPort-SDR: HXAB9AQbu2D1+/nYaiWi/BjM4BbznrVI0jHsgZ9vlgWefHkCzoVZPotqL8ZNpQ5X3n5rr4sjvV I3qNlZYBaOaQ== X-IronPort-AV: E=Sophos;i="5.82,290,1613462400"; d="scan'208";a="454743300" 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 18:50:11 -0700 From: Alvin Zhang To: beilei.xing@intel.com, Ting.Xu@intel.com Cc: dev@dpdk.org, Alvin Zhang , stable@dpdk.org Date: Tue, 11 May 2021 09:50:02 +0800 Message-Id: <20210511015002.16644-3-alvinx.zhang@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210511015002.16644-1-alvinx.zhang@intel.com> References: <20210511015002.16644-1-alvinx.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 3/3] net/iavf: fix V-channel message 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",