netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tom Herbert <tom@herbertland.com>
To: netdev@vger.kernel.org, davem@davemloft.net, brakmo@fb.com,
	ycheng@google.com, eric.dumazet@gmail.com, a.e.azimov@gmail.com
Cc: Tom Herbert <tom@herbertland.com>
Subject: [RFC PATCH net-next 3/3] txhash: Change default rethink behavior to be less aggressive
Date: Mon,  9 Aug 2021 11:53:14 -0700	[thread overview]
Message-ID: <20210809185314.38187-4-tom@herbertland.com> (raw)
In-Reply-To: <20210809185314.38187-1-tom@herbertland.com>

Revert the default rethink behavior to only do a rethink upon negative
advice (at three RTOs with current defaults). This is less aggressive
than the current default which is to rethink the hash at the first
RTO.

The rationale for this change is that IP anycast relies on consistent
routing and changing the hash may affect the routing of the packet
For instance, if the hash is changed then the flow label used for
a TCP connection is changed and so the routing of packets for the
connection may change. If the destination address is anycast, a
route change may direct packets to a different server than doesn't
have state for the connection thereby breaking the connection is broken.
---
 net/core/net_namespace.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index 03d3767e6728..bf9696dd7106 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -367,10 +367,8 @@ static int __net_init net_defaults_init_net(struct net *net)
 {
 	net->core.sysctl_somaxconn = SOMAXCONN;
 
-	/* Default rethink mode is aggrssive (i.e. rethink on first RTO) */
-	net->core.sysctl_txrehash_mode = SOCK_TXREHASH_MODE_NEG_ADVICE |
-					 SOCK_TXREHASH_MODE_SYN_RTO |
-					 SOCK_TXREHASH_MODE_RTO;
+	/* Default rethink mode is negative advice (i.e. not rthink on RTO) */
+	net->core.sysctl_txrehash_mode = SOCK_TXREHASH_MODE_NEG_ADVICE;
 
 	return 0;
 }
-- 
2.25.1


  parent reply	other threads:[~2021-08-09 18:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 18:53 [RFC PATCH net-next 0/3] txhash: Make hash rethink configurable and change the default Tom Herbert
2021-08-09 18:53 ` [RFC PATCH net-next 1/3] txhash: Make rethinking txhash behavior configurable via sysctl Tom Herbert
2021-08-09 18:53 ` [RFC PATCH net-next 2/3] txhash: Add socket option to control TX hash rethink behavior Tom Herbert
2021-08-09 18:53 ` Tom Herbert [this message]
2021-08-09 21:56 ` [RFC PATCH net-next 0/3] txhash: Make hash rethink configurable and change the default Yuchung Cheng
2021-08-09 21:58   ` Yuchung Cheng

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=20210809185314.38187-4-tom@herbertland.com \
    --to=tom@herbertland.com \
    --cc=a.e.azimov@gmail.com \
    --cc=brakmo@fb.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ycheng@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).