From: Arseniy Krasnov <avkrasnov@salutedevices.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Bobby Eshleman <bobby.eshleman@bytedance.com>,
<kvm@vger.kernel.org>,
<virtualization@lists.linux-foundation.org>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<kernel@sberdevices.ru>, <oxffffaa@gmail.com>
Subject: Re: [RFC PATCH v1 2/2] vsock/test: SO_RCVLOWAT + deferred credit update test
Date: Fri, 17 Nov 2023 11:50:59 +0300 [thread overview]
Message-ID: <1700ac19-a355-fad4-79e2-7598ee33bd00@salutedevices.com> (raw)
In-Reply-To: <tbvwohgvrc6kvlsyap3sk5zqww5q6schsu4szx7e23wgg7pvb3@e7xa5mg5inul>
On 17.11.2023 11:30, Stefano Garzarella wrote:
> On Fri, Nov 17, 2023 at 10:12:38AM +0300, Arseniy Krasnov wrote:
>>
>>
>> On 15.11.2023 14:11, Stefano Garzarella wrote:
>>> On Wed, Nov 08, 2023 at 10:20:04AM +0300, Arseniy Krasnov wrote:
>>>> This adds test which checks, that updating SO_RCVLOWAT value also sends
>>>
>>> You can avoid "This adds", and write just "Add test ...".
>>>
>>> See https://docs.kernel.org/process/submitting-patches.html#describe-your-changes
>>>
>>> Describe your changes in imperative mood, e.g. "make xyzzy do frotz"
>>> instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy
>>> to do frotz", as if you are giving orders to the codebase to change
>>> its behaviour.
>>>
>>> Also in the other patch.
>>>
>>>> credit update message. Otherwise mutual hungup may happen when receiver
>>>> didn't send credit update and then calls 'poll()' with non default
>>>> SO_RCVLOWAT value (e.g. waiting enough bytes to read), while sender
>>>> waits for free space at receiver's side.
>>>>
>>>> Signed-off-by: Arseniy Krasnov <avkrasnov@salutedevices.com>
>>>> ---
>>>> tools/testing/vsock/vsock_test.c | 131 +++++++++++++++++++++++++++++++
>>>> 1 file changed, 131 insertions(+)
>>>>
>>>> diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c
>>>> index c1f7bc9abd22..c71b3875fd16 100644
>>>> --- a/tools/testing/vsock/vsock_test.c
>>>> +++ b/tools/testing/vsock/vsock_test.c
>>>> @@ -1180,6 +1180,132 @@ static void test_stream_shutrd_server(const struct test_opts *opts)
>>>> close(fd);
>>>> }
>>>>
>>>> +#define RCVLOWAT_CREDIT_UPD_BUF_SIZE (1024 * 128)
>>>> +#define VIRTIO_VSOCK_MAX_PKT_BUF_SIZE (1024 * 64)
>>>
>>> What about adding a comment like the one in the cover letter about
>>> dependency with kernel values?
>>>
>>> Please add it also in the commit description.
>>>
>>> I'm thinking if we should move all the defines that depends on the
>>> kernel in some special header.
>>
>> IIUC it will be new header file in tools/testing/vsock, which includes such defines. At
>> this moment in will contain only VIRTIO_VSOCK_MAX_PKT_BUF_SIZE. Idea is that such defines
>
> So this only works on the virtio transport though, not the other
> transports, right? (but maybe the others don't have this problem, so
> it's fine).
Yes, this case is only actual in virtio as this logic exists in virtio
only (the same situation as for skb merging sometimes ago).
>
>> are not supposed to use by user (so do not move it to uapi headers), but needed by tests
>> to check kernel behaviour. Please correct me if i'm wrong.
>
> Right!
> Maybe if it's just one, we can leave it there for now, but with a
> comment on top explaining where it comes.
Ok, got it, I'll add comment
Thanks, Arseniy
>
> Thanks,
> Stefano
>
next prev parent reply other threads:[~2023-11-17 8:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 7:20 [RFC PATCH v1 0/2] send credit update during setting SO_RCVLOWAT Arseniy Krasnov
2023-11-08 7:20 ` [RFC PATCH v1 1/2] virtio/vsock: " Arseniy Krasnov
2023-11-15 11:08 ` Stefano Garzarella
2023-11-17 7:10 ` Arseniy Krasnov
2023-11-08 7:20 ` [RFC PATCH v1 2/2] vsock/test: SO_RCVLOWAT + deferred credit update test Arseniy Krasnov
2023-11-15 11:11 ` Stefano Garzarella
2023-11-17 7:12 ` Arseniy Krasnov
2023-11-17 8:30 ` Stefano Garzarella
2023-11-17 8:50 ` Arseniy Krasnov [this message]
2023-11-15 11:08 ` [RFC PATCH v1 0/2] send credit update during setting SO_RCVLOWAT Stefano Garzarella
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=1700ac19-a355-fad4-79e2-7598ee33bd00@salutedevices.com \
--to=avkrasnov@salutedevices.com \
--cc=bobby.eshleman@bytedance.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jasowang@redhat.com \
--cc=kernel@sberdevices.ru \
--cc=kuba@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--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®