From: Vishnu Dasa <vdasa@vmware.com>
To: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Stefano Garzarella <sgarzare@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Bobby Eshleman <bobby.eshleman@bytedance.com>,
Bryan Tan <bryantan@vmware.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"virtualization@lists.linux-foundation.org"
<virtualization@lists.linux-foundation.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel@sberdevices.ru" <kernel@sberdevices.ru>,
"oxffffaa@gmail.com" <oxffffaa@gmail.com>,
Pv-drivers <Pv-drivers@vmware.com>
Subject: Re: [RFC PATCH v3 2/4] vsock/vmci: convert VMCI error code to -ENOMEM on receive
Date: Thu, 30 Mar 2023 21:49:12 +0000 [thread overview]
Message-ID: <B95BC5A0-EB56-4921-8FFB-C41CFB7929C5@vmware.com> (raw)
In-Reply-To: <9fd06ca5-ace9-251d-34af-aca4db9c3ee0@sberdevices.ru>
> On Mar 30, 2023, at 1:18 PM, Arseniy Krasnov <AVKrasnov@sberdevices.ru> wrote:
>
> !! External Email
>
> On 30.03.2023 23:13, 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.
>
> @Stefano, I have some doubts about this commit message, as it says "... af_vsock.c
> passes error value returned from transport to the user ...", but this
> behaviour is implemented only in the next patch. Is it ok, if both patches
> are in a single patchset?
>
> For patch 1 I think it is ok, as it fixes current implementation.
>
> Thanks, Arseniy
>
>>
>> Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Code change looks good to me. Will let you figure out the commit message
with Stefano. Thanks!
Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
>> ---
>> net/vmw_vsock/vmci_transport.c | 11 +++++++++--
>> 1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c
>> index 95cc4d79ba29..b370070194fa 100644
>> --- a/net/vmw_vsock/vmci_transport.c
>> +++ b/net/vmw_vsock/vmci_transport.c
>> @@ -1831,10 +1831,17 @@ static ssize_t vmci_transport_stream_dequeue(
>> size_t len,
>> int flags)
>> {
>> + ssize_t err;
>> +
>> if (flags & MSG_PEEK)
>> - return vmci_qpair_peekv(vmci_trans(vsk)->qpair, msg, len, 0);
>> + err = vmci_qpair_peekv(vmci_trans(vsk)->qpair, msg, len, 0);
>> else
>> - return vmci_qpair_dequev(vmci_trans(vsk)->qpair, msg, len, 0);
>> + err = vmci_qpair_dequev(vmci_trans(vsk)->qpair, msg, len, 0);
>> +
>> + if (err < 0)
>> + err = -ENOMEM;
>> +
>> + return err;
>> }
>>
>> static ssize_t vmci_transport_stream_enqueue(
>
> !! External Email: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender.
next prev parent reply other threads:[~2023-03-30 21:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-30 20:11 [RFC PATCH v3 0/4] vsock: return errors other than -ENOMEM to socket Arseniy Krasnov
2023-03-30 20:12 ` [RFC PATCH v3 1/4] vsock/vmci: convert VMCI error code to -ENOMEM on send Arseniy Krasnov
2023-03-30 21:40 ` Vishnu Dasa
2023-03-31 7:15 ` Stefano Garzarella
2023-03-30 20:13 ` [RFC PATCH v3 2/4] vsock/vmci: convert VMCI error code to -ENOMEM on receive Arseniy Krasnov
2023-03-30 20:18 ` Arseniy Krasnov
2023-03-30 21:49 ` Vishnu Dasa [this message]
2023-03-31 7:12 ` Stefano Garzarella
2023-03-31 7:57 ` Arseniy Krasnov
2023-03-30 20:14 ` [RFC PATCH v3 3/4] vsock: return errors other than -ENOMEM to socket Arseniy Krasnov
2023-03-30 20:15 ` [RFC PATCH v3 4/4] vsock/test: update expected return values 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=B95BC5A0-EB56-4921-8FFB-C41CFB7929C5@vmware.com \
--to=vdasa@vmware.com \
--cc=AVKrasnov@sberdevices.ru \
--cc=Pv-drivers@vmware.com \
--cc=bobby.eshleman@bytedance.com \
--cc=bryantan@vmware.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kernel@sberdevices.ru \
--cc=kuba@kernel.org \
--cc=kvm@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=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.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
all inboxes | Powered by JetHome®