diff options
author | Florian Westphal <fw@strlen.de> | 2020-02-26 12:14:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-27 07:46:26 +0300 |
commit | 101f6f851ee6268a46e2dcec244a812fd9a9195a (patch) | |
tree | 2938e591ee284f9e18dd9d7d194fe39921249c98 /net/mptcp/subflow.c | |
parent | 5cd129dd5e45b9c3c61ec373c3ec1d60925dc65d (diff) | |
download | linux-101f6f851ee6268a46e2dcec244a812fd9a9195a.tar.xz |
mptcp: add and use mptcp_data_ready helper
allows us to schedule the work queue to drain the ssk receive queue in
a followup patch.
This is needed to avoid sending all-to-pessimistic mptcp-level
acknowledgements. At this time, the ack_seq is what was last read by
userspace instead of the highest in-sequence number queued for reading.
Signed-off-by: Florian Westphal <fw@strlen.de>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mptcp/subflow.c')
-rw-r--r-- | net/mptcp/subflow.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 65122edf60aa..3dad662840aa 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -554,11 +554,8 @@ static void subflow_data_ready(struct sock *sk) return; } - if (mptcp_subflow_data_available(sk)) { - set_bit(MPTCP_DATA_READY, &mptcp_sk(parent)->flags); - - parent->sk_data_ready(parent); - } + if (mptcp_subflow_data_available(sk)) + mptcp_data_ready(parent); } static void subflow_write_space(struct sock *sk) @@ -690,11 +687,8 @@ static void subflow_state_change(struct sock *sk) * a fin packet carrying a DSS can be unnoticed if we don't trigger * the data available machinery here. */ - if (parent && subflow->mp_capable && mptcp_subflow_data_available(sk)) { - set_bit(MPTCP_DATA_READY, &mptcp_sk(parent)->flags); - - parent->sk_data_ready(parent); - } + if (parent && subflow->mp_capable && mptcp_subflow_data_available(sk)) + mptcp_data_ready(parent); if (parent && !(parent->sk_shutdown & RCV_SHUTDOWN) && !subflow->rx_eof && subflow_is_done(sk)) { |