MPTCP Linux Development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>
Cc: sashiko-reviews@lists.linux.dev, MPTCP Linux <mptcp@lists.linux.dev>
Subject: Re: [PATCH mptcp-next mptcp-net v7 6/6] mptcp: count the DATA_FIN in mptcp_inq_hint
Date: Sat, 5 Dec 2026 15:28:53 +0100	[thread overview]
Message-ID: <e72a147c-3480-45e0-89e4-3abe23c81d2d@kernel.org> (raw)
In-Reply-To: <546e379705e93844278290439f245b94e3190470.camel@kernel.org>

Hi Geliang,

On 05/12/2026 00:06, Geliang Tang wrote:
> Hi Matt,
> 
> On Fri, 2026-12-04 at 13:12 +0100, Matthieu Baerts wrote:
>> Hi Geliang,
>>
>> On 04/12/2026 11:55, Geliang Tang wrote:
>>
>>> Thank you very much for helping me send this v7.
>>
>> You're welcome!
>>
>>> On Thu, 2026-12-03 at 18:50 +0000, sashiko-bot@kernel.org wrote:
>>>> Thank you for your contribution! Sashiko AI review found 3 potential
>>>> issues to consider:
>>>> - [Medium] mptcp: mptcp_inq_hint() omits pending FIN byte on fallback
>>>>   sockets
>>>> - [Medium] mptcp: race in mptcp_inq_hint() counts spurious FIN on
>>>>   fallback RST
>>>> - [Low] mptcp: mptcp_inq_hint() omits TCP_CLOSE check for rcv_data_fin
>>>> --
>>>
>>> I plan to address all three points by replacing the open-coded check in
>>> mptcp_inq_hint() with a new helper:
>>>
>>>         static bool mptcp_pending_eof(const struct sock *sk, u64 *seq)
>>>         {
>>>                 const struct mptcp_sock *msk = mptcp_sk(sk);
>>>
>>>                 if (!mptcp_pending_data_fin(sk, seq))
>>>                         return false;
>>>
>>>                 return !__mptcp_check_fallback(msk) ||
>>>                        (msk->first && sock_flag(msk->first, SOCK_DONE));
>>>         }
>>>
>>> and calling it from mptcp_inq_hint():
>>>
>>>         if (sock_flag(sk, SOCK_DONE) || mptcp_pending_eof(sk, NULL))
>>>                 hint_val += 1;
>>>
>>> Also, the mptcp_rcv_data_fin_in_seq helper can be deleted.
>>
>> Good idea, thank you: the DATA_FIN is then counted in the conditions
>> where mptcp_check_data_fin() will set SOCK_DONE. That fixes the three
>> points, and the series gets shorter!
>>
>> Some small details:
>>
>> - mptcp_pending_data_fin() takes a non-const 'sk': it needs to be
>>   constified, with its 'msk', otherwise the compiler will complain.
>>
>> - The 'seq' parameter can be dropped: it is always NULL, no?
> 
> I'll keep this 'seq' parameter since it will be used in subsequent patches.

OK.

>> - (Optional) The fallback condition duplicates the one from
>>   mptcp_check_data_fin(): a small helper used by both would keep them in
>>   sync? (I didn't check in details)
>>
>> Also, it might be good to add a short note in the commit (under '---')
>> for the 3 notes from Clashiko (or improving the commit message?)
>>
>>> If you think this is okay, I'll send a v8.
>>
>> Yes please, but I think it is always best to wait for Clashiko review
>> before sending a new version:
>>
>> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203-mptcp-fixes-for-siocinq-v7-0-e6d589de9cf8@kernel.org
>>
>> Also, if there are no complain about the 2 first patches, I could
>> already apply them. (But if you are ready before I applied then, feel
> 
> There have been no complaints about the first 5 patches for Clashiko. So patches
> 1, 2, 4, and 5 can all be applied if you want.

OK, just did:

New patches for t/upstream-net and t/upstream:
- ab71be681642: mptcp: fix TFO SIOCINQ overflow in mptcp_inq_hint
- Results: 903a6acff8e8..1f6385e4dff8 (export-net)
- Results: e6c75140c403..a621efb40408 (export)

Tests are now in progress:

- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/1cc2e638db9260152dda2ce873c12ea355d6ed9d/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/120a97fb4e42106b4cee8abd799e1950d6ce3d7a/checks

New patches for t/upstream:
- 658f503e4251: mptcp: add missing memory barriers for rcv_data_fin_seq
- 0e7ab0b26630: mptcp: add mptcp_inq() for SIOCINQ
- 522bc659cdd1: mptcp: use SOCK_DONE in mptcp_inq_hint
- Results: a621efb40408..c74d97230c59 (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/4cf6479e48d41dc7dbffc5984e0ae2b63960a856/checks
Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2026-12-05 14:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 16:48 [PATCH mptcp-net v7 0/6] mptcp: fixes for SIOCINQ Matthieu Baerts (NGI0)
2026-12-03 16:48 ` [PATCH mptcp-net v7 1/6] mptcp: fix TFO SIOCINQ overflow in mptcp_inq_hint Matthieu Baerts (NGI0)
2026-12-03 16:48 ` [PATCH mptcp-next mptcp-net v7 2/6] mptcp: add missing memory barriers for rcv_data_fin_seq Matthieu Baerts (NGI0)
2026-12-03 16:48 ` [PATCH mptcp-next mptcp-net v7 3/6] mptcp: extract mptcp_rcv_data_fin_in_seq helper Matthieu Baerts (NGI0)
2026-12-03 16:48 ` [PATCH mptcp-next mptcp-net v7 4/6] mptcp: add mptcp_inq() for SIOCINQ Matthieu Baerts (NGI0)
2026-12-03 16:48 ` [PATCH mptcp-next mptcp-net v7 5/6] mptcp: use SOCK_DONE in mptcp_inq_hint Matthieu Baerts (NGI0)
2026-12-03 16:48 ` [PATCH mptcp-next mptcp-net v7 6/6] mptcp: count the DATA_FIN " Matthieu Baerts (NGI0)
2026-12-03 18:50   ` sashiko-bot
2026-12-04 10:55     ` Geliang Tang
2026-12-04 12:12       ` Matthieu Baerts
2026-12-04 12:14         ` Matthieu Baerts
2026-12-04 23:06         ` Geliang Tang
2026-12-05 14:28           ` Matthieu Baerts [this message]
2026-12-05  6:21   ` netdev-bot+sashiko
2026-12-03 18:33 ` [PATCH mptcp-net v7 0/6] mptcp: fixes for SIOCINQ MPTCP CI

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=e72a147c-3480-45e0-89e4-3abe23c81d2d@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    /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