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=emJk3M2d; dkim-atps=neutral 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 173D45A061A for ; Thu, 17 Apr 2025 18:52:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1744908751; 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=DveItyej5nkvLvF34tZWdSGrZfxd7DuqXlBTyL/gUzc=; b=emJk3M2d00srlt3h+7N9KuGKc1+RYCErY6ZnOhbyJXJNYltANmF0UugI9Rc+Aican+omjK 5O5xccYw6DMZmc17288KJhz/x8QoqbzI7n+ZKUu63aYn+Hx7DEj7fT2LgZhBQgVBDKh9VB 1A7RIpEjoAsMDwPpYR3n2wcviNBOXqc= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-186-2nI7oCa8O4Cw-6s78-XjWw-1; Thu, 17 Apr 2025 12:52:30 -0400 X-MC-Unique: 2nI7oCa8O4Cw-6s78-XjWw-1 X-Mimecast-MFC-AGG-ID: 2nI7oCa8O4Cw-6s78-XjWw_1744908750 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 153A219560AD for ; Thu, 17 Apr 2025 16:52:30 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.44.32.6]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0234619560BA; Thu, 17 Apr 2025 16:52:28 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH v5 27/29] packet: remove unused parameter from PACKET_POOL_DECL() Date: Thu, 17 Apr 2025 18:51:34 +0200 Message-ID: <20250417165136.2688884-28-lvivier@redhat.com> In-Reply-To: <20250417165136.2688884-1-lvivier@redhat.com> References: <20250417165136.2688884-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 2FpLsi1IaarCXwz9BZpG1Eci8HueeWFKsaPdNB7V-B0_1744908750 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: WV4QTGFBRQ6332VPESFEVOEP2TGVT4DX X-Message-ID-Hash: WV4QTGFBRQ6332VPESFEVOEP2TGVT4DX 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 ce910699b4d7..bbea04eac455 100644 --- a/packet.h +++ b/packet.h @@ -44,7 +44,7 @@ void pool_flush(struct pool *p); #define packet_data(p, idx, data) \ packet_data_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; \ @@ -63,7 +63,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 3b5315cf541d..615609d4ded2 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 */ @@ -553,7 +553,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