From: Stefano Brivio <sbrivio@redhat.com>
To: Yumei Huang <yuhuang@redhat.com>
Cc: passt-dev@passt.top, david@gibson.dropbear.id.au
Subject: Re: [PATCH] udp: Split activity timeouts for UDP flows
Date: Sat, 14 Feb 2026 10:15:41 +0100 (CET) [thread overview]
Message-ID: <20260214101540.51335a48@elisabeth> (raw)
In-Reply-To: <CANsz47=3Os4D7SOnN5_k=mrMhC4r5pTyGr56TAGMWAubwhWr+w@mail.gmail.com>
On Sat, 14 Feb 2026 15:20:26 +0800
Yumei Huang <yuhuang@redhat.com> wrote:
> On Fri, Feb 13, 2026 at 6:17 PM Stefano Brivio <sbrivio@redhat.com> wrote:
> >
> > On Fri, 13 Feb 2026 18:04:59 +0800
> > Yumei Huang <yuhuang@redhat.com> wrote:
> >
> > > On Fri, Feb 13, 2026 at 6:00 PM Stefano Brivio <sbrivio@redhat.com> wrote:
> > > >
> > > > On Fri, 13 Feb 2026 17:54:56 +0800
> > > > Yumei Huang <yuhuang@redhat.com> wrote:
> > > >
> > > > > On Fri, Feb 13, 2026 at 5:13 PM Stefano Brivio <sbrivio@redhat.com> wrote:
> > > > > >
> > > > > > On Fri, 13 Feb 2026 15:49:41 +0800
> > > > > > Yumei Huang <yuhuang@redhat.com> wrote:
> > > > > >
> > > > > > > But in my test, udp_flow_from_sock() is only called for
> > > > > > > the first datagram, so the if condition after flow_lookup_sa() always
> > > > > > > returns false, and a new UDP flow is created.
> > > > > >
> > > > > > Ah, right! See below.
> > > > > >
> > > > > > > Tried either spliced /
> > > > > > > non-spliced, pasta / passt case, no exceptions observed. I was wondering
> > > > > > > if there is a scenario I'm not aware of.
> > > > > >
> > > > > > Yes, I think it's just for one corner case David described in the "Flow
> > > > > > sockets" section of the "Theory of Operation" documentation in udp.c:
>
> [...]
>
> Just have another look, instead of this case, I feel it's more like
> the one described in
> https://passt.top/passt/commit/udp_flow.c?id=9725e79888374a4e4060a2d798f3407c0006cc8a,
> which is packets arriving between bind() and connect(), and
> udp_sock_fwd() / udp_flow_from_sock() is called again to forward the
> packets. In this case, we should count the activity. The timestamp
> might not be so accurate, but should be very close. So I'm keeping it.
Hmm, I guess you're right, and actually that path shouldn't be called
for listening sockets. In any case, if you update the packet count
whenever the timestamp is updated, as you did on v3, that should be
correct. Running tests there in a bit.
--
Stefano
prev parent reply other threads:[~2026-02-14 9:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 8:04 Yumei Huang
2026-02-12 8:59 ` Stefano Brivio
2026-02-12 21:51 ` Stefano Brivio
[not found] ` <CANsz47mGXDgJSKpLqFiW_n5bXW13ZiayC_xhBEEGeBJTZwN5Xw@mail.gmail.com>
2026-02-13 7:08 ` Stefano Brivio
[not found] ` <CANsz47m8BPdUK2N-_Ka5GUHP_USnyHgO01Accktf-wxuX5rxDw@mail.gmail.com>
2026-02-13 9:12 ` Stefano Brivio
2026-02-13 9:54 ` Yumei Huang
2026-02-13 10:00 ` Stefano Brivio
2026-02-13 10:04 ` Yumei Huang
2026-02-13 10:17 ` Stefano Brivio
2026-02-14 7:20 ` Yumei Huang
2026-02-14 9:15 ` Stefano Brivio [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=20260214101540.51335a48@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=yuhuang@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).