All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] vsock/vmci: log once the failed queue pair allocation
@ 2021-04-16 10:44 Stefano Garzarella
       [not found] ` <5096E853-EB1A-40C0-B0E5-BDF2F8431998@vmware.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Garzarella @ 2021-04-16 10:44 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, David S. Miller, Vishnu Dasa, Jakub Kicinski,
	Jorgen Hansen

VMCI feature is not supported in conjunction with the vSphere Fault
Tolerance (FT) feature.

VMware Tools can repeatedly try to create a vsock connection. If FT is
enabled the kernel logs is flooded with the following messages:

    qp_alloc_hypercall result = -20
    Could not attach to queue pair with -20

"qp_alloc_hypercall result = -20" was hidden by commit e8266c4c3307
("VMCI: Stop log spew when qp allocation isn't possible"), but "Could
not attach to queue pair with -20" is still there flooding the log.

Since the error message can be useful in some cases, print it only once.

Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
---
 net/vmw_vsock/vmci_transport.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
index 8b65323207db..1c9ecb18b8e6 100644
--- a/net/vmw_vsock/vmci_transport.c
+++ b/net/vmw_vsock/vmci_transport.c
@@ -568,8 +568,7 @@ vmci_transport_queue_pair_alloc(struct vmci_qp **qpair,
 			       peer, flags, VMCI_NO_PRIVILEGE_FLAGS);
 out:
 	if (err < 0) {
-		pr_err("Could not attach to queue pair with %d\n",
-		       err);
+		pr_err_once("Could not attach to queue pair with %d\n", err);
 		err = vmci_transport_error_to_vsock_error(err);
 	}
 
-- 
2.30.2


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

* Re: [PATCH net] vsock/vmci: log once the failed queue pair allocation
       [not found] ` <5096E853-EB1A-40C0-B0E5-BDF2F8431998@vmware.com>
@ 2021-04-19 15:10   ` Stefano Garzarella
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Garzarella @ 2021-04-19 15:10 UTC (permalink / raw)
  To: Jorgen Hansen
  Cc: netdev, linux-kernel, David S. Miller, Vishnu Dasa, Jakub Kicinski

On Fri, Apr 16, 2021 at 12:06:18PM +0000, Jorgen Hansen wrote:
>
>
>On 16 Apr 2021, at 12:44, Stefano Garzarella <sgarzare@redhat.com<mailto:sgarzare@redhat.com>> wrote:
>
>VMCI feature is not supported in conjunction with the vSphere Fault
>Tolerance (FT) feature.
>
>VMware Tools can repeatedly try to create a vsock connection. If FT is
>enabled the kernel logs is flooded with the following messages:
>
>   qp_alloc_hypercall result = -20
>   Could not attach to queue pair with -20
>
>"qp_alloc_hypercall result = -20" was hidden by commit e8266c4c3307
>("VMCI: Stop log spew when qp allocation isn't possible"), but "Could
>not attach to queue pair with -20" is still there flooding the log.
>
>Since the error message can be useful in some cases, print it only once.
>
>Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
>Signed-off-by: Stefano Garzarella <sgarzare@redhat.com<mailto:sgarzare@redhat.com>>
>---
>net/vmw_vsock/vmci_transport.c | 3 +--
>1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
>index 8b65323207db..1c9ecb18b8e6 100644
>--- a/net/vmw_vsock/vmci_transport.c
>+++ b/net/vmw_vsock/vmci_transport.c
>@@ -568,8 +568,7 @@ vmci_transport_queue_pair_alloc(struct vmci_qp **qpair,
>      peer, flags, VMCI_NO_PRIVILEGE_FLAGS);
>out:
>if (err < 0) {
>- pr_err("Could not attach to queue pair with %d\n",
>-       err);
>+ pr_err_once("Could not attach to queue pair with %d\n", err);
>err = vmci_transport_error_to_vsock_error(err);
>}
>
>—
>2.30.2
>
>
>Thanks a lot for fixing this.

You're welcome!

>
>Reviewed-by: Jorgen Hansen <jhansen@vmware.com<mailto:jhansen@vmware.com>>
>

Thanks for the review!
Patchwork didn't like it, I think there was some problem with your email 
client putting `<mailto:...>` links.

I think it had to be:

Reviewed-by: Jorgen Hansen <jhansen@vmware.com>

Thanks,
Stefano


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

end of thread, other threads:[~2021-04-19 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 10:44 [PATCH net] vsock/vmci: log once the failed queue pair allocation Stefano Garzarella
     [not found] ` <5096E853-EB1A-40C0-B0E5-BDF2F8431998@vmware.com>
2021-04-19 15:10   ` Stefano Garzarella

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.