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=TeE7iS9H; 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 2BEC25A027C for ; Tue, 05 Aug 2025 17:47:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1754408845; 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=XRjbFNv81tbKG0PMCaSnC08XG/d+y9deTDRhjcv2Ko0=; b=TeE7iS9HQudikSH7TXKGRpUl+hZRXKzffIqdRO8Zywk68iPwQoa8YVzvagGHiRq6AgYVAe +IuYoQi4CnrtPxzBCOQYdO4XBD5exmp6g+bRbJzQY6yITcGP4tlkfH/6hs71Z/9ivZCBkM jkDGUPO87qhrYz0PG9GZJ8fzYVBWmb4= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-265-R2mgivR8NL6WL6t9OGlX1A-1; Tue, 05 Aug 2025 11:47:23 -0400 X-MC-Unique: R2mgivR8NL6WL6t9OGlX1A-1 X-Mimecast-MFC-AGG-ID: R2mgivR8NL6WL6t9OGlX1A_1754408842 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 21CB4180045B for ; Tue, 5 Aug 2025 15:47:22 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.45.225.81]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0D1A81955E88; Tue, 5 Aug 2025 15:47:20 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v8 28/30] packet: remove unused parameter from PACKET_POOL_DECL() Date: Tue, 5 Aug 2025 17:46:26 +0200 Message-ID: <20250805154628.301343-29-lvivier@redhat.com> In-Reply-To: <20250805154628.301343-1-lvivier@redhat.com> References: <20250805154628.301343-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: L-FSaIt9jdw5beuEnCyKWiL3ieR90QZdgg4i48Zb-wk_1754408842 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 4AEBIFWKROWCV6PRJEPMK6NN3T7AWCKW X-Message-ID-Hash: 4AEBIFWKROWCV6PRJEPMK6NN3T7AWCKW X-MailFrom: lvivier@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: Laurent Vivier 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: _buf is not used in the macro. Remove it. Remove it also from PACKET_POOL_NOINIT() as it was needed for PACKET_POOL_DECL(). Signed-off-by: Laurent Vivier --- packet.h | 6 +++--- tap.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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__) -#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) -#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 = (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)) /* IPv4 (plus ARP) and IPv6 message batches from tap/guest to IP handlers */ -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); #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)); } -PACKET_POOL_DECL(pool_l4, UIO_MAXIOV, pkt_buf); +PACKET_POOL_DECL(pool_l4, UIO_MAXIOV); /** * struct l4_seq4_t - Message sequence for one protocol handler call, IPv4 -- 2.49.0