<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/tools/testing/vsock, branch v6.8-rc3</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>vsock/test: two tests to check credit update logic</title>
<updated>2023-12-15T10:37:35+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@salutedevices.com</email>
</author>
<published>2023-12-14T12:52:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=542e893fbadc51caa38a7c4c2a8f8e822cdba2b1'/>
<id>542e893fbadc51caa38a7c4c2a8f8e822cdba2b1</id>
<content type='text'>
Both tests are almost same, only differs in two 'if' conditions, so
implemented in a single function. Tests check, that credit update
message is sent:

1) During setting SO_RCVLOWAT value of the socket.
2) When number of 'rx_bytes' become smaller than SO_RCVLOWAT value.

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Both tests are almost same, only differs in two 'if' conditions, so
implemented in a single function. Tests check, that credit update
message is sent:

1) During setting SO_RCVLOWAT value of the socket.
2) When number of 'rx_bytes' become smaller than SO_RCVLOWAT value.

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsock/test: fix SEQPACKET message bounds test</title>
<updated>2023-11-23T16:49:16+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@salutedevices.com</email>
</author>
<published>2023-11-21T21:16:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f0863888f6cfef33e3117dccfe94fa78edf76be4'/>
<id>f0863888f6cfef33e3117dccfe94fa78edf76be4</id>
<content type='text'>
Tune message length calculation to make this test work on machines
where 'getpagesize()' returns &gt;32KB. Now maximum message length is not
hardcoded (on machines above it was smaller than 'getpagesize()' return
value, thus we get negative value and test fails), but calculated at
runtime and always bigger than 'getpagesize()' result. Reproduced on
aarch64 with 64KB page size.

Fixes: 5c338112e48a ("test/vsock: rework message bounds test")
Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reported-by: Bogdan Marcynkov &lt;bmarcynk@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/r/20231121211642.163474-1-avkrasnov@salutedevices.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tune message length calculation to make this test work on machines
where 'getpagesize()' returns &gt;32KB. Now maximum message length is not
hardcoded (on machines above it was smaller than 'getpagesize()' return
value, thus we get negative value and test fails), but calculated at
runtime and always bigger than 'getpagesize()' result. Reproduced on
aarch64 with 64KB page size.

Fixes: 5c338112e48a ("test/vsock: rework message bounds test")
Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reported-by: Bogdan Marcynkov &lt;bmarcynk@redhat.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Link: https://lore.kernel.org/r/20231121211642.163474-1-avkrasnov@salutedevices.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/vsock: add dobule bind connect test</title>
<updated>2023-11-07T22:27:07+00:00</updated>
<author>
<name>Filippo Storniolo</name>
<email>f.storniolo95@gmail.com</email>
</author>
<published>2023-11-03T17:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d80f63f690257b04b4fe3731b90dbf34a9ebb93f'/>
<id>d80f63f690257b04b4fe3731b90dbf34a9ebb93f</id>
<content type='text'>
This add bind connect test which creates a listening server socket
and tries to connect a client with a bound local port to it twice.

Co-developed-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Filippo Storniolo &lt;f.storniolo95@gmail.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This add bind connect test which creates a listening server socket
and tries to connect a client with a bound local port to it twice.

Co-developed-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Filippo Storniolo &lt;f.storniolo95@gmail.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/vsock: refactor vsock_accept</title>
<updated>2023-11-07T22:27:07+00:00</updated>
<author>
<name>Filippo Storniolo</name>
<email>f.storniolo95@gmail.com</email>
</author>
<published>2023-11-03T17:55:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=84d5fb9741316ca53f0f7c23b82f30e0bb33c38e'/>
<id>84d5fb9741316ca53f0f7c23b82f30e0bb33c38e</id>
<content type='text'>
This is a preliminary patch to introduce SOCK_STREAM bind connect test.
vsock_accept() is split into vsock_listen() and vsock_accept().

Co-developed-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Filippo Storniolo &lt;f.storniolo95@gmail.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a preliminary patch to introduce SOCK_STREAM bind connect test.
vsock_accept() is split into vsock_listen() and vsock_accept().

Co-developed-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Filippo Storniolo &lt;f.storniolo95@gmail.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/vsock fix: add missing check on socket creation</title>
<updated>2023-11-07T22:27:07+00:00</updated>
<author>
<name>Filippo Storniolo</name>
<email>f.storniolo95@gmail.com</email>
</author>
<published>2023-11-03T17:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bfada5a7672fea5465d81bba3d05fca6024a244e'/>
<id>bfada5a7672fea5465d81bba3d05fca6024a244e</id>
<content type='text'>
Add check on socket() return value in vsock_listen()
and vsock_connect()

Co-developed-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Filippo Storniolo &lt;f.storniolo95@gmail.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add check on socket() return value in vsock_listen()
and vsock_connect()

