[v2] vhost: decrease log level for unimplemented requests

Message ID 20230206150733.108910-1-maxime.coquelin@redhat.com (mailing list archive)
State Accepted, archived
Delegated to: Maxime Coquelin
Headers
Series [v2] vhost: decrease log level for unimplemented requests |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS

Commit Message

Maxime Coquelin Feb. 6, 2023, 3:07 p.m. UTC
  This patch changes VHOST_USER_SET_VRING_ERR and
VHOST_USER_SET_LOG_FD "not implemented" log levels from
INFO to DEBUG, as implementing these requests is not
mandatory. Having them being displayed at INFO level
may induce some confusion to the end-user.

Fixes: fd29c33b651a ("vhost: handle unsupported message types in functions")
Cc: stable@dpdk.org

Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/vhost_user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Chenbo Xia Feb. 7, 2023, 2:57 a.m. UTC | #1
> -----Original Message-----
> From: Maxime Coquelin <maxime.coquelin@redhat.com>
> Sent: Monday, February 6, 2023 11:08 PM
> To: dev@dpdk.org; Xia, Chenbo <chenbo.xia@intel.com>; ktraynor@redhat.com;
> david.marchand@redhat.com
> Cc: Maxime Coquelin <maxime.coquelin@redhat.com>; stable@dpdk.org
> Subject: [PATCH v2] vhost: decrease log level for unimplemented requests
> 
> This patch changes VHOST_USER_SET_VRING_ERR and
> VHOST_USER_SET_LOG_FD "not implemented" log levels from
> INFO to DEBUG, as implementing these requests is not
> mandatory. Having them being displayed at INFO level
> may induce some confusion to the end-user.
> 
> Fixes: fd29c33b651a ("vhost: handle unsupported message types in
> functions")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>  lib/vhost/vhost_user.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
> index 8f33d5f4d9..551908df8e 100644
> --- a/lib/vhost/vhost_user.c
> +++ b/lib/vhost/vhost_user.c
> @@ -1818,7 +1818,7 @@ static int vhost_user_set_vring_err(struct
> virtio_net **pdev,
> 
>  	if (!(ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK))
>  		close(ctx->fds[0]);
> -	VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented\n");
> +	VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented\n");
> 
>  	return RTE_VHOST_MSG_RESULT_OK;
>  }
> @@ -2336,7 +2336,7 @@ static int vhost_user_set_log_fd(struct virtio_net
> **pdev,
>  		return RTE_VHOST_MSG_RESULT_ERR;
> 
>  	close(ctx->fds[0]);
> -	VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented.\n");
> +	VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented.\n");
> 
>  	return RTE_VHOST_MSG_RESULT_OK;
>  }
> --
> 2.39.1

Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
  
Kevin Traynor Feb. 7, 2023, 10:18 a.m. UTC | #2
On 06/02/2023 15:07, Maxime Coquelin wrote:
> This patch changes VHOST_USER_SET_VRING_ERR and
> VHOST_USER_SET_LOG_FD "not implemented" log levels from
> INFO to DEBUG, as implementing these requests is not
> mandatory. Having them being displayed at INFO level
> may induce some confusion to the end-user.
> 
> Fixes: fd29c33b651a ("vhost: handle unsupported message types in functions")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>   lib/vhost/vhost_user.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
> index 8f33d5f4d9..551908df8e 100644
> --- a/lib/vhost/vhost_user.c
> +++ b/lib/vhost/vhost_user.c
> @@ -1818,7 +1818,7 @@ static int vhost_user_set_vring_err(struct virtio_net **pdev,
>   
>   	if (!(ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK))
>   		close(ctx->fds[0]);
> -	VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented\n");
> +	VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented\n");
>   
>   	return RTE_VHOST_MSG_RESULT_OK;
>   }
> @@ -2336,7 +2336,7 @@ static int vhost_user_set_log_fd(struct virtio_net **pdev,
>   		return RTE_VHOST_MSG_RESULT_ERR;
>   
>   	close(ctx->fds[0]);
> -	VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented.\n");
> +	VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented.\n");
>   
>   	return RTE_VHOST_MSG_RESULT_OK;
>   }

Acked-by: Kevin Traynor <ktraynor@redhat.com>
  
Maxime Coquelin Feb. 9, 2023, 12:13 p.m. UTC | #3
On 2/6/23 16:07, Maxime Coquelin wrote:
> This patch changes VHOST_USER_SET_VRING_ERR and
> VHOST_USER_SET_LOG_FD "not implemented" log levels from
> INFO to DEBUG, as implementing these requests is not
> mandatory. Having them being displayed at INFO level
> may induce some confusion to the end-user.
> 
> Fixes: fd29c33b651a ("vhost: handle unsupported message types in functions")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
>   lib/vhost/vhost_user.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
> index 8f33d5f4d9..551908df8e 100644
> --- a/lib/vhost/vhost_user.c
> +++ b/lib/vhost/vhost_user.c
> @@ -1818,7 +1818,7 @@ static int vhost_user_set_vring_err(struct virtio_net **pdev,
>   
>   	if (!(ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK))
>   		close(ctx->fds[0]);
> -	VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented\n");
> +	VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented\n");
>   
>   	return RTE_VHOST_MSG_RESULT_OK;
>   }
> @@ -2336,7 +2336,7 @@ static int vhost_user_set_log_fd(struct virtio_net **pdev,
>   		return RTE_VHOST_MSG_RESULT_ERR;
>   
>   	close(ctx->fds[0]);
> -	VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented.\n");
> +	VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented.\n");
>   
>   	return RTE_VHOST_MSG_RESULT_OK;
>   }


Applied to dpdk-next-virtio/main.

Thanks,
Maxime
  

Patch

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 8f33d5f4d9..551908df8e 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -1818,7 +1818,7 @@  static int vhost_user_set_vring_err(struct virtio_net **pdev,
 
 	if (!(ctx->msg.payload.u64 & VHOST_USER_VRING_NOFD_MASK))
 		close(ctx->fds[0]);
-	VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented\n");
+	VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented\n");
 
 	return RTE_VHOST_MSG_RESULT_OK;
 }
@@ -2336,7 +2336,7 @@  static int vhost_user_set_log_fd(struct virtio_net **pdev,
 		return RTE_VHOST_MSG_RESULT_ERR;
 
 	close(ctx->fds[0]);
-	VHOST_LOG_CONFIG(dev->ifname, INFO, "not implemented.\n");
+	VHOST_LOG_CONFIG(dev->ifname, DEBUG, "not implemented.\n");
 
 	return RTE_VHOST_MSG_RESULT_OK;
 }