diff options
author | Paolo Abeni <pabeni@redhat.com> | 2023-07-27 16:51:50 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-07-27 16:51:50 +0300 |
commit | 9d0cd5d25f7d45bce01bbb3193b54ac24b3a60f3 (patch) | |
tree | 553ca49bd0ef6c8fe801d035264ef903d5ac0324 /drivers/gpu/drm/amd/display/dc/dcn301/Makefile | |
parent | bc758ade614576d1c1b167af0246ada8c916c804 (diff) | |
parent | 8a0697f23e5a6e03a31f9dfb96755521aa9b9fc1 (diff) | |
download | linux-9d0cd5d25f7d45bce01bbb3193b54ac24b3a60f3.tar.xz |
Merge branch 'virtio-vsock-some-updates-for-msg_peek-flag'
Arseniy Krasnov says:
====================
virtio/vsock: some updates for MSG_PEEK flag
This patchset does several things around MSG_PEEK flag support. In
general words it reworks MSG_PEEK test and adds support for this flag
in SOCK_SEQPACKET logic. Here is per-patch description:
1) This is cosmetic change for SOCK_STREAM implementation of MSG_PEEK:
1) I think there is no need of "safe" mode walk here as there is no
"unlink" of skbs inside loop (it is MSG_PEEK mode - we don't change
queue).
2) Nested while loop is removed: in case of MSG_PEEK we just walk
over skbs and copy data from each one. I guess this nested loop
even didn't behave as loop - it always executed just for single
iteration.
2) This adds MSG_PEEK support for SOCK_SEQPACKET. It could be implemented
be reworking MSG_PEEK callback for SOCK_STREAM to support SOCK_SEQPACKET
also, but I think it will be more simple and clear from potential
bugs to implemented it as separate function thus not mixing logics
for both types of socket. So I've added it as dedicated function.
3) This is reworked MSG_PEEK test for SOCK_STREAM. Previous version just
sent single byte, then tried to read it with MSG_PEEK flag, then read
it in normal way. New version is more complex: now sender uses buffer
instead of single byte and this buffer is initialized with random
values. Receiver tests several things:
1) Read empty socket with MSG_PEEK flag.
2) Read part of buffer with MSG_PEEK flag.
3) Read whole buffer with MSG_PEEK flag, then checks that it is same
as buffer from 2) (limited by size of buffer from 2) of course).
4) Read whole buffer without any flags, then checks that it is same
as buffer from 3).
4) This is MSG_PEEK test for SOCK_SEQPACKET. It works in the same way
as for SOCK_STREAM, except it also checks combination of MSG_TRUNC
and MSG_PEEK.
====================
Link: https://lore.kernel.org/r/20230725172912.1659970-1-AVKrasnov@sberdevices.ru
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn301/Makefile')
0 files changed, 0 insertions, 0 deletions