From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F7C7313287 for ; Tue, 23 Dec 2025 13:20:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766496052; cv=none; b=ZKU9LW82efEyufPdjfM09sojWWMB9hOh1xoIVD8O6vA5DyZImbmAcAcdB4BB1awkPugsPnabk6Yvzp3TAZreDu2iy4wb3Gl7QQSoBgzkUXq03ge9hVWPTKIysF354QGwuY+pw0mhEZFoQoXwJzRDDxgAQlNC2+FI7SCHYBCTurc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766496052; c=relaxed/simple; bh=6FEDJWDEXPwDHq5FjNeQDR7NvGRqzZXVeWMPQBaC+T4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jPMqTz8kVsfQHA78+JjtIVttfE12a75G/a3FnlSOCgrQ4fkaB8IoZXhp44VZRjLZF8Uq7Lg+bODx3A6xqGLJo02lLmrakxnYootqPHjQIF26gpX/K8K2BluFhq2FF03fK+5nfwyu3+qvhJbPHsVNpH+xX9r202R/74Y5qOGmFiA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=DUpOlarj; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=LyTgG69S; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="DUpOlarj"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="LyTgG69S" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1766496049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=BRe1EnOv1GyxckqNmcBvauEG3PWqIpBb6cBk/IR9fzc=; b=DUpOlarjvKtxYSG4oGZKGuvQtTt5TKl+J8tKd5/Vjf8ENAiMExODEUAJP+jVewEC5YIMDb 0/9GavbE8/lrToj6My2rE+HHu9mLmV3ZXRw2IXjhgV5RZ2wmT46TyK9R/a1cE4mQCfLQJs aIVYYHMyFOKGzAhsLf61x9rlsJg0u5A= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-265-ZdsfwRCiM_SV-QclNWQxbg-1; Tue, 23 Dec 2025 08:20:48 -0500 X-MC-Unique: ZdsfwRCiM_SV-QclNWQxbg-1 X-Mimecast-MFC-AGG-ID: ZdsfwRCiM_SV-QclNWQxbg_1766496047 Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-64d3c4deb88so2285834a12.1 for ; Tue, 23 Dec 2025 05:20:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1766496046; x=1767100846; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=BRe1EnOv1GyxckqNmcBvauEG3PWqIpBb6cBk/IR9fzc=; b=LyTgG69SXP93yfrY91gMPSWg+ZPkre0EEwXRY4y5Kt7awgaVxcG+KOgPk/FwrFx7Jq mAZ79KrdEUjfmeu9FgCJI0NiIVx59TvamZOmG4NHl1AcAJBUG2dZQd0Q9hOAkD7jrDLz QBny5DBIZ/rjJ5NMbq2ESawjnIc8pBdQ1i7bDRWvN+smRHRRT1b7uri/PQjeTo+v/RcI wIooAwfoocbffEwf2E7U6m5iVkGGXJdEyrUk90mLIE+3m+u+mFxysw4JX9PaehwLd9WN UL6x1UfXPUXPrxZX/Aqsl0ZLSF82nH/dFA3Ne20oV54d2vPtfiKd1j50rBgVm5yi0zoO XBYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766496046; x=1767100846; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BRe1EnOv1GyxckqNmcBvauEG3PWqIpBb6cBk/IR9fzc=; b=USLDPWE8KxMYDXO1eKpORy4Dgg6QqbWXqHpZuFfSliXdqWUINwUinWoGYH0YRbZNfL 65v05FCE45TU3i2Q0wx9cRtZgmTUw1EkYe8RNnoptOT6YFkirYLc/qJ02Qr8Dew+7hsV NAtSircjmnUf3hvwTxKnvJsexg+6KWBec/ARo7Fkwa+trYx0tyVW+n6I9c2q29mHSHt3 jG8tiRyxdJpSdz0520+O46tB6VPU9uViISucR8Y1C82ZhwaSaRUzVNfN0RMQvzu5lYIR Dp5dnn2j+G2lPJGDGWLfFAoCG2Gkffj50awXBHiiBUZq/2lrICWIFu7duBZd+lUnVMiD rd4Q== X-Forwarded-Encrypted: i=1; AJvYcCU8rgrZRPgT/Nvfp5d3ldEITuwnCMWYVpReFNTPBwKrX7bW85k+kyZ5BmMblzlpmh6zWjgqFZwxkkthGTw=@vger.kernel.org X-Gm-Message-State: AOJu0YyqakxvK+pQAVS6q9x85rV9GNu5WSQwpp3WA9kZz/AoEUaS7VUS pJY+0GCsbzjGn8GFd+0iQES3C/TAiYJA8pjoClt6AOcWRUnOr7c29n/wy5Wz1f9XVPj1QfsVUsk mk7+9WpacTmyK4eFpFjZ77HKCTkxPvcjRomGbkz9KRpvsCPKYGsrVw57grVbjJCO1yvAhKdO9UK ivq08= X-Gm-Gg: AY/fxX4rw5vReGhplHY2V3DV/DvzN7c9qgYP291puhaE7ssLNHDOFDqTkEX0pkfNkNe ZBSTIm4+Ummg7zaouITlus1rH2jJtWylpCnjSWQknlwtybScF3YNWWGhcpUo8twHEjXZkKu50nh Bp36I0DX4+RKs3tix+HO3h8tnFPDDhFpEJe3NzhxujiiX2Xr2cSxzb3XpSG82bAUa925JjxaTj9 0SfscmtapOiBuOuaFgmlP1As8XEOX+jpAVh+KW/GB66uNe6OwxCNv1yW5S4wOGDOvQ9X+PhCMBY X7dcYnNY7fsKvmWMaATRHvPCIsMKoU1DVUjRuppoKUOnRKe3hLdH7xpAz93B1XL2IbZYfzWFvIt AIdhreIMQIujpQg== X-Received: by 2002:a05:6402:1ed5:b0:64b:7885:c985 with SMTP id 4fb4d7f45d1cf-64b8e93c197mr14856992a12.3.1766496046290; Tue, 23 Dec 2025 05:20:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIaPvpBqA5VZRBxV0Qq8GuLUjF3OOea4Sszi0hglkQxPEQuXCT2471wtxRSPlrlUlo7MvZvQ== X-Received: by 2002:a05:6402:1ed5:b0:64b:7885:c985 with SMTP id 4fb4d7f45d1cf-64b8e93c197mr14856958a12.3.1766496045806; Tue, 23 Dec 2025 05:20:45 -0800 (PST) Received: from sgarzare-redhat ([193.207.125.9]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-64b9105a9d8sm13549743a12.11.2025.12.23.05.20.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Dec 2025 05:20:44 -0800 (PST) Date: Tue, 23 Dec 2025 14:20:33 +0100 From: Stefano Garzarella To: Michal Luczaj Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Arseniy Krasnov , virtualization@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net 2/2] vsock/test: Test setting SO_ZEROCOPY on accept()ed socket Message-ID: References: <20251223-vsock-child-sock-custom-sockopt-v1-0-4654a75d0f58@rbox.co> <20251223-vsock-child-sock-custom-sockopt-v1-2-4654a75d0f58@rbox.co> <1c877a67-778e-424c-8c23-9e4d799fac2f@rbox.co> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1c877a67-778e-424c-8c23-9e4d799fac2f@rbox.co> On Tue, Dec 23, 2025 at 12:10:25PM +0100, Michal Luczaj wrote: >On 12/23/25 11:27, Stefano Garzarella wrote: >> On Tue, Dec 23, 2025 at 10:15:29AM +0100, Michal Luczaj wrote: >>> Make sure setsockopt(SOL_SOCKET, SO_ZEROCOPY) on an accept()ed socket is >>> handled by vsock's implementation. >>> >>> Signed-off-by: Michal Luczaj >>> --- >>> tools/testing/vsock/vsock_test.c | 33 +++++++++++++++++++++++++++++++++ >>> 1 file changed, 33 insertions(+) >>> >>> diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c >>> index 9e1250790f33..8ec8f0844e22 100644 >>> --- a/tools/testing/vsock/vsock_test.c >>> +++ b/tools/testing/vsock/vsock_test.c >>> @@ -2192,6 +2192,34 @@ static void test_stream_nolinger_server(const struct test_opts *opts) >>> close(fd); >>> } >>> >>> +static void test_stream_accepted_setsockopt_client(const struct test_opts *opts) >>> +{ >>> + int fd; >>> + >>> + fd = vsock_stream_connect(opts->peer_cid, opts->peer_port); >>> + if (fd < 0) { >>> + perror("connect"); >>> + exit(EXIT_FAILURE); >>> + } >>> + >>> + vsock_wait_remote_close(fd); >>> + close(fd); >>> +} >>> + >>> +static void test_stream_accepted_setsockopt_server(const struct test_opts *opts) >>> +{ >>> + int fd; >>> + >>> + fd = vsock_stream_accept(VMADDR_CID_ANY, opts->peer_port, NULL); >>> + if (fd < 0) { >>> + perror("accept"); >>> + exit(EXIT_FAILURE); >>> + } >>> + >>> + enable_so_zerocopy_check(fd); >> >> This test is passing on my env also without the patch applied. >> >> Is that expected? > >Oh, no, definitely not. It fails for me: >36 - SOCK_STREAM accept()ed socket custom setsockopt()...36 - SOCK_STREAM >accept()ed socket custom setsockopt()...setsockopt err: Operation not >supported (95) >setsockopt SO_ZEROCOPY val 1 aaa, right, the server is failing, sorry ;-) Reviewed-by: Stefano Garzarella > >I have no idea what's going on :) > In my suite, I'm checking the client, and if the last test fails only on the server, I'm missing it. I'd fix my suite, and maybe also vsock_test adding another sync point. Thanks, Stefano