net/i40e: fix return status for unsupported VF message
PATCH v2 1/3 net/i40e: fix return status for unsupported VF message
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.
--- drivers/net/i40e/i40e_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/i40e/i40e_pf.c +2 -2
@@ -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 ; }
Signature · 1 line
1.8.3.1
PATCH v2 2/3 common/iavf: fix V-channel status
Add VIRTCHNL_STATUS_ERR_NOT_IMPLEMENTED to enum virtchnl_status_code.
--- drivers/common/iavf/virtchnl.h | 1 + 1 file changed, 1 insertion(+)
drivers/common/iavf/virtchnl.h +1 -0
@@ -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, };
Signature · 1 line
1.8.3.1
PATCH v2 3/3 net/iavf: fix V-channel message status
In reply to Alvin ZhangAdd 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.
--- drivers/net/iavf/iavf_vchnl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_vchnl.c +4 -2
@@ -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",
Signature · 1 line
1.8.3.1
PATCH v3 1/3 net/i40e: fix return status for unsupported VF message
In reply to Alvin ZhangThis patch modifies the return status for unsupported VF messages, in order to make it the same as the return status of the kernel driver.
--- drivers/net/i40e/i40e_pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/i40e/i40e_pf.c +2 -2
@@ -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 ; }
Signature · 1 line
1.8.3.1
PATCH v3 2/3 common/iavf: fix V-channel status
Add VIRTCHNL_STATUS_ERR_NOT_IMPLEMENTED to enum virtchnl_status_code.
--- drivers/common/iavf/virtchnl.h | 1 + 1 file changed, 1 insertion(+)
drivers/common/iavf/virtchnl.h +1 -0
@@ -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, };
Signature · 1 line
1.8.3.1
Re: [dpdk-dev] [PATCH v3 2/3] common/iavf: fix V-channel status
Quoted 26 lines
-----Original Message-----
From: Zhang, AlvinX <[email protected]>
Sent: Tuesday, May 11, 2021 10:03 AM
To: Xing, Beilei <[email protected]>; Xu, Ting <[email protected]>
Cc: [email protected]; Zhang, AlvinX <[email protected]>; [email protected]
Subject: [PATCH v3 2/3] common/iavf: fix V-channel statusAdd
VIRTCHNL_STATUS_ERR_NOT_IMPLEMENTEDto enumvirtchnl_status_code.Fixes e5b2a9e957e7 ("net/avf/base: add base code for avf PMD")Signed-off-by Alvin Zhang <[email protected]>--- drivers/common/iavf/virtchnl.h | 1 + 1 file changed, 1 insertion(+)drivers/common/iavf/virtchnl.h +0
-0
drivers/common/iavf/virtchnl.h enum virtchnl_status_code { · line 50
Quoted 4 lines
drivers/common/iavf/virtchnl.h +1
-0@@ -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.
Quoted 5 lines
drivers/common/iavf/virtchnl.h +0
-1VIRTCHNL_STATUS_ERR_NOT_SUPPORTED = -64, }; --1.8.3.1
PATCH v3 3/3 net/iavf: fix V-channel message status
In reply to Alvin ZhangAdd 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.
--- drivers/net/iavf/iavf_vchnl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_vchnl.c +4 -2
@@ -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",
Signature · 1 line
1.8.3.1