net/iavf: fix error logs

Message ID 20210510122050.32668-2-alvinx.zhang@intel.com (mailing list archive)
State Superseded, archived
Headers
Series net/iavf: fix error logs |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS

Commit Message

Alvin Zhang May 10, 2021, 12:20 p.m. UTC
  Remove some useless logs which are duplicated of the lower-level
function logs and may confuse users when running VF without some
features supportted by PF.

Fixes: 5a038d19962d ("net/iavf: fix RSS configuration on i40e VF")
Fixes: 95f2f0e9fc2a ("net/iavf: improve default RSS")

Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
---
 drivers/net/iavf/iavf_vchnl.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)
  

Comments

Qi Zhang May 11, 2021, 8:35 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Alvin Zhang
> Sent: Monday, May 10, 2021 8:21 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Xu, Ting <ting.xu@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>
> Subject: [dpdk-dev] [PATCH] net/iavf: fix error logs
> 
> Remove some useless logs which are duplicated of the lower-level function
> logs and may confuse users when running VF without some features
> supportted by PF.
> 
> Fixes: 5a038d19962d ("net/iavf: fix RSS configuration on i40e VF")
> Fixes: 95f2f0e9fc2a ("net/iavf: improve default RSS")
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> ---
>  drivers/net/iavf/iavf_vchnl.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c index
> ca5c56e..dfa7ce3 100644
> --- a/drivers/net/iavf/iavf_vchnl.c
> +++ b/drivers/net/iavf/iavf_vchnl.c
> @@ -1519,11 +1519,8 @@
>  	args.out_size = IAVF_AQ_BUF_SZ;
> 
>  	err = iavf_execute_vf_cmd(adapter, &args);
> -	if (err) {
> -		PMD_DRV_LOG(ERR,
> -			    "Failed to execute command of
> OP_GET_RSS_HENA_CAPS");

I don't think we should remove these logs, it help us to understand which command virtchnl failed.

> +	if (err)
>  		return err;
> -	}
> 
>  	*caps = ((struct virtchnl_rss_hena *)args.out_buffer)->hena;
>  	return 0;
> @@ -1535,7 +1532,6 @@
>  	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
>  	struct virtchnl_rss_hena vrh;
>  	struct iavf_cmd_info args;
> -	int err;
> 
>  	vrh.hena = hena;
>  	args.ops = VIRTCHNL_OP_SET_RSS_HENA;
> @@ -1544,12 +1540,7 @@
>  	args.out_buffer = vf->aq_resp;
>  	args.out_size = IAVF_AQ_BUF_SZ;
> 
> -	err = iavf_execute_vf_cmd(adapter, &args);
> -	if (err)
> -		PMD_DRV_LOG(ERR,
> -			    "Failed to execute command of OP_SET_RSS_HENA");

Same as above.

> -
> -	return err;
> +	return iavf_execute_vf_cmd(adapter, &args);
>  }
> 
>  int
> --
> 1.8.3.1
  

Patch

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index ca5c56e..dfa7ce3 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -1519,11 +1519,8 @@ 
 	args.out_size = IAVF_AQ_BUF_SZ;
 
 	err = iavf_execute_vf_cmd(adapter, &args);
-	if (err) {
-		PMD_DRV_LOG(ERR,
-			    "Failed to execute command of OP_GET_RSS_HENA_CAPS");
+	if (err)
 		return err;
-	}
 
 	*caps = ((struct virtchnl_rss_hena *)args.out_buffer)->hena;
 	return 0;
@@ -1535,7 +1532,6 @@ 
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	struct virtchnl_rss_hena vrh;
 	struct iavf_cmd_info args;
-	int err;
 
 	vrh.hena = hena;
 	args.ops = VIRTCHNL_OP_SET_RSS_HENA;
@@ -1544,12 +1540,7 @@ 
 	args.out_buffer = vf->aq_resp;
 	args.out_size = IAVF_AQ_BUF_SZ;
 
-	err = iavf_execute_vf_cmd(adapter, &args);
-	if (err)
-		PMD_DRV_LOG(ERR,
-			    "Failed to execute command of OP_SET_RSS_HENA");
-
-	return err;
+	return iavf_execute_vf_cmd(adapter, &args);
 }
 
 int