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=202602 header.b=NV2DvyB7; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 7C5465A0652 for ; Tue, 24 Mar 2026 00:11:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1774307506; bh=rFVdr+GLIiFdzHL5qPsov010vj4lzpIBJRjCCEjHpoA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NV2DvyB7/1EtzrzM4fxbLTfMwPQ4KSU18Lt7wJG1jlAcTfBKIpRRU8RogkYvNjBur beJhlXBSM4exA9rElux+gYogKDsAH21mOF5iUl5CS2c8P0tLrqac4RYY62NSQQ7cTA rnrs1AlF9oJp9+9KzmWPJcjjVQOFBGSxYnMArwm0qMHvJtDQ8yaK7Z9iq26Yv/uw0u WFHW7ehqUVYvHia65YpVWwJM8rY9kI/kVZr5URLQPoUmGdSBG79Sr2V3RYYR9KdlAo 08TAFKtAfI0V74jODSFpRh/ruYM65a4zWvEeeujLgQV9XABewtxlFCNVudfYQ90d1I 6BcQ3eV/9poRQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ffppB3BZjz4w9W; Tue, 24 Mar 2026 10:11:46 +1100 (AEDT) Date: Tue, 24 Mar 2026 10:10:36 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH trivial 2/3] tcp_vu: Remove redundant eh->h_source assignment in tcp_vu_send_flag() Message-ID: References: <20260320135116.575416-1-lvivier@redhat.com> <20260320135116.575416-3-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Fg//yefToMtATY3g" Content-Disposition: inline In-Reply-To: <20260320135116.575416-3-lvivier@redhat.com> Message-ID-Hash: 2NKVEGMX2EZNGOHEN66Z7SNKT7OWJVYD X-Message-ID-Hash: 2NKVEGMX2EZNGOHEN66Z7SNKT7OWJVYD 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: --Fg//yefToMtATY3g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 20, 2026 at 02:51:15PM +0100, Laurent Vivier wrote: > tcp_fill_headers() calls eth_update_mac(eh, NULL, omac) which > unconditionally overwrites eh->h_source. The prior memcpy() setting > it to c->our_tap_mac is therefore redundant. >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > tcp_vu.c | 1 - > 1 file changed, 1 deletion(-) >=20 > diff --git a/tcp_vu.c b/tcp_vu.c > index c616b1fec2bf..9c4e916b1b8d 100644 > --- a/tcp_vu.c > +++ b/tcp_vu.c > @@ -102,7 +102,6 @@ int tcp_vu_send_flag(const struct ctx *c, struct tcp_= tap_conn *conn, int flags) > eh =3D vu_eth(flags_elem[0].in_sg[0].iov_base); > =20 > memcpy(eh->h_dest, c->guest_mac, sizeof(eh->h_dest)); > - memcpy(eh->h_source, c->our_tap_mac, sizeof(eh->h_source)); > =20 > if (CONN_V4(conn)) { > ip4h =3D vu_ip(flags_elem[0].in_sg[0].iov_base); > --=20 > 2.53.0 >=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 --Fg//yefToMtATY3g Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmnByGwACgkQzQJF27ox 2Gc1bA//dBmx2PjtR3+pVPd83zMD6O9Qz77ztvYKFPsnJSCPsExch9bXlMtwBG3R vJwfYWsVMdFf8DBV6sCOlXptz6y+qiCkmXx8qYKT0q+NM73pLl/aPKw/PaO85gtW PVZYIp9Nwj8AvvFBV89TUJKJHL3JCvakzG7rVCls1VImlIIqdH//B3qhB8ZmfUY8 PLJFLYGqptEWQ7EcbP07WSXLzzfBW9Q+Az/cTlqVfGsBv/94hgvLRVxWHBEKg7Uh 0oWYiJwrq3fvl1Ui+4onWiOdnw+JCw8uDa1NiVOvEdDMi8RQuHzDGXfTEO6XfWLT x0h4xthr4X5p3zvxh1P2Qj3hVMQDjURu3I8lpkEM52cDjP/RGZWFYakPxNylmJXi +OJ3vo9Esd2McucxXRuiu7AUMPKShogYfLWmKaFqPHuXEQyta2YvpVhaz+63ujmJ iEIvpPgMvFBl2z0P/H7PM6DH3hwrOqIA+helpZFgaC9PFHOsTr9QJKVBs6CwCy+K kiEAh/Svjs7cXIzhmupapS1tKJzhavkjYkM37XDU5XfazLhJD9/be/cTeYBMi7/g 5gHmgmBMCc9GOvfUq850AyUgHN3mti+anidBPsE/1oDh791OQhR7yumEJ5kCsfpk qP5dYC9UBSEMHUwtmFIc/4gf9KXoM8sutAKNVzsRswzPKN79kes= =14Sk -----END PGP SIGNATURE----- --Fg//yefToMtATY3g--