Skip to content

Commit

Permalink
tcp: consistently disable header prediction for mptcp
Browse files Browse the repository at this point in the history
BugLink: https://bugs.launchpad.net/bugs/1940139

commit 71158bb upstream.

The MPTCP receive path is hooked only into the TCP slow-path.
The DSS presence allows plain MPTCP traffic to hit that
consistently.

Since commit e1ff9e8 ("net: mptcp: improve fallback to TCP"),
when an MPTCP socket falls back to TCP, it can hit the TCP receive
fast-path, and delay or stop triggering the event notification.

Address the issue explicitly disabling the header prediction
for MPTCP sockets.

Closes: multipath-tcp/mptcp_net-next#200
Fixes: e1ff9e8 ("net: mptcp: improve fallback to TCP")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
  • Loading branch information
Paolo Abeni authored and smb49 committed Sep 3, 2021
1 parent c757667 commit f858324
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,10 @@ static inline u32 __tcp_set_rto(const struct tcp_sock *tp)

static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd)
{
/* mptcp hooks are only on the slow path */
if (sk_is_mptcp((struct sock *)tp))
return;

tp->pred_flags = htonl((tp->tcp_header_len << 26) |
ntohl(TCP_FLAG_ACK) |
snd_wnd);
Expand Down

0 comments on commit f858324

Please sign in to comment.