public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top, Jon Maloy <jmaloy@redhat.com>
Subject: Re: [PATCH 00/12] Use connect()ed sockets for both sides of UDP flows
Date: Fri, 25 Apr 2025 10:07:06 +0200	[thread overview]
Message-ID: <20250425100706.5726013a@elisabeth> (raw)
In-Reply-To: <aAswdtlZkk1Urjsi@zatzit>

On Fri, 25 Apr 2025 13:49:26 +0700
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Fri, Apr 25, 2025 at 08:27:00AM +0200, Stefano Brivio wrote:
> > On Fri,  4 Apr 2025 21:15:30 +1100
> > David Gibson <david@gibson.dropbear.id.au> wrote:
> >   
> > > As discussed, I've been working on using connect()ed sockets, rather
> > > than dups of the listening sockets for handling traffic on the
> > > initiating side of UDP flows.  This improves consistency, avoids some
> > > problems (bug 103) and will allow for some useful future improvements.
> > > 
> > > It has the nice side effect of allowing some more code to be shared
> > > between various paths, resulting in a pretty nice negative diffstat.
> > > 
> > > David Gibson (12):
> > >   udp: Use connect()ed sockets for initiating side
> > >   udp: Make udp_sock_recv() take max number of frames as a parameter
> > >   udp: Polish udp_vu_sock_info() and remove from vu specific code
> > >   udp: Don't bother to batch datagrams from "listening" socket
> > >   udp: Parameterize number of datagrams handled by
> > >     udp_*_reply_sock_data()
> > >   udp: Split spliced forwarding path from udp_buf_reply_sock_data()
> > >   udp: Merge vhost-user and "buf" listening socket paths
> > >   udp: Move UDP_MAX_FRAMES to udp.c
> > >   udp_flow: Take pif and port as explicit parameters to
> > >     udp_flow_from_sock()
> > >   udp: Rework udp_listen_sock_data() into udp_sock_fwd()
> > >   udp: Fold udp_splice_prepare and udp_splice_send into udp_sock_to_sock
> > >   udp_flow: Don't discard packets that arrive between bind() and
> > >     connect()  
> > 
> > Just for the record: it's likely that something here made
> > https://github.com/containers/podman/issues/25959 more visible (or
> > directly caused it). I couldn't rule out recent ICMP changes yet,
> > but I'm fairly sure it's not those.  
> 
> Drat.  I concur this series is the likely culprit.  First place to
> check would be the error paths for a flow initiated from the host side
> (there are new ones because this now involves opening a new socket).
> Maybe we didn't clean something up in one of those cases leaving a
> bomb for a future allocation.

Right, either that, or perhaps the flow_defer_handler() loop setting
free_head to NULL if the UDP flow is (!closed) regardless of what
happened in the previous loop iterations... that looks a bit weird to
me.

-- 
Stefano


  reply	other threads:[~2025-04-25  8:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-04 10:15 [PATCH 00/12] Use connect()ed sockets for both sides of UDP flows David Gibson
2025-04-04 10:15 ` [PATCH 01/12] udp: Use connect()ed sockets for initiating side David Gibson
2025-04-04 10:15 ` [PATCH 02/12] udp: Make udp_sock_recv() take max number of frames as a parameter David Gibson
2025-04-07 21:49   ` Stefano Brivio
2025-04-04 10:15 ` [PATCH 03/12] udp: Polish udp_vu_sock_info() and remove from vu specific code David Gibson
2025-04-07 21:49   ` Stefano Brivio
2025-04-04 10:15 ` [PATCH 04/12] udp: Don't bother to batch datagrams from "listening" socket David Gibson
2025-04-04 10:15 ` [PATCH 05/12] udp: Parameterize number of datagrams handled by udp_*_reply_sock_data() David Gibson
2025-04-04 10:15 ` [PATCH 06/12] udp: Split spliced forwarding path from udp_buf_reply_sock_data() David Gibson
2025-04-07 21:49   ` Stefano Brivio
2025-04-04 10:15 ` [PATCH 07/12] udp: Merge vhost-user and "buf" listening socket paths David Gibson
2025-04-04 10:15 ` [PATCH 08/12] udp: Move UDP_MAX_FRAMES to udp.c David Gibson
2025-04-04 10:15 ` [PATCH 09/12] udp_flow: Take pif and port as explicit parameters to udp_flow_from_sock() David Gibson
2025-04-07 21:49   ` Stefano Brivio
2025-04-04 10:15 ` [PATCH 10/12] udp: Rework udp_listen_sock_data() into udp_sock_fwd() David Gibson
2025-04-04 10:15 ` [PATCH 11/12] udp: Fold udp_splice_prepare and udp_splice_send into udp_sock_to_sock David Gibson
2025-04-07 21:49   ` Stefano Brivio
2025-04-04 10:15 ` [PATCH 12/12] udp_flow: Don't discard packets that arrive between bind() and connect() David Gibson
2025-04-07 21:49   ` Stefano Brivio
2025-04-07 21:49 ` [PATCH 00/12] Use connect()ed sockets for both sides of UDP flows Stefano Brivio
2025-04-07 23:50   ` David Gibson
2025-04-25  6:27 ` Stefano Brivio
2025-04-25  6:49   ` David Gibson
2025-04-25  8:07     ` Stefano Brivio [this message]
2025-04-25  8:35       ` David Gibson

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=20250425100706.5726013a@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=jmaloy@redhat.com \
    --cc=passt-dev@passt.top \
    /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).