Skip to content

Commit

Permalink
mptcp: tune re-injections for csum enabled mode
Browse files Browse the repository at this point in the history
If the MPTCP-level checksum is enabled, on re-injections we
must spool a complete DSS, or the receive side will not be
able to compute the csum and process any data.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
  • Loading branch information
Paolo Abeni authored and matttbe committed May 6, 2021
1 parent ac7a5e6 commit 7929c26
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2333,8 +2333,8 @@ static void __mptcp_retrans(struct sock *sk)

/* limit retransmission to the bytes already sent on some subflows */
info.sent = 0;
info.limit = dfrag->already_sent;
while (info.sent < dfrag->already_sent) {
info.limit = READ_ONCE(msk->csum_enabled) ? dfrag->data_len : dfrag->already_sent;
while (info.sent < info.limit) {
if (!mptcp_alloc_tx_skb(sk, ssk))
break;

Expand All @@ -2346,9 +2346,11 @@ static void __mptcp_retrans(struct sock *sk)
copied += ret;
info.sent += ret;
}
if (copied)
if (copied) {
dfrag->already_sent = max(dfrag->already_sent, info.sent);
tcp_push(ssk, 0, info.mss_now, tcp_sk(ssk)->nonagle,
info.size_goal);
}

mptcp_set_timeout(sk, ssk);
release_sock(ssk);
Expand Down

0 comments on commit 7929c26

Please sign in to comment.