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=202408 header.b=WvJXmn37; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 2B4EB5A004E for ; Thu, 12 Sep 2024 08:59:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202408; t=1726124381; bh=tXXNczA6NS/DVSh3zxbypc+e6tx831HQIuBfS1JVxwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WvJXmn37X/Wj+KrxoVNPuSA+163nMpxEdACGijjXlC6E/5OJexD3YPyB6LgIkKuDS VG2DIKwvaVocxeUX3prqKuaoYfdZbwxf7fTwmdhOTrAGZ/wt/vZM4A6UjyenkaoVv8 zdo3mZVaZ7HVPv7r4ABiuWXZ6dyABUKkzuFa25h6hYUG/dI0+P/uPaIV+K/vd+uvuo O4EqYbt7Tjphk9RznqCREWwwR5gvNS7AIEH4UIV/Tae69Z1/oV/odSHK2dk6D321LK VEYA7/L5tqJekkfvzKeIJzut6pvDOvljpw3dQ0uUv8lN+j7LTz6Dy8ARhYRdUkgcNn MJ3AT8dP5Tong== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4X47bd6qt3z4wx5; Thu, 12 Sep 2024 16:59:41 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 1/2] tcp: Remove redundant initialisation of iov[TCP_IOV_ETH].iov_base Date: Thu, 12 Sep 2024 16:59:39 +1000 Message-ID: <20240912065940.1738239-2-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240912065940.1738239-1-david@gibson.dropbear.id.au> References: <20240912065940.1738239-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: JZMEEPYCCM3NPMBDWKKRYAOU56GVCZF4 X-Message-ID-Hash: JZMEEPYCCM3NPMBDWKKRYAOU56GVCZF4 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: David Gibson 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: This initialisation for IPv4 flags buffers is redundant with the very next line which sets both iov_base and iov_len. Signed-off-by: David Gibson --- tcp_buf.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tcp_buf.c b/tcp_buf.c index c31e9f31..2e044b27 100644 --- a/tcp_buf.c +++ b/tcp_buf.c @@ -168,7 +168,6 @@ void tcp_sock4_iov_init(const struct ctx *c) iov = tcp4_l2_flags_iov[i]; iov[TCP_IOV_TAP] = tap_hdr_iov(c, &tcp4_flags_tap_hdr[i]); - iov[TCP_IOV_ETH].iov_base = &tcp4_eth_src; iov[TCP_IOV_ETH] = IOV_OF_LVALUE(tcp4_eth_src); iov[TCP_IOV_IP] = IOV_OF_LVALUE(tcp4_flags_ip[i]); iov[TCP_IOV_PAYLOAD].iov_base = &tcp4_flags[i]; -- 2.46.0