diff options
author | Paolo Abeni <pabeni@redhat.com> | 2020-11-19 11:46:03 -0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-20 15:33:25 -0800 |
commit | ea4ca586b16ff2eb6157fe13969eb72d2403a3a1 (patch) | |
tree | 8d17cb274f9432777f1f69fe0ee729b714cc345a /net/mptcp/subflow.c | |
parent | fa3fe2b150316b294f2c662653501273ff25bba8 (diff) | |
download | linux-ea4ca586b16ff2eb6157fe13969eb72d2403a3a1.tar.bz2 |
mptcp: refine MPTCP-level ack scheduling
Send timely MPTCP-level ack is somewhat difficult when
the insertion into the msk receive level is performed
by the worker.
It needs TCP-level dup-ack to notify the MPTCP-level
ack_seq increase, as both the TCP-level ack seq and the
rcv window are unchanged.
We can actually avoid processing incoming data with the
worker, and let the subflow or recevmsg() send ack as needed.
When recvmsg() moves the skbs inside the msk receive queue,
the msk space is still unchanged, so tcp_cleanup_rbuf() could
end-up skipping TCP-level ack generation. Anyway, when
__mptcp_move_skbs() is invoked, a known amount of bytes is
going to be consumed soon: we update rcv wnd computation taking
them in account.
Additionally we need to explicitly trigger tcp_cleanup_rbuf()
when recvmsg() consumes a significant amount of the receive buffer.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/subflow.c')
-rw-r--r-- | net/mptcp/subflow.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index d3c6b3a5ad55..4d8abff1be18 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -850,8 +850,6 @@ static void mptcp_subflow_discard_data(struct sock *ssk, struct sk_buff *skb, sk_eat_skb(ssk, skb); if (mptcp_subflow_get_map_offset(subflow) >= subflow->map_data_len) subflow->map_valid = 0; - if (incr) - tcp_cleanup_rbuf(ssk, incr); } static bool subflow_check_data_avail(struct sock *ssk) @@ -973,7 +971,7 @@ void mptcp_space(const struct sock *ssk, int *space, int *full_space) const struct mptcp_subflow_context *subflow = mptcp_subflow_ctx(ssk); const struct sock *sk = subflow->conn; - *space = tcp_space(sk); + *space = __mptcp_space(sk); *full_space = tcp_full_space(sk); } |