From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: Jon Maloy <jmaloy@redhat.com>,
passt-dev@passt.top, lvivier@redhat.com, dgibson@redhat.com
Subject: Re: [PATCH v3] pasta: make it possible to disable socket splicing
Date: Fri, 6 Dec 2024 09:34:23 +1100 [thread overview]
Message-ID: <Z1Iqb3TdtEyg6-Q-@zatzit> (raw)
In-Reply-To: <20241205210626.4639b7a5@elisabeth>
[-- Attachment #1: Type: text/plain, Size: 2585 bytes --]
On Thu, Dec 05, 2024 at 09:06:26PM +0100, Stefano Brivio wrote:
> On Tue, 3 Dec 2024 16:53:02 -0500
> Jon Maloy <jmaloy@redhat.com> wrote:
>
> > During testing it is sometimes useful to force traffic which would
> > normally be forwared by socket splicing through the tap interface.
> >
> > In this commit, we add a command switch enabling such funtionality
> > for inbound local traffic.
> >
> > For outbound local traffic this is much trickier, if even possible,
> > so leave that for a later commit.
> >
> > Suggested-by: David Gibson <david@gibson.dropbear.id.au>
> > Signed-off-by: Jon Maloy <jmaloy@redhat.com>
> >
> > ---
> > 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(-)
> >
> > 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");
> >
> > 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 != -1);
> >
> > + if (c->mode == MODE_PASST)
> > + c->no_splice = 1;
>
> Oops, sorry, I missed this during review, but tests caught it: this
> needs to be if (c->mode != MODE_PASTA) to also include the MODE_VU
> case, otherwise:
Good point. Sorry I missed this on review.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2024-12-05 22:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 21:53 [PATCH v3] pasta: make it possible to disable socket splicing Jon Maloy
2024-12-03 22:07 ` Stefano Brivio
2024-12-04 2:09 ` David Gibson
2024-12-05 20:06 ` Stefano Brivio
2024-12-05 22:34 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z1Iqb3TdtEyg6-Q-@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=dgibson@redhat.com \
--cc=jmaloy@redhat.com \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).