virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC PATCH v3 1/4] vsock/vmci: convert VMCI error code to -ENOMEM on send
       [not found] ` <a0915a9d-ba41-5a90-0e16-40c2315f0445@sberdevices.ru>
@ 2023-03-30 21:40   ` Vishnu Dasa via Virtualization
  2023-03-31  7:15   ` Stefano Garzarella
  1 sibling, 0 replies; 2+ messages in thread
From: Vishnu Dasa via Virtualization @ 2023-03-30 21:40 UTC (permalink / raw)
  To: Arseniy Krasnov
  Cc: Bobby Eshleman, kvm, Pv-drivers, netdev, linux-kernel,
	virtualization, oxffffaa, Bryan Tan, Eric Dumazet,
	Stefan Hajnoczi, kernel, Jakub Kicinski, Paolo Abeni,
	David S. Miller



> On Mar 30, 2023, at 1:12 PM, Arseniy Krasnov <AVKrasnov@sberdevices.ru> wrote:
> 
> !! External Email
> 
> This adds conversion of VMCI specific error code to general -ENOMEM. It
> is needed, because af_vsock.c passes error value returned from transport
> to the user, which does not expect to get VMCI_ERROR_* values.
> 
> Fixes: c43170b7e157 ("vsock: return errors other than -ENOMEM to socket")
> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>

Thanks, looks good to me.

Reviewed-by: Vishnu Dasa <vdasa@vmware.com>

> ---
> net/vmw_vsock/vmci_transport.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
> index 36eb16a40745..95cc4d79ba29 100644
> --- a/net/vmw_vsock/vmci_transport.c
> +++ b/net/vmw_vsock/vmci_transport.c
> @@ -1842,7 +1842,13 @@ static ssize_t vmci_transport_stream_enqueue(
>        struct msghdr *msg,
>        size_t len)
> {
> -       return vmci_qpair_enquev(vmci_trans(vsk)->qpair, msg, len, 0);
> +       ssize_t err;
> +
> +       err = vmci_qpair_enquev(vmci_trans(vsk)->qpair, msg, len, 0);
> +       if (err < 0)
> +               err = -ENOMEM;
> +
> +       return err;
> }
> 
> static s64 vmci_transport_stream_has_data(struct vsock_sock *vsk)
> --
> 2.25.1
> 
> !! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

* Re: [RFC PATCH v3 1/4] vsock/vmci: convert VMCI error code to -ENOMEM on send
       [not found] ` <a0915a9d-ba41-5a90-0e16-40c2315f0445@sberdevices.ru>
  2023-03-30 21:40   ` [RFC PATCH v3 1/4] vsock/vmci: convert VMCI error code to -ENOMEM on send Vishnu Dasa via Virtualization
@ 2023-03-31  7:15   ` Stefano Garzarella
  1 sibling, 0 replies; 2+ messages in thread
From: Stefano Garzarella @ 2023-03-31  7:15 UTC (permalink / raw)
  To: Arseniy Krasnov
  Cc: Vishnu Dasa, Bobby Eshleman, kvm, pv-drivers, netdev,
	linux-kernel, virtualization, oxffffaa, Bryan Tan, Eric Dumazet,
	Stefan Hajnoczi, kernel, Jakub Kicinski, Paolo Abeni,
	David S. Miller

On Thu, Mar 30, 2023 at 11:12:44PM +0300, Arseniy Krasnov wrote:
>This adds conversion of VMCI specific error code to general -ENOMEM. It
>is needed, because af_vsock.c passes error value returned from transport
>to the user, which does not expect to get VMCI_ERROR_* values.
>
>Fixes: c43170b7e157 ("vsock: return errors other than -ENOMEM to socket")
>Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
>---
> net/vmw_vsock/vmci_transport.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)

The patch LGTM, but I suggest to extract this patch from the series and
send it directly to the net tree, while other patches can be sent to
net-next.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

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

end of thread, other threads:[~2023-03-31  7:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <dead4842-333a-015e-028b-302151336ff9@sberdevices.ru>
     [not found] ` <a0915a9d-ba41-5a90-0e16-40c2315f0445@sberdevices.ru>
2023-03-30 21:40   ` [RFC PATCH v3 1/4] vsock/vmci: convert VMCI error code to -ENOMEM on send Vishnu Dasa via Virtualization
2023-03-31  7:15   ` Stefano Garzarella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).