Co-developed-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Luigi Leonardi &lt;luigi.leonardi@outlook.com&gt;
Signed-off-by: Filippo Storniolo &lt;f.storniolo95@gmail.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/vsock: io_uring rx/tx tests</title>
<updated>2023-10-15T12:19:43+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@salutedevices.com</email>
</author>
<published>2023-10-10T19:15:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8d211285c6d48baca4934c54b1965d4e75ce35e2'/>
<id>8d211285c6d48baca4934c54b1965d4e75ce35e2</id>
<content type='text'>
This adds set of tests which use io_uring for rx/tx. This test suite is
implemented as separated util like 'vsock_test' and has the same set of
input arguments as 'vsock_test'. These tests only cover cases of data
transmission (no connect/bind/accept etc).

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds set of tests which use io_uring for rx/tx. This test suite is
implemented as separated util like 'vsock_test' and has the same set of
input arguments as 'vsock_test'. These tests only cover cases of data
transmission (no connect/bind/accept etc).

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/vsock: MSG_ZEROCOPY support for vsock_perf</title>
<updated>2023-10-15T12:19:42+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@salutedevices.com</email>
</author>
<published>2023-10-10T19:15:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e846d679ad131c71c190123f3b6176c108567c85'/>
<id>e846d679ad131c71c190123f3b6176c108567c85</id>
<content type='text'>
To use this option pass '--zerocopy' parameter:

./vsock_perf --zerocopy --sender &lt;cid&gt; ...

With this option MSG_ZEROCOPY flag will be passed to the 'send()' call.

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To use this option pass '--zerocopy' parameter:

./vsock_perf --zerocopy --sender &lt;cid&gt; ...

With this option MSG_ZEROCOPY flag will be passed to the 'send()' call.

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/vsock: MSG_ZEROCOPY flag tests</title>
<updated>2023-10-15T12:19:42+00:00</updated>
<author>
<name>Arseniy Krasnov</name>
<email>avkrasnov@salutedevices.com</email>
</author>
<published>2023-10-10T19:15:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bc36442ef3b776ee6d5148a4e175c367af057ce1'/>
<id>bc36442ef3b776ee6d5148a4e175c367af057ce1</id>
<content type='text'>
This adds three tests for MSG_ZEROCOPY feature:
1) SOCK_STREAM tx with different buffers.
2) SOCK_SEQPACKET tx with different buffers.
3) SOCK_STREAM test to read empty error queue of the socket.

Patch also works as preparation for the next patches for tools in this
patchset: vsock_perf and vsock_uring_test:
1) Adds several new functions to util.c - they will be also used by
   vsock_uring_test.
2) Adds two new functions for MSG_ZEROCOPY handling to a new source
   file - such source will be shared between vsock_test, vsock_perf and
   vsock_uring_test, thus avoiding code copy-pasting.

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds three tests for MSG_ZEROCOPY feature:
1) SOCK_STREAM tx with different buffers.
2) SOCK_SEQPACKET tx with different buffers.
3) SOCK_STREAM test to read empty error queue of the socket.

Patch also works as preparation for the next patches for tools in this
patchset: vsock_perf and vsock_uring_test:
1) Adds several new functions to util.c - they will be also used by
   vsock_uring_test.
2) Adds two new functions for MSG_ZEROCOPY handling to a new source
   file - such source will be shared between vsock_test, vsock_perf and
   vsock_uring_test, thus avoiding code copy-pasting.

Signed-off-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsock/test: track bytes in sk_buff merging test for SOCK_SEQPACKET</title>
<updated>2023-09-17T16:42:37+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2023-09-15T12:14:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bc7bea452d322b785d960fd20795babff664975c'/>
<id>bc7bea452d322b785d960fd20795babff664975c</id>
<content type='text'>
The test was a bit complicated to read.
Added variables to keep track of the bytes read and to be read
in each step. Also some comments.

The test is unchanged.

Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The test was a bit complicated to read.
Added variables to keep track of the bytes read and to be read
in each step. Also some comments.

The test is unchanged.

Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>vsock/test: use send_buf() in vsock_test.c</title>
<updated>2023-09-17T16:42:37+00:00</updated>
<author>
<name>Stefano Garzarella</name>
<email>sgarzare@redhat.com</email>
</author>
<published>2023-09-15T12:14:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2a8548a9bb4c4ba14badd6be72f1d2b87a6bddc0'/>
<id>2a8548a9bb4c4ba14badd6be72f1d2b87a6bddc0</id>
<content type='text'>
We have a very common pattern used in vsock_test that we can
now replace with the new send_buf().

This allows us to reuse the code we already had to check the
actual return value and wait for all the bytes to be sent with
an appropriate timeout.

Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We have a very common pattern used in vsock_test that we can
now replace with the new send_buf().

This allows us to reuse the code we already had to check the
actual return value and wait for all the bytes to be sent with
an appropriate timeout.

Signed-off-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Reviewed-by: Arseniy Krasnov &lt;avkrasnov@salutedevices.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
