Re: [PATCH v6 3/3] vsock/test: verify socket options after setting them
From: Konstantin Shkolnyy <hidden>
Date: 2024-11-18 15:54:12
Also in:
lkml, virtualization
From: Konstantin Shkolnyy <hidden>
Date: 2024-11-18 15:54:12
Also in:
lkml, virtualization
On 11/14/2024 04:28, Stefano Garzarella wrote:
On Wed, Nov 13, 2024 at 08:35:57AM -0600, Konstantin Shkolnyy wrote:
[...]
quoted
diff --git a/tools/testing/vsock/msg_zerocopy_common.c b/tools/testing/vsock/msg_zerocopy_common.c index 5a4bdf7b5132..8622e5a0f8b7 100644--- a/tools/testing/vsock/msg_zerocopy_common.c +++ b/tools/testing/vsock/msg_zerocopy_common.c@@ -14,16 +14,6 @@#include "msg_zerocopy_common.h" -void enable_so_zerocopy(int fd) -{ - int val = 1; - - if (setsockopt(fd, SOL_SOCKET, SO_ZEROCOPY, &val, sizeof(val))) { - perror("setsockopt"); - exit(EXIT_FAILURE); - } -} -Since the new API has a different name (i.e. `enable_so_zerocopy_check()`), this `enable_so_zerocopy()` could stay here, anyway I don't want to be too picky, I'm totally fine with this change since it's now only used by vsock_perf ;-) Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Ok, let's keep it static then - it's simpler :-)