From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=quarantine dis=none) header.from=redhat.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id ED52A5A0269 for ; Fri, 04 Dec 2026 01:26:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1796344003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lvfENIQ7t+dFWvUcGX1lmef2j9UM2ykoCGkXrLQEZL0=; b=RliT4z9mLVI7cpg7VxsM0h2Lwq13doAhvjH6PWeeWHofBsvTpSbtGwZZxcFTwHJhcouJWA IkyhSd6XOb2+n7e3VetSNEuBOBvOQa5cR2GPZgZzgb74eg5HDl6twIyjawFK3obK8jnXgq wkLNBmr/h/bY1pqKuvORC06A29K5FhA= X-MC-Rep: binary re single Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-562-okatY0u5OtuNYv_lurZS-w-1; Fri, 4 Dec 2026 00:26:42 +0000 X-MC-Unique: okatY0u5OtuNYv_lurZS-w-1 X-Mimecast-MFC-AGG-ID: okatY0u5OtuNYv_lurZS-w_1796344001 Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-375bac6bd21so524938eec.0 for ; Thu, 03 Dec 2026 16:26:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796344001; x=1796948801; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=lvf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trfbNTF5p8dfQoNf0F Axa+MnigD9qvT90zgD88Hgzpr/+5D9iAdUytsVjcPF44riX9RgPrvUUWzw/YpOYnnnopVzEQLnd bjUlOOuPYwGxkn1yJr6t5YlHz9zHbmZNYWkW+Ok5I= X-Received: by 2002:a05:693c:820d:b0:386:ac78:a2c4 with SMTP id 5a478bee46e88-38742d8caf6mr3434488eec.17.1796344001281; Thu, 03 Dec 2026 16:26:41 -0800 (PST) X-Received: by 2002:a05:693c:820d:b0:386:ac78:a2c4 with SMTP id 5a478bee46e88-38742d8caf6mr3434458eec.17.1796344000541; Thu, 03 Dec 2026 16:26:40 -0800 (PST) Received: from [192.168.2.15] (lnsm6-montreal02-142-122-43-105.internet.virginmobile.ca. [142.122.43.105]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3875218c602sm1718876eec.7.2026.12.03.16.26.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Dec 2026 16:26:40 -0800 (PST) Message-ID: <2c83c89d-ed79-4097-a326-86d0008c70d9@redhat.com> Date: Thu, 3 Dec 2026 19:26:36 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] treewide: no L2 buffer in splice-only mode To: Stuart McLaren , passt-dev@passt.top References: <20261203175624.3078368-1-stuart.mclaren@hpe.com> From: Jon Maloy In-Reply-To: <20261203175624.3078368-1-stuart.mclaren@hpe.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: uQZsHMiAyxPnzBYJxAZfXETkGnJkqByZey0fY56HP74_1796344001 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: 6FY372SHLNCZC3SUJHTU2BRYWXDHNFXI X-Message-ID-Hash: 6FY372SHLNCZC3SUJHTU2BRYWXDHNFXI X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 2026-12-03 12:56, Stuart McLaren wrote: > Save memory by not initializing L2 memory buffers when > running in --splice-only mode. Nice. This looks correct to me: in --splice-only mode we never create a tap interface, and fwd_nat_from_host() doesn't let us create flows towards it, so none of those buffers is reachable, and keeping the receive iovecs in udp_iov_init_one() covers the socket-to-socket path. But I see a corner case: on master, nothing prevents --splice-only together with --fd (documented as passt-only), and in that case we actually forward traffic from the given file descriptor as usual. I checked this with a pipe as fake tap device, and a UDP datagram from it was forwarded to the host. With this patch, that traffic is silently dropped instead, as the packet pools aren't initialised. In my view, the new behaviour matches better what --splice-only means, and I doubt anybody uses this combination. If we want to keep the previous behaviour anyway, the alternative would be to still initialise the L2 buffers if --fd is given. Something like this: !c->splice_only || c->fd_tap != -1 instead of just !c->splice_only, in all the places this patch touches: not just for the packet pools, but also for the TCP and UDP frames, as we would need those to send replies back. I leave the decision about that to Stefano. ///jon