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=202508 header.b=cwGfY5Co; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id E455E5A028C for ; Wed, 06 Aug 2025 08:35:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202508; t=1754462131; bh=8fKi2EPgf+POJShcvObhQHrO1kD5b3GLAJDmC9H69Jw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cwGfY5CoCEKjSxS6s3nZ3F2VXi/xN5S3PKkxHNjfVJcDkhuQ963xAfstg1mfXAGR3 fowzPdi10UvIWwA+f8PHY1TvoV9TNPZHWgQiHNQ5e4wxPVz+5NIOdC7gmWeNVCIp+C NFmQUFVjudFCazA2M5ksvuiOF6fIJyLUhLpD/HeeKxlg6T0EZEimvktdwlSYWLMT9x ekTalQ+VdRB96AT/Ok3DjFRqnYK75fjeOsYvQAS0nxK46/LKAPtAJbXXIX5+k7K/Ze kQOENwM2xOe423GrgIbvVjb8igcLMoWuZOz0jRDpT0qvVMfxx36ewNWXNeWLOcA42W 3CNu9WMh3ayVA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4bxgXM1rK4z4xdP; Wed, 6 Aug 2025 16:35:31 +1000 (AEST) Date: Wed, 6 Aug 2025 16:33:46 +1000 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH v8 28/30] packet: remove unused parameter from PACKET_POOL_DECL() Message-ID: References: <20250805154628.301343-1-lvivier@redhat.com> <20250805154628.301343-29-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Op4j3Wl7z+pPp5Js" Content-Disposition: inline In-Reply-To: <20250805154628.301343-29-lvivier@redhat.com> Message-ID-Hash: H2AOJZKWP44DUHTFSZTJXWVG7NNTKWMO X-Message-ID-Hash: H2AOJZKWP44DUHTFSZTJXWVG7NNTKWMO 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 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: --Op4j3Wl7z+pPp5Js Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 05, 2025 at 05:46:26PM +0200, Laurent Vivier wrote: > _buf is not used in the macro. Remove it. > Remove it also from PACKET_POOL_NOINIT() as it was needed > for PACKET_POOL_DECL(). >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > packet.h | 6 +++--- > tap.c | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/packet.h b/packet.h > index 286b6b9994db..43b9022075d1 100644 > --- a/packet.h > +++ b/packet.h > @@ -43,7 +43,7 @@ void pool_flush(struct pool *p); > #define packet_get(p, idx, data) \ > packet_get_do(p, idx, data, __func__, __LINE__) > =20 > -#define PACKET_POOL_DECL(_name, _size, _buf) \ > +#define PACKET_POOL_DECL(_name, _size) \ > struct _name ## _t { \ > char *buf; \ > size_t buf_size; \ > @@ -62,7 +62,7 @@ struct _name ## _t { \ > #define PACKET_INIT(name, size, buf, buf_size) \ > (struct name ## _t) PACKET_POOL_INIT_NOCAST(size, buf, buf_size) > =20 > -#define PACKET_POOL_NOINIT(name, size, buf) \ > - PACKET_POOL_DECL(name, size, buf) name ## _storage; \ > +#define PACKET_POOL_NOINIT(name, size) \ > + PACKET_POOL_DECL(name, size) name ## _storage; \ > static struct pool *name =3D (struct pool *)&name ## _storage > #endif /* PACKET_H */ > diff --git a/tap.c b/tap.c > index d327ec0c3d54..bbc786468455 100644 > --- a/tap.c > +++ b/tap.c > @@ -95,8 +95,8 @@ CHECK_FRAME_LEN(L2_MAX_LEN_VU); > ETH_HLEN + sizeof(struct ipv6hdr) + sizeof(struct udphdr)) > =20 > /* IPv4 (plus ARP) and IPv6 message batches from tap/guest to IP handler= s */ > -static PACKET_POOL_NOINIT(pool_tap4, TAP_MSGS_IP4, pkt_buf); > -static PACKET_POOL_NOINIT(pool_tap6, TAP_MSGS_IP6, pkt_buf); > +static PACKET_POOL_NOINIT(pool_tap4, TAP_MSGS_IP4); > +static PACKET_POOL_NOINIT(pool_tap6, TAP_MSGS_IP6); > =20 > #define TAP_SEQS 128 /* Different L4 tuples in one batch */ > #define FRAGMENT_MSG_RATE 10 /* # seconds between fragment warnings */ > @@ -555,7 +555,7 @@ void eth_update_mac(struct ethhdr *eh, > memcpy(eh->h_source, eth_s, sizeof(eh->h_source)); > } > =20 > -PACKET_POOL_DECL(pool_l4, UIO_MAXIOV, pkt_buf); > +PACKET_POOL_DECL(pool_l4, UIO_MAXIOV); > =20 > /** > * struct l4_seq4_t - Message sequence for one protocol handler call, IP= v4 --=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 --Op4j3Wl7z+pPp5Js Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmiS9z0ACgkQzQJF27ox 2Geh4g/6Ak1uBkKrR3Iv5NWnWFqBaHE8jxmKjkLgUUGl7NEfHxHwQc7RZdsfPS1k +6X7bMbQLbBdKNt+ylueBrAJPcmrGQkVmVEfCKf8MeDH46DHMou+b4Yj4IAPEg9N Vgrxo9LDTpr7OidXGFKm9/IQvJBPOc3o0wyIpubu7sVGEb60QGDJ7Aek45dSG5ez UmjWXwukUXMBkvIw4CWQjhA4vDoCTH5q3YwAnQwCsxKIC9JRjZNxdohO/4AVWs9h vYi3Yqc82qjFXrYHe8k2+8dQCEtcDNXoAgPGM1TWXgOVoefcJGe9K+i5Kra3zOgJ V0gQOqwz9h/dtNBlHjGXr5vTz16XBa6BcFt/PJ43GJfYv4zUKzA469kF3kPfh8IK Jk/rg3FCalbHp1BfYu34iQaf5Iq9feJQTTnd6Qt0qc07LXNgK3v85URL02o9Xo5w XdNd++flKgaHJb3bf8TJwAiw2maVGURoalF1nArVMBUdts56tvdcfBtNSH37S71B FIC6SDP93tFDUrJAyX/HlXysOLhGz3QlMwopWBojKno/jisV9/htz/w6iqtNR9WL SUgU+dD53hZRVHcL51KMECf897czYAjtNxHikFTgfgf1ArzYX86HbxX3G07IDS95 f/OSujNcnoj0qKLMRXu6KbAysMmOIrLKCcFB7HGo3KvG+cDbyGo= =EMBU -----END PGP SIGNATURE----- --Op4j3Wl7z+pPp5Js--