mbox series

[net-next,v4,00/12] vsock/virtio: continue MSG_ZEROCOPY support

Message ID 20231010191524.1694217-1-avkrasnov@salutedevices.com (mailing list archive)
Headers show
Series vsock/virtio: continue MSG_ZEROCOPY support | expand

Message

Arseniy Krasnov Oct. 10, 2023, 7:15 p.m. UTC
Hello,

this patchset contains second and third parts of another big patchset
for MSG_ZEROCOPY flag support:
https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/

During review of this series, Stefano Garzarella <sgarzare@redhat.com>
suggested to split it for three parts to simplify review and merging:

1) virtio and vhost updates (for fragged skbs) (merged to net-next, see
   link below)
2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read
   tx completions) and update for Documentation/. <-- this patchset
3) Updates for tests and utils. <-- this patchset

Part 1) was merged:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=71b263e79370348349553ecdf46f4a69eb436dc7

Head for this patchset is:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=19537e125cc7cf2da43a606f5bcebbe0c9aea4cc

Link to v1:
https://lore.kernel.org/netdev/20230922052428.4005676-1-avkrasnov@salutedevices.com/
Link to v2:
https://lore.kernel.org/netdev/20230930210308.2394919-1-avkrasnov@salutedevices.com/
Link to v3:
https://lore.kernel.org/netdev/20231007172139.1338644-1-avkrasnov@salutedevices.com/

Changelog:                                                              
 v1 -> v2:                                                              
 * Patchset rebased and tested on new HEAD of net-next (see hash above).
 * See per-patch changelog after ---. 
 v2 -> v3:                                                              
 * Patchset rebased and tested on new HEAD of net-next (see hash above).
 * See per-patch changelog after ---. 
 v3 -> v4:                                                              
 * Patchset rebased and tested on new HEAD of net-next (see hash above).
 * See per-patch changelog after ---. 

Arseniy Krasnov (12):
  vsock: set EPOLLERR on non-empty error queue
  vsock: read from socket's error queue
  vsock: check for MSG_ZEROCOPY support on send
  vsock: enable SOCK_SUPPORT_ZC bit
  vhost/vsock: support MSG_ZEROCOPY for transport
  vsock/virtio: support MSG_ZEROCOPY for transport
  vsock/loopback: support MSG_ZEROCOPY for transport
  vsock: enable setting SO_ZEROCOPY
  docs: net: description of MSG_ZEROCOPY for AF_VSOCK
  test/vsock: MSG_ZEROCOPY flag tests
  test/vsock: MSG_ZEROCOPY support for vsock_perf
  test/vsock: io_uring rx/tx tests

 Documentation/networking/msg_zerocopy.rst |  13 +-
 drivers/vhost/vsock.c                     |   7 +
 include/linux/socket.h                    |   1 +
 include/net/af_vsock.h                    |   7 +
 include/uapi/linux/vm_sockets.h           |  17 +
 net/vmw_vsock/af_vsock.c                  |  63 +++-
 net/vmw_vsock/virtio_transport.c          |   7 +
 net/vmw_vsock/vsock_loopback.c            |   6 +
 tools/testing/vsock/.gitignore            |   1 +
 tools/testing/vsock/Makefile              |  11 +-
 tools/testing/vsock/msg_zerocopy_common.c |  87 ++++++
 tools/testing/vsock/msg_zerocopy_common.h |  18 ++
 tools/testing/vsock/util.c                | 133 ++++++++
 tools/testing/vsock/util.h                |   5 +
 tools/testing/vsock/vsock_perf.c          |  80 ++++-
 tools/testing/vsock/vsock_test.c          |  16 +
 tools/testing/vsock/vsock_test_zerocopy.c | 358 ++++++++++++++++++++++
 tools/testing/vsock/vsock_test_zerocopy.h |  15 +
 tools/testing/vsock/vsock_uring_test.c    | 342 +++++++++++++++++++++
 19 files changed, 1170 insertions(+), 17 deletions(-)
 create mode 100644 tools/testing/vsock/msg_zerocopy_common.c
 create mode 100644 tools/testing/vsock/msg_zerocopy_common.h
 create mode 100644 tools/testing/vsock/vsock_test_zerocopy.c
 create mode 100644 tools/testing/vsock/vsock_test_zerocopy.h
 create mode 100644 tools/testing/vsock/vsock_uring_test.c

Comments

Stefano Garzarella Oct. 11, 2023, 12:57 p.m. UTC | #1
On Tue, Oct 10, 2023 at 10:15:12PM +0300, Arseniy Krasnov wrote:
>Hello,
>
>this patchset contains second and third parts of another big patchset
>for MSG_ZEROCOPY flag support:
>https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/
>
>During review of this series, Stefano Garzarella <sgarzare@redhat.com>
>suggested to split it for three parts to simplify review and merging:
>
>1) virtio and vhost updates (for fragged skbs) (merged to net-next, see
>   link below)
>2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read
>   tx completions) and update for Documentation/. <-- this patchset
>3) Updates for tests and utils. <-- this patchset
>
>Part 1) was merged:
>https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=71b263e79370348349553ecdf46f4a69eb436dc7
>
>Head for this patchset is:
>https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=19537e125cc7cf2da43a606f5bcebbe0c9aea4cc
>
>Link to v1:
>https://lore.kernel.org/netdev/20230922052428.4005676-1-avkrasnov@salutedevices.com/
>Link to v2:
>https://lore.kernel.org/netdev/20230930210308.2394919-1-avkrasnov@salutedevices.com/
>Link to v3:
>https://lore.kernel.org/netdev/20231007172139.1338644-1-avkrasnov@salutedevices.com/
>
>Changelog:
> v1 -> v2:
> * Patchset rebased and tested on new HEAD of net-next (see hash above).
> * See per-patch changelog after ---.
> v2 -> v3:
> * Patchset rebased and tested on new HEAD of net-next (see hash above).
> * See per-patch changelog after ---.
> v3 -> v4:
> * Patchset rebased and tested on new HEAD of net-next (see hash above).
> * See per-patch changelog after ---.

