linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vishnu Dasa <vdasa@vmware.com>
To: Stefano Garzarella <sgarzare@redhat.com>,
	Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Cc: Bryan Tan <bryantan@vmware.com>,
	"David S. Miller" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"kys@microsoft.com" <kys@microsoft.com>,
	"haiyangz@microsoft.com" <haiyangz@microsoft.com>,
	"wei.liu@kernel.org" <wei.liu@kernel.org>,
	Dexuan Cui <decui@microsoft.com>,
	Krasnov Arseniy <oxffffaa@gmail.com>,
	Bobby Eshleman <bobby.eshleman@gmail.com>,
	Bobby Eshleman <bobby.eshleman@bytedance.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	kernel <kernel@sberdevices.ru>
Subject: Re: [RFC PATCH v2 3/6] vsock/vmci: always return ENOMEM in case of error
Date: Thu, 1 Dec 2022 15:14:20 +0000	[thread overview]
Message-ID: <D7DE3103-994D-478E-B7F6-42CE8B6469FE@vmware.com> (raw)
In-Reply-To: <20221201093048.q2pradrgn5limcfb@sgarzare-redhat>



> On Dec 1, 2022, at 1:30 AM, Stefano Garzarella <sgarzare@redhat.com> wrote:
> 
> !! External Email
> 
> On Fri, Nov 25, 2022 at 05:08:06PM +0000, Arseniy Krasnov wrote:
>> From: Bobby Eshleman <bobby.eshleman@bytedance.com>
>> 
>> This saves original behaviour from af_vsock.c - switch any error
>> code returned from transport layer to ENOMEM.
>> 
>> Signed-off-by: Bobby Eshleman <bobby.eshleman@bytedance.com>
>> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
>> ---
>> net/vmw_vsock/vmci_transport.c | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
> 
> @Bryan @Vishnu what do you think about this patch?
> 
> A bit of context:
> 
> Before this series, the af_vsock core always returned ENOMEM to the user
> if the transport failed to queue the packet.
> 
> Now we are changing it by returning the transport error. So I think here
> we want to preserve the previous behavior for vmci, but I don't know if
> that's the right thing.
> 

Agree with Stefano.  I don't think we need to preserve the previous
behavior for vmci.

> 
> @Arseniy please in the next versions describe better in the commit
> messages the reasons for these changes, so it is easier review for
> others and also in the future by reading the commit message we can
> understand the reason for the change.
> 
> Thanks,
> Stefano
> 
>> 
>> diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
>> index 842c94286d31..289a36a203a2 100644
>> --- a/net/vmw_vsock/vmci_transport.c
>> +++ b/net/vmw_vsock/vmci_transport.c
>> @@ -1838,7 +1838,14 @@ static ssize_t vmci_transport_stream_enqueue(
>>      struct msghdr *msg,
>>      size_t len)
>> {
>> -      return vmci_qpair_enquev(vmci_trans(vsk)->qpair, msg, len, 0);
>> +      int 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.


  parent reply	other threads:[~2022-12-01 15:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-25 17:00 [RFC PATCH v2 0/6] vsock: update tools and error handling Arseniy Krasnov
2022-11-25 17:03 ` [RFC PATCH v2 1/6] vsock: return errors other than -ENOMEM to socket Arseniy Krasnov
2022-12-01  9:17   ` Stefano Garzarella
2022-11-25 17:05 ` [RFC PATCH v2 2/6] hv_sock: always return ENOMEM in case of error Arseniy Krasnov
2022-12-01  9:23   ` Stefano Garzarella
2022-12-01 21:43     ` Dexuan Cui
2022-11-25 17:08 ` [RFC PATCH v2 3/6] vsock/vmci: " Arseniy Krasnov
     [not found]   ` <20221201093048.q2pradrgn5limcfb@sgarzare-redhat>
2022-12-01 11:36     ` Arseniy Krasnov
2022-12-01 15:14     ` Vishnu Dasa [this message]
2022-12-01 15:16       ` Arseniy Krasnov
2022-11-25 17:10 ` [RFC PATCH v2 4/6] test/vsock: rework message bounds test Arseniy Krasnov
2022-12-01  9:41   ` Stefano Garzarella
2022-12-01 11:40     ` Arseniy Krasnov
2022-11-25 17:13 ` [RFC PATCH v2 5/6] test/vsock: add big message test Arseniy Krasnov
2022-12-01  9:45   ` Stefano Garzarella
2022-12-01 11:44     ` Arseniy Krasnov
2022-12-05  9:38       ` Stefano Garzarella
2022-11-25 17:15 ` [RFC PATCH v2 6/6] test/vsock: vsock_perf utility Arseniy Krasnov
2022-12-01 10:21   ` Stefano Garzarella
2022-12-01 11:46     ` Arseniy Krasnov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D7DE3103-994D-478E-B7F6-42CE8B6469FE@vmware.com \
    --to=vdasa@vmware.com \
    --cc=AVKrasnov@sberdevices.ru \
    --cc=bobby.eshleman@bytedance.com \
    --cc=bobby.eshleman@gmail.com \
    --cc=bryantan@vmware.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=edumazet@google.com \
    --cc=haiyangz@microsoft.com \
    --cc=kernel@sberdevices.ru \
    --cc=kuba@kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oxffffaa@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=sgarzare@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wei.liu@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).