From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202608 header.b=pwGYtLq1; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 901F45A0262 for ; Sat, 05 Sep 2026 03:53:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202608; t=1788573196; bh=/wi2qa22T+KV/j9vU54yZzErG3jkUuenKNJc6iUNzHA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pwGYtLq1t7jLkIaRqpKRGRbf1klKYAjaIjYg9TKKQakTK0cVW4C3jmafMhW2WX4lO zBJOhmmNubCGrJL4DJpyryV8W5ws1ANbDIT0gM/eTqE0oMzVae8bOfzJ05m6wxEx2x SF7AeDGmClXufTw+kGU7UIp9Tq9s5wQpXKml6iFwl4Fxd/gSlFMAlVn5mPagBr1sDO 5X6QdNefkEvUXRSV1foVkMhmsZu1Z5xU+mk4fbsGVZLGYEJVVsBCJoufg4MmWQFrEp ZDJyssH0HZ10SfkNF7wz5IGHs9ek+HUgP7tvsE69NEihgZGG72WLf3Bdu97TSAdGOk nFDJ5HcTYa7WA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4hcGZN0LrTz4wK1; Sat, 05 Sep 2026 11:53:16 +1000 (AEST) Date: Sat, 5 Sep 2026 11:52:43 +1000 From: David Gibson To: aerosouund Subject: Re: [PATCH 1/7] tap: Move the tap_hdr file to a separate file Message-ID: References: <20260904212826.41027-1-aerosound161@gmail.com> <20260904212826.41027-2-aerosound161@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CMLFOWkTb4rJKkKS" Content-Disposition: inline In-Reply-To: <20260904212826.41027-2-aerosound161@gmail.com> Message-ID-Hash: KA2KZNR23NPC3ROZJMUYVLJHDRCCZWIH X-Message-ID-Hash: KA2KZNR23NPC3ROZJMUYVLJHDRCCZWIH X-MailFrom: dgibson@gandalf.ozlabs.org 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, eperezma@redhat.com 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: --CMLFOWkTb4rJKkKS Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 05, 2026 at 12:28:20AM +0300, aerosouund wrote: > From: Ammar Yasser >=20 > It was defined in tap.h, put it on its own so that future callers won't > need to depend on all definitions in tap.h. > Also turn it into a union of a vnet_len and virtio_net_mrg_rxbuf > because for vhost acceleration the frames will have this virtio net > header prepended to them. >=20 > Signed-off-by: Eugenio P=E9rez > Signed-off-by: Ammar Yasser The code motion itself looks fine. > --- > tap.h | 9 +-------- > tap_hdr.h | 23 +++++++++++++++++++++++ > 2 files changed, 24 insertions(+), 8 deletions(-) > create mode 100644 tap_hdr.h >=20 > diff --git a/tap.h b/tap.h > index b335933..1625975 100644 > --- a/tap.h > +++ b/tap.h > @@ -10,6 +10,7 @@ > #include > =20 > #include "passt.h" > +#include "tap_hdr.h" > =20 > /** L2_MAX_LEN_PASTA - Maximum frame length for pasta mode (with L2 head= er) > * > @@ -38,14 +39,6 @@ > =20 > struct udphdr; > =20 > -/** > - * struct tap_hdr - tap backend specific headers > - * @vnet_len: Frame length (for qemu socket transport) > - */ > -struct tap_hdr { > - uint32_t vnet_len; > -} __attribute__((packed)); > - > /** > * tap_hdr_iov() - struct iovec for a tap header > * @c: Execution context > diff --git a/tap_hdr.h b/tap_hdr.h > new file mode 100644 > index 0000000..aa270b7 > --- /dev/null > +++ b/tap_hdr.h > @@ -0,0 +1,23 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later > + * Copyright (c) 2021 Red Hat GmbH > + * Author: Stefano Brivio This might be a bit pedantic since this may be a smaller block of code than is copyrightable, but.. Fwiw, Red Hat legal's advice, last I knew was to prefer simply "Copyright Red Hat" - the rest is apparently not really useful. Also, these specific lines were added by me in 2023, not Stefano in 2021 (commit 4b3d38a06). > + */ > + > +#ifndef TAP_HDR_H > +#define TAP_HDR_H > + > +#include > +#include > + > +/** > + * struct tap_hdr - tap backend specific headers > + * @vnet_len: Frame length (for qemu socket transport) > + */ > +struct tap_hdr { > + union { > + uint32_t vnet_len; > + struct virtio_net_hdr_mrg_rxbuf hdr; > + }; > +}; > + > +#endif /* TAP_HDR_H */ > --=20 > 2.39.5 (Apple Git-154) >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --CMLFOWkTb4rJKkKS Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmqbdd8ACgkQzQJF27ox 2GcIshAAqrrqOAlKl3f8m2mMbtC2roFK5e3VowabRrTalLg7IFR4mlkPqBnTlxO9 YFKIs9kTLJ1T/eWBU3T9H60sT0s9kUJOgz+oAjgaeXgVY1nm1zRJ0GvQFEnfq7bL Ze0n5a66vKn+IMizI/x3eCeh0mDndh0Y3WkRHJkU0Mb9l+BfPwO/uWTX6aEP3Z2T WDHwTS1CH2L+3TkeCMZS0zXaZAjbtLPLm/O9f63m0CZ4SmqWDMgzyKH9bFO33Lfr zUnzT0QoAtn/pxYatUr2W0LEuAepFg5C608qtIflisGESZ8TcwFVTLJbggsucoP4 +eQriT1GwvOUrX8YyIWBaF+smSbjRjdZt+UmX64yLd/LzYwqFwmDCEj8mnXT92Up lMoyF9RakaJ8ZoKnHMq82B2DOVjjhW9ldOvEcL2f8FUid44XcIEzFUeHPFcuAaCp efX+nEE9aBOAFqPmSIbfg9ZnkRN+pTxQplvReAg8dNZVUOoMC0iWlhWy1Le7r5eO PGJ9V9pOTeshJkVT91JNrVKPyoS0SbePAJmfui+tAGngIanE36ebjwkibq8CqUUI R2DvzOEgjrd5/BHXfJMJHCUidrO9OAN4dbnQbqyka5no353hxCQvGyIcop/yAd5W eS+OwOUnxirA7qtXgp31D41sRcYu4TuXdX8hCvA+UDVVo0D4pvI= =bfRU -----END PGP SIGNATURE----- --CMLFOWkTb4rJKkKS--