From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=DKqJSLeW; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 2EC4D5A0265 for ; Tue, 24 Feb 2026 16:24:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1771946656; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2hNM9wyank2LTfaG7bCRiVQsePDH/dt2c9609G4uR8w=; b=DKqJSLeWbgfCDcgKZoNkHBnujWVaj/bXPbtB8Ig31nZjqlGsE2GGA9CoQlJOGJj04hjfi1 nny5EYNe6PZZwGE0Pi2uTEYcpg4qsmju1pXrAvajPMAPN1qJxP1Uk2BUKCcWgM/i3M99XC Vlm/PlqfJSEm+DFXiR5TIqMYUl0Rjd4= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-399-nsRT_ogYN5yDYroNmrTzzQ-1; Tue, 24 Feb 2026 10:24:14 -0500 X-MC-Unique: nsRT_ogYN5yDYroNmrTzzQ-1 X-Mimecast-MFC-AGG-ID: nsRT_ogYN5yDYroNmrTzzQ_1771946653 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-48079ae1001so23549995e9.0 for ; Tue, 24 Feb 2026 07:24:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771946652; x=1772551452; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2hNM9wyank2LTfaG7bCRiVQsePDH/dt2c9609G4uR8w=; b=XV1M1KvEYU9WPLCnJu+shDN5wIkhC3nCzJDke1dvCMNTEcf96GJzRMB1qeD6bliKqP tsD6vtfeePewEw7XIvAaRzBAFCgdJG8Viq9UK4Psn31aJbidG1uZuwzq9C2BLLu4RoWJ K1iUnTDIiJLMnx+mydA3IWSSkicG4B6pA9rGro1zsaqr/dG5Mlze+VjzDBYsD6x0LvbI Rt5D7hPwYs2wm9Q/R4aJYpSNG9scS2hlvfAaZ6WIy0kmAocMKuY/0FYQrpuCbbGXnOIW 6xxzE0+eLU2rirRKtor6PM/UY2n/vigxl/WS4YE+EqdJk3EX9vUlds9xOQYW6EeNXl1C 1+bg== X-Gm-Message-State: AOJu0YxfjR2l0sdeN/mqaoXKgGnJjzTMgg7WpFxr96J6VIZsSZ/N9IbF Dk8B3j4dNipjIsmE7+uPtmjoLNE6njGbyvI0yv0YzusVK5vss/VLrfMGiHKh1EogY4COK6xP7UF UulGse79JzIdeJ6Tr37IDSZ9cVC/WP2DrL09dcA1wMezJ/u7iHhVRebxeHJajSxRfd9/QzwvJa9 RXXKNIFSXlUcTnNUC+2ES6mLm+rEelaLHSivwd X-Gm-Gg: AZuq6aK8lATvp9GJBFuZjbciB1hqssFDZQksyuyFZjMQOlxNWV9GNNLJVDsWfIT6C0n 8UOWfmONaN6kBNCjCl5Lady16vUTgjGKlZoE+xyfCaV7jUp0ouOVDDMZ+OXiGy/+XYA6RZPELZw A3s9I0+ROWENoSyVnn8qjMasTIDpiOUVK95zg0kEQnBTBisutX1ddrF5lGZmUO0WnlWWFMeDfQ1 KvWx0dHEOt8Wb6A3YZKx/MHgIbucp+UqeN6p57QWfQrMD9SnhDWuua7jdQQc1unQOlS8iznsq/c Oj86YjAWnjtVYb8Jh+Qkv+5yz/LeYvUp+zRRFa493g7LyKdzHG9JkJ7lAtA8m4WlgccxYm39fhq XxGqD6lh5z8kHDbLfe8uMmjMNHDmzhtqiKZy3vzjux0xhtD/jjA== X-Received: by 2002:a05:600c:410e:b0:483:7907:ea02 with SMTP id 5b1f17b1804b1-483a962d1c6mr174848685e9.16.1771946651989; Tue, 24 Feb 2026 07:24:11 -0800 (PST) X-Received: by 2002:a05:600c:410e:b0:483:7907:ea02 with SMTP id 5b1f17b1804b1-483a962d1c6mr174848045e9.16.1771946651240; Tue, 24 Feb 2026 07:24:11 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483bd72bd66sm5347065e9.11.2026.02.24.07.24.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Feb 2026 07:24:10 -0800 (PST) From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH trivial] tcp_vu, udp_vu: Fix comment headers for header length functions Message-ID: <20260224162409.6ab5eb90@elisabeth> In-Reply-To: <20260224122227.437310-1-lvivier@redhat.com> References: <20260224122227.437310-1-lvivier@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Tue, 24 Feb 2026 16:24:10 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 2rYHJWmsof_WS86SSwzuZoj4DvEWtgm1mroNdAevLes_1771946653 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: DLKNLX3ORQ3YPR4B7U3KBCL2MMSAMIEI X-Message-ID-Hash: DLKNLX3ORQ3YPR4B7U3KBCL2MMSAMIEI X-MailFrom: sbrivio@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 CC: passt-dev@passt.top 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 Tue, 24 Feb 2026 13:22:27 +0100 Laurent Vivier wrote: > The comment headers for tcp_vu_hdrlen() and udp_vu_hdrlen() described > the return value as "the size of the header in level 2 frame", but > these functions also include the virtio net header, which is not part > of the L2 frame. > > Signed-off-by: Laurent Vivier > --- > tcp_vu.c | 4 ++-- > udp_vu.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/tcp_vu.c b/tcp_vu.c > index 94169c21f700..8908d376a7dd 100644 > --- a/tcp_vu.c > +++ b/tcp_vu.c > @@ -40,10 +40,10 @@ static struct vu_virtq_element elem[VIRTQUEUE_MAX_SIZE]; > static int head[VIRTQUEUE_MAX_SIZE + 1]; > > /** > - * tcp_vu_hdrlen() - return the size of the header in level 2 frame (TCP) > + * tcp_vu_hdrlen() - Return the size of virtio net and L2 headers (TCP) Thanks, I think that this, plus the line changed below, makes it clear. What I still find confusing is: "L2 headers (TCP)". If I see this together with udp_vu_hdrlen() I understand what you mean, but otherwise I'd ask myself what TCP has to do with Layer-2... I tried rephrasing it a bit, what do you think about: * tcp_vu_hdrlen() - Sum size of all headers, from TCP to virtio-net > * @v6: Set for IPv6 packet > * > - * Return: return the size of the header > + * Return: total size of virtio net header, Ethernet, IP and TCP headers ...and changing this to "virtio-net" (not a very official name but it seems to be widely used, more than "virtio net"...)? If you're fine with it (same for UDP) I would change it and apply. I'm not exactly proud of this either, so if you or somebody else has better ideas... > */ > static size_t tcp_vu_hdrlen(bool v6) > { > diff --git a/udp_vu.c b/udp_vu.c > index d190fef82d49..dd3f8e9272ff 100644 > --- a/udp_vu.c > +++ b/udp_vu.c > @@ -37,10 +37,10 @@ static struct iovec iov_vu [VIRTQUEUE_MAX_SIZE]; > static struct vu_virtq_element elem [VIRTQUEUE_MAX_SIZE]; > > /** > - * udp_vu_hdrlen() - return the size of the header in level 2 frame (UDP) > + * udp_vu_hdrlen() - Return the size of virtio net and L2 headers (UDP) > * @v6: Set for IPv6 packet > * > - * Return: return the size of the header > + * Return: total size of virtio net header, Ethernet, IP and UDP headers > */ > static size_t udp_vu_hdrlen(bool v6) > { -- Stefano