vhost: decrease log level for unimplemented request

Message ID 20221206150257.70926-1-maxime.coquelin@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Maxime Coquelin
Headers
Series vhost: decrease log level for unimplemented request |

Checks

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

Commit Message

Maxime Coquelin Dec. 6, 2022, 3:02 p.m. UTC
  This patch changes VHOST_USER_SET_VRING_ERR "not
implemented" log level from INFO to DEBUG.

Indeed, it is not required to support this message type,
and since version 7.1, QEMU sends this message for every
queue. It could confuse the end-user, thinking there is an
issue where there are not.

Implementing it could be an option, but it does nothing
special on QEMU side but displaying an error message.

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Kevin Traynor Dec. 8, 2022, 11:10 a.m. UTC | #1
On 06/12/2022 15:02, Maxime Coquelin wrote:
> This patch changes VHOST_USER_SET_VRING_ERR "not
> implemented" log level from INFO to DEBUG.
> 
> Indeed, it is not required to support this message type,
> and since version 7.1, QEMU sends this message for every
> queue. It could confuse the end-user, thinking there is an
> issue where there are not.
> 
> Implementing it could be an option, but it does nothing
> special on QEMU side but displaying an error message.
> 
> 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 | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
> index 9902ae9944..371d6304d6 100644
> --- a/lib/vhost/vhost_user.c
> +++ b/lib/vhost/vhost_user.c
> @@ -1809,7 +1809,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;
>   }

Debug level seem fine for this and this is what is done in QEMU. Not an 
issue atm from what I see, but should we do the same for 
VHOST_USER_SET_LOG_FD ?
  
Maxime Coquelin Jan. 27, 2023, 11:37 a.m. UTC | #2
Hi Kevin,

On 12/8/22 12:10, Kevin Traynor wrote:
> On 06/12/2022 15:02, Maxime Coquelin wrote:
>> This patch changes VHOST_USER_SET_VRING_ERR "not
>> implemented" log level from INFO to DEBUG.
>>
>> Indeed, it is not required to support this message type,
>> and since version 7.1, QEMU sends this message for every
>> queue. It could confuse the end-user, thinking there is an
>> issue where there are not.
>>
>> Implementing it could be an option, but it does nothing
>> special on QEMU side but displaying an error message.
>>
>> 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 | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
>> index 9902ae9944..371d6304d6 100644
>> --- a/lib/vhost/vhost_user.c
>> +++ b/lib/vhost/vhost_user.c
>> @@ -1809,7 +1809,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;
>>   }
> 
> Debug level seem fine for this and this is what is done in QEMU. Not an 
> issue atm from what I see, but should we do the same for 
> VHOST_USER_SET_LOG_FD ?
> 

Right, it makes sense to do the same for VHOST_USER_SET_LOG_FD in the
sake of consistency.

Thanks,
Maxime
  

Patch

diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
index 9902ae9944..371d6304d6 100644
--- a/lib/vhost/vhost_user.c
+++ b/lib/vhost/vhost_user.c
@@ -1809,7 +1809,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;
 }