From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] [PATCH v3 6/6] mptcp: send acks when moving skbs to mptcp receive queue
Date: Tue, 18 Feb 2020 13:21:10 +0100 [thread overview]
Message-ID: <20200218122110.23817-7-fw@strlen.de> (raw)
In-Reply-To: 20200218122110.23817-1-fw@strlen.de
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
Signed-off-by: Florian Westphal <fw(a)strlen.de>
---
include/net/tcp.h | 1 +
net/ipv4/tcp.c | 2 +-
net/mptcp/protocol.c | 3 +++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/net/tcp.h b/include/net/tcp.h
index a5ea27df3c2b..454ecab0df8b 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -650,6 +650,7 @@ static inline int tcp_bound_to_half_wnd(struct tcp_sock *tp, int pktsize)
/* tcp.c */
void tcp_get_info(struct sock *, struct tcp_info *);
+void tcp_cleanup_rbuf(struct sock *sk, int copied);
/* Read 'sendfile()'-style from a TCP socket */
int tcp_read_sock(struct sock *sk, read_descriptor_t *desc,
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 1b685485a5b5..62362885a518 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1517,7 +1517,7 @@ static int tcp_peek_sndq(struct sock *sk, struct msghdr *msg, int len)
* calculation of whether or not we must ACK for the sake of
* a window update.
*/
-static void tcp_cleanup_rbuf(struct sock *sk, int copied)
+void tcp_cleanup_rbuf(struct sock *sk, int copied)
{
struct tcp_sock *tp = tcp_sk(sk);
bool time_to_ack = false;
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 02aba8b31f1f..93963bf3f9fe 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -773,6 +773,9 @@ static bool __mptcp_move_skbs(struct mptcp_sock *msk)
more_data_avail = mptcp_subflow_data_available(ssk);
} while (more_data_avail);
+ if (moved > 0)
+ tcp_cleanup_rbuf(ssk, moved);
+
release_sock(ssk);
} while (!done);
--
2.24.1
next reply other threads:[~2020-02-18 12:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 12:21 Florian Westphal [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-02-20 14:34 [MPTCP] [PATCH v3 6/6] mptcp: send acks when moving skbs to mptcp receive queue Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200218122110.23817-7-fw@strlen.de \
--to=unknown@example.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.