mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: mptcp@lists.linux.dev
Subject: [PATCH mptcp-next] Squash-to: "mptcp: faster active backup recovery"
Date: Wed, 14 Jul 2021 10:55:06 +0200	[thread overview]
Message-ID: <1d91265cca09bb69516907f44b5e4b72c4efabe1.1626252886.git.pabeni@redhat.com> (raw)

kbuildbot rightfully complainted about non initialized variable
We can drop that variable altogether, and always try to push
the pending data: after the stale even we can possibly use
backup subflow to flush out tx queue.

Additionally fix doc a bit.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 Documentation/networking/mptcp-sysctl.rst | 12 ++++++------
 net/mptcp/pm_netlink.c                    | 12 +++++++-----
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/Documentation/networking/mptcp-sysctl.rst b/Documentation/networking/mptcp-sysctl.rst
index 45fa8b2aefa8..b0d4da71e68e 100644
--- a/Documentation/networking/mptcp-sysctl.rst
+++ b/Documentation/networking/mptcp-sysctl.rst
@@ -47,12 +47,12 @@ allow_join_initial_addr_port - BOOLEAN
 	Default: 1
 
 stale_loss_cnt - INTEGER
-        The number of MPTCP-level retransmission intervals with no traffic and
-        pending outstanding data on a given subflow required to declare it stale.
-        The packet scheduler ignores stale subflows.
-        A low stale_loss_cnt  value allows for fast active-backup switch-over,
-        an high value maximixe links utilization on edge scenarios e.g. lossy
-        link with high BER or peer pausing the data processing.
+	The number of MPTCP-level retransmission intervals with no traffic and
+	pending outstanding data on a given subflow required to declare it stale.
+	The packet scheduler ignores stale subflows.
+	A low stale_loss_cnt  value allows for fast active-backup switch-over,
+	an high value maximize links utilization on edge scenarios e.g. lossy
+	link with high BER or peer pausing the data processing.
 
 	This is a per-namespace sysctl.
 
diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index 3d4fa2dd2cea..05a2da20ab31 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -908,7 +908,7 @@ void mptcp_pm_nl_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ss
 	unsigned int active_max_loss_cnt;
 	struct net *net = sock_net(sk);
 	unsigned int stale_loss_cnt;
-	bool slow, push;
+	bool slow;
 
 	stale_loss_cnt = mptcp_stale_loss_cnt(net);
 	if (subflow->stale || !stale_loss_cnt || subflow->stale_count <= stale_loss_cnt)
@@ -923,14 +923,16 @@ void mptcp_pm_nl_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ss
 			slow = lock_sock_fast(ssk);
 			if (!tcp_rtx_and_write_queues_empty(ssk)) {
 				subflow->stale = 1;
-				push = __mptcp_retransmit_pending_data(sk);
+				__mptcp_retransmit_pending_data(sk);
 				MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_SUBFLOWSTALE);
 			}
 			unlock_sock_fast(ssk, slow);
 
-			/* pending data on the idle subflow: retransmit */
-			if (push)
-				__mptcp_push_pending(sk, 0);
+			/* always try to push the pending data regarless of re-injections:
+			 * we can possibly use backup subflows now, and subflow selection
+			 * is cheap under the msk socket lock
+			 */
+			__mptcp_push_pending(sk, 0);
 			return;
 		}
 	}
-- 
2.26.3


                 reply	other threads:[~2021-07-14  8:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1d91265cca09bb69516907f44b5e4b72c4efabe1.1626252886.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=mptcp@lists.linux.dev \
    --subject='Re: [PATCH mptcp-next] Squash-to: "mptcp: faster active backup recovery"' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox