DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2 1/3] net/i40e: fix return status for unsupported VF message
@ 2021-05-11  1:50 Alvin Zhang
  2021-05-11  1:50 ` [dpdk-dev] [PATCH v2 2/3] common/iavf: fix V-channel status Alvin Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alvin Zhang @ 2021-05-11  1:50 UTC (permalink / raw)
  To: beilei.xing, Ting.Xu; +Cc: dev, Alvin Zhang, stable

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 <alvinx.zhang@intel.com>
---
 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;
 	}
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v2 2/3] common/iavf: fix V-channel status
  2021-05-11  1:50 [dpdk-dev] [PATCH v2 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
@ 2021-05-11  1:50 ` Alvin Zhang
  2021-05-11  1:50 ` [dpdk-dev] [PATCH v2 3/3] net/iavf: fix V-channel message status Alvin Zhang
  2021-05-11  2:02 ` [dpdk-dev] [PATCH v3 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
  2 siblings, 0 replies; 7+ messages in thread
From: Alvin Zhang @ 2021-05-11  1:50 UTC (permalink / raw)
  To: beilei.xing, Ting.Xu; +Cc: dev, Alvin Zhang, stable

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 <alvinx.zhang@intel.com>
---
 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,
 };
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v2 3/3] net/iavf: fix V-channel message status
  2021-05-11  1:50 [dpdk-dev] [PATCH v2 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
  2021-05-11  1:50 ` [dpdk-dev] [PATCH v2 2/3] common/iavf: fix V-channel status Alvin Zhang
@ 2021-05-11  1:50 ` Alvin Zhang
  2021-05-11  2:02 ` [dpdk-dev] [PATCH v3 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
  2 siblings, 0 replies; 7+ messages in thread
From: Alvin Zhang @ 2021-05-11  1:50 UTC (permalink / raw)
  To: beilei.xing, Ting.Xu; +Cc: dev, Alvin Zhang, stable

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 <alvinx.zhang@intel.com>
---
 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",
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v3 1/3] net/i40e: fix return status for unsupported VF message
  2021-05-11  1:50 [dpdk-dev] [PATCH v2 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
  2021-05-11  1:50 ` [dpdk-dev] [PATCH v2 2/3] common/iavf: fix V-channel status Alvin Zhang
  2021-05-11  1:50 ` [dpdk-dev] [PATCH v2 3/3] net/iavf: fix V-channel message status Alvin Zhang
@ 2021-05-11  2:02 ` Alvin Zhang
  2021-05-11  2:02   ` [dpdk-dev] [PATCH v3 2/3] common/iavf: fix V-channel status Alvin Zhang
  2021-05-11  2:02   ` [dpdk-dev] [PATCH v3 3/3] net/iavf: fix V-channel message status Alvin Zhang
  2 siblings, 2 replies; 7+ messages in thread
From: Alvin Zhang @ 2021-05-11  2:02 UTC (permalink / raw)
  To: beilei.xing, Ting.Xu; +Cc: dev, Alvin Zhang, stable

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 <alvinx.zhang@intel.com>
---
 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;
 	}
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v3 2/3] common/iavf: fix V-channel status
  2021-05-11  2:02 ` [dpdk-dev] [PATCH v3 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
@ 2021-05-11  2:02   ` Alvin Zhang
  2021-05-11  2:40     ` Xing, Beilei
  2021-05-11  2:02   ` [dpdk-dev] [PATCH v3 3/3] net/iavf: fix V-channel message status Alvin Zhang
  1 sibling, 1 reply; 7+ messages in thread
From: Alvin Zhang @ 2021-05-11  2:02 UTC (permalink / raw)
  To: beilei.xing, Ting.Xu; +Cc: dev, Alvin Zhang, stable

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 <alvinx.zhang@intel.com>
---
 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,
 };
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v3 3/3] net/iavf: fix V-channel message status
  2021-05-11  2:02 ` [dpdk-dev] [PATCH v3 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
  2021-05-11  2:02   ` [dpdk-dev] [PATCH v3 2/3] common/iavf: fix V-channel status Alvin Zhang
@ 2021-05-11  2:02   ` Alvin Zhang
  1 sibling, 0 replies; 7+ messages in thread
From: Alvin Zhang @ 2021-05-11  2:02 UTC (permalink / raw)
  To: beilei.xing, Ting.Xu; +Cc: dev, Alvin Zhang, stable

Add support of VIRTCHNL_STATUS_ERR_NOT_IMPLEMENTED for facilitating
compatibility with PF.

Change 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 <alvinx.zhang@intel.com>
---
 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",
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v3 2/3] common/iavf: fix V-channel status
  2021-05-11  2:02   ` [dpdk-dev] [PATCH v3 2/3] common/iavf: fix V-channel status Alvin Zhang
@ 2021-05-11  2:40     ` Xing, Beilei
  0 siblings, 0 replies; 7+ messages in thread
From: Xing, Beilei @ 2021-05-11  2:40 UTC (permalink / raw)
  To: Zhang, AlvinX, Xu, Ting; +Cc: dev, stable



> -----Original Message-----
> From: Zhang, AlvinX <alvinx.zhang@intel.com>
> Sent: Tuesday, May 11, 2021 10:03 AM
> To: Xing, Beilei <beilei.xing@intel.com>; Xu, Ting <ting.xu@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH v3 2/3] common/iavf: fix V-channel status
> 
> 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 <alvinx.zhang@intel.com>
> ---
>  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_IMPLEMENTED is not defined in released shared code.
Please keep align with kernel driver.

>  	VIRTCHNL_STATUS_ERR_NOT_SUPPORTED		= -64,
>  };
> 
> --
> 1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-11  2:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11  1:50 [dpdk-dev] [PATCH v2 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
2021-05-11  1:50 ` [dpdk-dev] [PATCH v2 2/3] common/iavf: fix V-channel status Alvin Zhang
2021-05-11  1:50 ` [dpdk-dev] [PATCH v2 3/3] net/iavf: fix V-channel message status Alvin Zhang
2021-05-11  2:02 ` [dpdk-dev] [PATCH v3 1/3] net/i40e: fix return status for unsupported VF message Alvin Zhang
2021-05-11  2:02   ` [dpdk-dev] [PATCH v3 2/3] common/iavf: fix V-channel status Alvin Zhang
2021-05-11  2:40     ` Xing, Beilei
2021-05-11  2:02   ` [dpdk-dev] [PATCH v3 3/3] net/iavf: fix V-channel message status Alvin Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).