mptcp: fixes for SIOCINQ
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest4 patches 1 replyIn review
- v24 patches 1 replySuperseded
- v14 patches 1 replySuperseded
Changes in v3 from the cover letter
- patch 3: fix Sashiko AI review comment
avoid comparing ack_seq with unset rcv_data_fin_seq (0) check TCP_CLOSE/RCV_SHUTDOWN directly, only call mptcp_data_fin() when rcv_data_fin is true, exclude MP_FASTCLOSE from +1
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mptcp: handle ack_seq advancing past rcv_data_fin_seqnet/ | +1 | 0 replies | |
| 2/4 | mptcp: add missing memory barriers for rcv_data_fin_seqnet/ net/ | +4 | 0 replies | |
| 3/4 | mptcp: fix TFO SIOCINQ overflow in mptcp_inq_hintnet/ | +25 | 0 replies | |
| 4/4 | mptcp: add mptcp_inq() for SIOCINQnet/ | +16 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH mptcp-net v3 0/4] mptcp: fixes for SIOCINQ
From: Geliang Tang <[email protected]>
v3:
- patch 3: fix Sashiko AI review comment
avoid comparing ack_seq with unset rcv_data_fin_seq (0) check TCP_CLOSE/RCV_SHUTDOWN directly, only call mptcp_data_fin() when rcv_data_fin is true, exclude MP_FASTCLOSE from +1
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 | 63 ++++++++++++++++++++++++++++---------------- 2 files changed, 42 insertions(+), 22 deletions(-)
Signature · 1 line
2.55.0