[PATCH mptcp-net v2 0/4] mptcp: fixes for SIOCINQ

Geliang Tang posted 4 patches 1 day, 8 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1795348666.git.tanggeliang@kylinos.cn
There is a newer version of this series
net/mptcp/options.c  |  1 +
net/mptcp/protocol.c | 62 +++++++++++++++++++++++++++++---------------
2 files changed, 42 insertions(+), 21 deletions(-)
[PATCH mptcp-net v2 0/4] mptcp: fixes for SIOCINQ
Posted by Geliang Tang 1 day, 8 hours ago
From: Geliang Tang <tanggeliang@kylinos.cn>

v2:
 - patch 3: drop mptcp_data_fin_seq(), reuse mptcp_data_fin()
   - u64 return couldn't distinguish "no DATA_FIN" from "DATA_FIN at seq 0"
   - mptcp_inq_hint() checks rcv_data_fin/TCP_CLOSE/RCV_SHUTDOWN first

The goal of this series is to make MPTCP's SIOCINQ fully consistent with
TCP's: both report the number of readable data bytes, excluding the FIN
byte.

Patch 1 fixes mptcp_pending_data_fin() to use >= instead of == so that
DATA_FIN is processed when ack_seq advances past rcv_data_fin_seq due to
OFO queue processing.

Patch 2 adds missing smp_wmb/smp_rmb barriers for rcv_data_fin_seq on
weakly-ordered architectures.

Patch 3 fixes mptcp_inq_hint() INT_MAX overflow on passive TFO by using
mptcp_data_avail() instead of ack_seq minus map_seq, and reuses
mptcp_data_fin() to guard the FIN byte (+1).

Patch 4 adds mptcp_inq() that excludes the FIN byte, matching TCP's
tcp_inq() behavior, and switches SIOCINQ to it.

Geliang Tang (4):
  mptcp: handle ack_seq advancing past rcv_data_fin_seq
  mptcp: add missing memory barriers for rcv_data_fin_seq
  mptcp: fix TFO SIOCINQ overflow in mptcp_inq_hint
  mptcp: add mptcp_inq() for SIOCINQ

 net/mptcp/options.c  |  1 +
 net/mptcp/protocol.c | 62 +++++++++++++++++++++++++++++---------------
 2 files changed, 42 insertions(+), 21 deletions(-)

-- 
2.55.0
Re: [PATCH mptcp-net v2 0/4] mptcp: fixes for SIOCINQ
Posted by MPTCP CI 1 day, 5 hours ago
Hi Geliang,

Thank you for your modifications, that's great!

Our CI did some validations and here is its report:

- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Perf: Unstable: 1 failed test(s): regression:sched-mem-pressure ⚠️  (1 improvements, 105 new outliers to review)
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/45022623344

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/04f1867918c0
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1218606


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-normal

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)