I think I fully reviewed the series ;-)

Tests are all passing here, including the new ones. I also added
vsock_perf and vsock_uring_test to my test suite!

So for vsock point of view everything looks fine.

Let's see if there is anything about net (MSG_ZEROCOPY flags, etc.)

Thanks,
Stefano
Arseniy Krasnov Oct. 11, 2023, 1:01 p.m. UTC | #2
On 11.10.2023 15:57, Stefano Garzarella wrote:
> On Tue, Oct 10, 2023 at 10:15:12PM +0300, Arseniy Krasnov wrote:
>> Hello,
>>
>> this patchset contains second and third parts of another big patchset
>> for MSG_ZEROCOPY flag support:
>> https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/
>>
>> During review of this series, Stefano Garzarella <sgarzare@redhat.com>
>> suggested to split it for three parts to simplify review and merging:
>>
>> 1) virtio and vhost updates (for fragged skbs) (merged to net-next, see
>>   link below)
>> 2) AF_VSOCK updates (allows to enable MSG_ZEROCOPY mode and read
>>   tx completions) and update for Documentation/. <-- this patchset
>> 3) Updates for tests and utils. <-- this patchset
>>
>> Part 1) was merged:
>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=71b263e79370348349553ecdf46f4a69eb436dc7
>>
>> Head for this patchset is:
>> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=19537e125cc7cf2da43a606f5bcebbe0c9aea4cc
>>
>> Link to v1:
>> https://lore.kernel.org/netdev/20230922052428.4005676-1-avkrasnov@salutedevices.com/
>> Link to v2:
>> https://lore.kernel.org/netdev/20230930210308.2394919-1-avkrasnov@salutedevices.com/
>> Link to v3:
>> https://lore.kernel.org/netdev/20231007172139.1338644-1-avkrasnov@salutedevices.com/
>>
>> Changelog:
>> v1 -> v2:
>> * Patchset rebased and tested on new HEAD of net-next (see hash above).
>> * See per-patch changelog after ---.
>> v2 -> v3:
>> * Patchset rebased and tested on new HEAD of net-next (see hash above).
>> * See per-patch changelog after ---.
>> v3 -> v4:
>> * Patchset rebased and tested on new HEAD of net-next (see hash above).
>> * See per-patch changelog after ---.
> 
> I think I fully reviewed the series ;-)
> 
> Tests are all passing here, including the new ones. I also added
> vsock_perf and vsock_uring_test to my test suite!

Thanks for review!

> 
> So for vsock point of view everything looks fine.
> 
> Let's see if there is anything about net (MSG_ZEROCOPY flags, etc.)

Yes, let's wait for more comments, because whole patchset is R-b now and
this finally completes MSG_ZEROCOPY support for virtio/vsock.

Thanks, Arseniy

> 
> Thanks,
> Stefano
>
patchwork-bot+netdevbpf@kernel.org Oct. 15, 2023, 12:30 p.m. UTC | #3
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Tue, 10 Oct 2023 22:15:12 +0300 you wrote:
> Hello,
> 
> this patchset contains second and third parts of another big patchset
> for MSG_ZEROCOPY flag support:
> https://lore.kernel.org/netdev/20230701063947.3422088-1-AVKrasnov@sberdevices.ru/
> 
> During review of this series, Stefano Garzarella <sgarzare@redhat.com>
> suggested to split it for three parts to simplify review and merging:
> 
> [...]

Here is the summary with links:
  - [net-next,v4,01/12] vsock: set EPOLLERR on non-empty error queue
    https://git.kernel.org/netdev/net-next/c/0064cfb44084
  - [net-next,v4,02/12] vsock: read from socket's error queue
    https://git.kernel.org/netdev/net-next/c/49dbe25adac4
  - [net-next,v4,03/12] vsock: check for MSG_ZEROCOPY support on send
    https://git.kernel.org/netdev/net-next/c/5fbfc7d24334
  - [net-next,v4,04/12] vsock: enable SOCK_SUPPORT_ZC bit
    https://git.kernel.org/netdev/net-next/c/dcc55d7bb230
  - [net-next,v4,05/12] vhost/vsock: support MSG_ZEROCOPY for transport
    https://git.kernel.org/netdev/net-next/c/3719c48d9a20
  - [net-next,v4,06/12] vsock/virtio: support MSG_ZEROCOPY for transport
    https://git.kernel.org/netdev/net-next/c/e2fcc326b498
  - [net-next,v4,07/12] vsock/loopback: support MSG_ZEROCOPY for transport
    https://git.kernel.org/netdev/net-next/c/cfdca3904687
  - [net-next,v4,08/12] vsock: enable setting SO_ZEROCOPY
    https://git.kernel.org/netdev/net-next/c/e0718bd82e27
  - [net-next,v4,09/12] docs: net: description of MSG_ZEROCOPY for AF_VSOCK
    https://git.kernel.org/netdev/net-next/c/bac2cac12c26
  - [net-next,v4,10/12] test/vsock: MSG_ZEROCOPY flag tests
    https://git.kernel.org/netdev/net-next/c/bc36442ef3b7
  - [net-next,v4,11/12] test/vsock: MSG_ZEROCOPY support for vsock_perf
    https://git.kernel.org/netdev/net-next/c/e846d679ad13
  - [net-next,v4,12/12] test/vsock: io_uring rx/tx tests
    https://git.kernel.org/netdev/net-next/c/8d211285c6d4

You are awesome, thank you!