This is a follow up to the topic discussed in recent pubblic mtg.
Introduces unique id for accurate subflow stats tracking and
aggregate mptcp counters, plus some minimal self-tests.
The tests themself do not take in account support for running on
older kernel.
This is on top of "selftests: mptcp: centralize stats dumping" -
that is should land not on top of the current export branch head.
That in turn will cause some non trivial conflicts with:
"mptcp: use get_retrans wrapper"
the resolution should like the following (for brevity only reporting
the lines affected by the conflict resolution)
---
@@ -2574,16 +2569,17 @@ static void mptcp_check_fastclose(struct mptcp_sock *msk)
static void __mptcp_retrans(struct sock *sk)
{
struct mptcp_sock *msk = mptcp_sk(sk);
+ struct mptcp_subflow_context *subflow;
struct mptcp_sendmsg_info info = {};
struct mptcp_data_frag *dfrag;
- size_t copied = 0;
+ u16 already_sent, len = 0;
struct sock *ssk;
- int ret;
+ int ret, err;
// ...
@@ -2602,32 +2598,48 @@ static void __mptcp_retrans(struct sock *sk)
// ...
- release_sock(ssk);
+ already_send = max(dfrag->already_sent, len);
+ msk->bytes_retrans += already_sent - dfrag->alread_sent;
+ dfrag->already_sent = already_sent;
// ...
Paolo Abeni (4):
mptcp: add subflow unique id
mptcp: move snd_una update earlier for fallback socket.
mptcp: track some aggregate data counters.
selftests: mptcp: explicitly tests aggregate countes
include/uapi/linux/mptcp.h | 8 +++++++
net/mptcp/options.c | 14 ++++++++++-
net/mptcp/protocol.c | 20 ++++++++++------
net/mptcp/protocol.h | 9 +++++++-
net/mptcp/sockopt.c | 23 +++++++++++++++----
.../selftests/net/mptcp/mptcp_sockopt.c | 20 ++++++++++++++++
6 files changed, 80 insertions(+), 14 deletions(-)
--
2.40.0