MPTCP Linux Development
 help / color / mirror / Atom feed
From: Tao Cui <cui.tao@linux.dev>
To: kalpan.jani@mpiricsoftware.com
Cc: janak@mpiric.us, kalpanjani009@gmail.com, martineau@kernel.org,
	matttbe@kernel.org, mptcp@lists.linux.dev, pabeni@redhat.com,
	shardul.b@mpiricsoftware.com, shardulsb08@gmail.com,
	cui.tao@linux.dev, cuitao@kylinos.cn,
	syzbot+55c2a5c871441261ed14@syzkaller.appspotmail.com
Subject: Re: [PATCH net v3] mptcp: pm: drop pending ADD_ADDR when removing id 0 endpoint
Date: Thu, 18 Jun 2026 08:10:34 +0800	[thread overview]
Message-ID: <20260618001035.1701878-1-cui.tao@linux.dev> (raw)
In-Reply-To: <20260529085415.1562229-1-kalpan.jani@mpiricsoftware.com>

From: Tao Cui <cuitao@kylinos.cn>

Hi Kalpan,

First of all, thanks for this patch!

While playing with it on top of the current tree, I think I may have
bumped into a small detail, and I just wanted to mention it in case it
is useful — please do correct me if I got any of this wrong.

After the "mptcp: pm: uniform announced addresses helpers" refactor
(7d4dacc8ccca), the helper became mptcp_pm_announced_remove(), and its
lookup uses mptcp_addresses_equal(..., /* use_port = */ true). A pending
ADD_ADDR entry coming from a signal endpoint added without a port
(`ip mptcp endpoint add ADDR signal`) is keyed with port 1, while
msk_local carries the connection's local port. With a listener on port
5000, a temporary printk in the id 0 path shows:

    msk_local.port = 5000
    announced(port0_lookup) = 1

So, at least in this configuration, passing msk_local directly does not
match the entry: the stale entry survives, and the WARN still shows up
on the next reselection. It only goes away when the port is ignored
during the lookup.

If that matches what you see, the smallest change that keeps the v3
shape would be to clear the port before the lookup, something like:

        struct mptcp_addr_info anno_addr = msk_local;

        anno_addr.port = 0;
        announced = mptcp_pm_announced_remove(msk, &anno_addr);

(An address-only variant of the lookup might be a touch cleaner, since a
signal entry never carries the connection port — but the one-liner above
is enough to fix the case I reproduced.)

I have a small repro that triggers it deterministically if it would help
— happy to share.

Thanks again for looking into this, and sorry for the noise if I'm
missing something obvious here.

Cheers,
Tao

      parent reply	other threads:[~2026-06-18  0:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29  8:54 [PATCH net v3] mptcp: pm: drop pending ADD_ADDR when removing id 0 endpoint Kalpan Jani
2026-05-29 10:06 ` MPTCP CI
2026-06-18  0:10 ` Tao Cui [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=20260618001035.1701878-1-cui.tao@linux.dev \
    --to=cui.tao@linux.dev \
    --cc=cuitao@kylinos.cn \
    --cc=janak@mpiric.us \
    --cc=kalpan.jani@mpiricsoftware.com \
    --cc=kalpanjani009@gmail.com \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=shardul.b@mpiricsoftware.com \
    --cc=shardulsb08@gmail.com \
    --cc=syzbot+55c2a5c871441261ed14@syzkaller.appspotmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox