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=202410 header.b=fcetafM7; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A0F155A004E for ; Thu, 05 Dec 2024 23:36:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1733438153; bh=AEvxVnw75Ot4aW0Z2p09kzlHtKPeFNq14OVPAkk83qw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fcetafM767NsNA+vfhb182Mlj/QESNpjDyqqGKQew4kRCuKb2bbfEGe1Lft+HvGke sPnfl7rgjCNhX+o3qLKFipBUuwjFF5uTxuYFVSZD5L1sNPATlDuQjiyTv4fayXmXWC cMPgIRnyIvEHXZMWNPOYuD6h/uZ1EdOK7LaN4I2VnJnfmPIa71spmlhjQFBk08i7/n VD9HYiyxpvcv3E7HSwhBnib+AYEs2hSl1z4tBIzqv7orswHwXhYzOfUDZLn7FID+G+ a9UIB7qMi/Ko2EwXKuLblu4Kys1YTBIXQk+Ln2dtpD9KLbcAmn21bTai9bo2N4/TVt wvbVSPeXL3Sbg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Y48P55jbzz4x6H; Fri, 6 Dec 2024 09:35:53 +1100 (AEDT) Date: Fri, 6 Dec 2024 09:34:23 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v3] pasta: make it possible to disable socket splicing Message-ID: References: <20241203215302.3773941-1-jmaloy@redhat.com> <20241205210626.4639b7a5@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e11524PsbYvhtj2I" Content-Disposition: inline In-Reply-To: <20241205210626.4639b7a5@elisabeth> Message-ID-Hash: BWETIDMAFMRMHHR5VSMZBWQVHNYR26HK X-Message-ID-Hash: BWETIDMAFMRMHHR5VSMZBWQVHNYR26HK 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: Jon Maloy , passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com 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: --e11524PsbYvhtj2I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 05, 2024 at 09:06:26PM +0100, Stefano Brivio wrote: > On Tue, 3 Dec 2024 16:53:02 -0500 > Jon Maloy wrote: >=20 > > During testing it is sometimes useful to force traffic which would > > normally be forwared by socket splicing through the tap interface. > >=20 > > In this commit, we add a command switch enabling such funtionality > > for inbound local traffic. > >=20 > > For outbound local traffic this is much trickier, if even possible, > > so leave that for a later commit. > >=20 > > Suggested-by: David Gibson > > Signed-off-by: Jon Maloy > >=20 > > --- > > v2: Some minor changes based on feedback from PASST team > > v3: More changes based on feedback from D. Gibson and S. Brivio > > -Moved new option to pasta-only section > > -Added description to man-page > > --- > > conf.c | 7 ++++++- > > fwd.c | 2 +- > > passt.1 | 4 ++++ > > passt.h | 2 ++ > > 4 files changed, 13 insertions(+), 2 deletions(-) > >=20 > > diff --git a/conf.c b/conf.c > > index eaa7d99..53f6770 100644 > > --- a/conf.c > > +++ b/conf.c > > @@ -977,7 +977,8 @@ pasta_opts: > > " Don't copy all routes to namespace\n" > > " --no-copy-addrs DEPRECATED:\n" > > " Don't copy all addresses to namespace\n" > > - " --ns-mac-addr ADDR Set MAC address on tap interface\n"); > > + " --ns-mac-addr ADDR Set MAC address on tap interface\n" > > + " --no-splice Disable inbound socket splicing\n"); > > =20 > > exit(status); > > } > > @@ -1319,6 +1320,7 @@ void conf(struct ctx *c, int argc, char **argv) > > {"no-dhcpv6", no_argument, &c->no_dhcpv6, 1 }, > > {"no-ndp", no_argument, &c->no_ndp, 1 }, > > {"no-ra", no_argument, &c->no_ra, 1 }, > > + {"no-splice", no_argument, &c->no_splice, 1 }, > > {"freebind", no_argument, &c->freebind, 1 }, > > {"no-map-gw", no_argument, &no_map_gw, 1 }, > > {"ipv4-only", no_argument, NULL, '4' }, > > @@ -1756,6 +1758,9 @@ void conf(struct ctx *c, int argc, char **argv) > > } > > } while (name !=3D -1); > > =20 > > + if (c->mode =3D=3D MODE_PASST) > > + c->no_splice =3D 1; >=20 > Oops, sorry, I missed this during review, but tests caught it: this > needs to be if (c->mode !=3D MODE_PASTA) to also include the MODE_VU > case, otherwise: Good point. Sorry I missed this on review. --=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 --e11524PsbYvhtj2I Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmdSKm8ACgkQzQJF27ox 2GcVew//UeXbQY/SpsllNOnHQEivX4L1M0t+sz0UeyI8ctemPHvRtAOdnrVr04mh 6iAXQoaRfSAOWl7LToJgnTGjAY9BcZyig9XQt6d9/rsxTsSZf28+zx7dJ1sFSZ6X GD3yeH2Ct1PlY/wb76u8tGrSrTrcTmjq7jCC+kuKk9+c6OvejeuA4tJ92ptuiyPM DzO1EnuChOVuHa/FSABHbcu4jziyv9xxS4u9ksu4XdPGPdYm0zZu/leRHQkbMgOd rQLWHn9A7HphfoAljwnaS2I8fZgHeI4oU3x6SNl7MN8d5TCdVzHml4Up/nL0ovZP VJUbzKdxn46Oc6e8dD3HX10UlKHm2EqJ68Y7uE/yXzbbyKJUZDmAHTtoErNMLw0K 6iCi5lGbSKeJJql/+lg7b5xur+n/EH+H9ZYZ4CiUGZhWOh2Xgch/b2bT21KCBSv6 h7U0JotcgNFNDDa5gJYhKijpdpEOQAmVHPBOxfsmdIuzGcOLjlvWihb41cTk4PqE ChjzoMEG/Db3msh5R+ecVv68geh6uhHCl89vnUTcvX0EuYDGKJERoxgcDfFwnW94 tAfzm/vPM4xNiSGhj2xxwzADAGz2fdUYEf4jLyi+yBpU3P/hSrguJ3uGsne88He3 0i0VchLjYv/fIAlZnbbq4acrV1iXw7efOGus//B7i3X0zpZYmvE= =LwpV -----END PGP SIGNATURE----- --e11524PsbYvhtj2I--