From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: Jon Maloy <jmaloy@redhat.com>, passt-dev@passt.top
Subject: Re: [PATCH v5] udp: support traceroute
Date: Fri, 4 Apr 2025 22:11:25 +1100 [thread overview]
Message-ID: <Z---XZG6NcIJAAM8@zatzit> (raw)
In-Reply-To: <20250404130145.57b91f6c@elisabeth>
[-- Attachment #1: Type: text/plain, Size: 2641 bytes --]
On Fri, Apr 04, 2025 at 01:01:45PM +0200, Stefano Brivio wrote:
> On Fri, 4 Apr 2025 11:57:58 +1100
> David Gibson <david@gibson.dropbear.id.au> wrote:
>
> > On Fri, Apr 04, 2025 at 10:40:27AM +1100, David Gibson wrote:
> > > On Thu, Apr 03, 2025 at 06:27:06PM -0400, Jon Maloy wrote:
> > > > Now that ICMP pass-through from socket-to-tap is in place, it is
> > > > easy to support UDP based traceroute functionality in direction
> > > > tap-to-socket.
> > > >
> > > > We fix that in this commit.
> > > >
> > > > Link: https://bugs.passt.top/show_bug.cgi?id=64
> > > > Signed-off-by: Jon Maloy <jmaloy@redhat.com>
> > >
> > > Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> > >
> > > One commont below.
> >
> > Oh.. wait. I just realised this patch has a weird side effect, for
> > flows which are initiated from outside, rather than from the guest.
> >
> > If the flow is initiated from outside, it's maybe a bit unlikely, but
> > we could still get a non-default TTL from the guest on reply
> > datagrams. That will trigger this code and alter the socket's TTL.
> > But in this case the socket is not a flow specific socket, but the
> > listening socket which initiated the flow, which could be handling
> > packets on many flows.
> >
> > The "cached" TTL is stored per-flow, not per-socket, so we won't look
> > at the right value when we process datagrams from other flows, so they
> > may go out with the wrong TTL.
> >
> > I think the obvious way to address this is to stop using the
> > "listening" socket to send datagrams for a flow, using a connect()ed
> > socket instead. We have other reasons to do that too, and I'm working
> > on implementing that right now.
> >
> > The question is whether this is a serious enough problem to delay this
> > until the "both sides connect()ed sockets" change is merged.
>
> On the other hand, this patch applies cleanly on top of your "Use
> connect()ed sockets for both sides of UDP flows" series, and also
> semantically I couldn't spot any particular change or integration
> that we would need as a result in this patch.
Ah.. yeah. When I wrote the above I didn't think I'd finish that
series today :).
> I haven't reviewed the series yet, but I don't think that an eventual
> re-spin would change this, so... problem solved I guess? I can just
> wait and apply them together.
Yeah, I guess so. Hooray!
--
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:[~2025-04-04 11:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-03 22:27 [PATCH v5] udp: support traceroute Jon Maloy
2025-04-03 23:40 ` David Gibson
2025-04-04 0:57 ` David Gibson
2025-04-04 11:01 ` Stefano Brivio
2025-04-04 11:11 ` 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=Z---XZG6NcIJAAM8@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=jmaloy@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).