All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akhmat Karakotov <hmukos@yandex-team.ru>
To: netdev@vger.kernel.org
Cc: eric.dumazet@gmail.com, tom@herbertland.com,
	mitradir@yandex-team.ru, zeil@yandex-team.ru,
	hmukos@yandex-team.ru
Subject: [RFC PATCH net-next 0/4] txhash: Make hash rethink configurable
Date: Mon, 25 Oct 2021 23:35:17 +0300	[thread overview]
Message-ID: <20211025203521.13507-1-hmukos@yandex-team.ru> (raw)

As it was shown in the report by Alexander Azimov, hash rethink at the client-side may lead to connection timeout toward stateful anycast services. Tom Herbert created a patchset to address this issue by applying hash rethink only after a negative routing event (3RTOs) [1]. This change also affects server-side behavior, which we found undesirable. This patchset changes defaults in a way to make them safe: hash rethink at the client-side is disabled and enabled at the server-side upon each RTO event or in case of duplicate acknowledgments.
This patchset provides two options to change default behaviour. The hash rethink may be disabled at the server-side by the new sysctl option. Changes in the sysctl option don't affect default behavior at the client-side.
Hash rethink can also be enabled/disabled with socket option or bpf syscalls which ovewrite both default and sysctl settings. This socket option is available on both client and server-side. This should provide mechanics to enable hash rethink inside administrative domain, such as DC, where hash rethink at the client-side can be desirable.

[1] https://lore.kernel.org/netdev/20210809185314.38187-1-tom@herbertland.com/

Akhmat Karakotov (4):
  txhash: Make rethinking txhash behavior configurable via sysctl
  txhash: Add socket option to control TX hash rethink behavior
  bpf: Add SO_TXREHASH setsockopt
  tcp: change SYN ACK retransmit behaviour to account for rehash

 arch/alpha/include/uapi/asm/socket.h  |  2 ++
 arch/mips/include/uapi/asm/socket.h   |  2 ++
 arch/parisc/include/uapi/asm/socket.h |  2 ++
 arch/sparc/include/uapi/asm/socket.h  |  2 ++
 include/net/netns/core.h              |  2 ++
 include/net/sock.h                    | 28 ++++++++++++++-------------
 include/uapi/asm-generic/socket.h     |  2 ++
 include/uapi/linux/socket.h           |  4 ++++
 net/core/filter.c                     | 10 ++++++++++
 net/core/net_namespace.c              |  3 +++
 net/core/sock.c                       | 13 +++++++++++++
 net/core/sysctl_net_core.c            |  7 +++++++
 net/ipv4/inet_connection_sock.c       |  3 +++
 net/ipv4/tcp_output.c                 |  3 ++-
 14 files changed, 69 insertions(+), 14 deletions(-)

-- 
2.17.1


             reply	other threads:[~2021-10-25 20:37 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 20:35 Akhmat Karakotov [this message]
2021-10-25 20:35 ` [RFC PATCH net-next 1/4] txhash: Make rethinking txhash behavior configurable via sysctl Akhmat Karakotov
2021-10-25 20:54   ` Eric Dumazet
2021-11-05  6:13   ` [txhash] d7fa06e1ae: WARNING:at_net/sysctl_net.c:#register_net_sysctl kernel test robot
2021-11-05  6:13     ` kernel test robot
2021-11-05  6:13     ` [LTP] " kernel test robot
2021-10-25 20:35 ` [RFC PATCH net-next 2/4] txhash: Add socket option to control TX hash rethink behavior Akhmat Karakotov
2021-10-25 21:05   ` Eric Dumazet
2021-10-29 10:01     ` Akhmat Karakotov
     [not found]       ` <D7FFC160-1DC3-42A5-BE0E-15FD81BEB1F3@yandex-team.ru>
2021-11-08 12:48         ` Akhmat Karakotov
2021-11-08 19:39           ` Eric Dumazet
2021-10-25 20:35 ` [RFC PATCH net-next 3/4] bpf: Add SO_TXREHASH setsockopt Akhmat Karakotov
2021-10-25 20:35 ` [RFC PATCH net-next 4/4] tcp: change SYN ACK retransmit behaviour to account for rehash Akhmat Karakotov
2021-11-12 18:19 ` [RFC PATCH v2 net-next 0/4] txhash: Make hash rethink configurable Akhmat Karakotov
2021-11-12 18:19   ` [RFC PATCH v2 net-next 1/4] txhash: Make rethinking txhash behavior configurable via sysctl Akhmat Karakotov
2021-11-12 18:19   ` [RFC PATCH v2 net-next 2/4] txhash: Add socket option to control TX hash rethink behavior Akhmat Karakotov
2021-11-12 18:19   ` [RFC PATCH v2 net-next 3/4] bpf: Add SO_TXREHASH setsockopt Akhmat Karakotov
2021-11-12 18:19   ` [RFC PATCH v2 net-next 4/4] tcp: change SYN ACK retransmit behaviour to account for rehash Akhmat Karakotov
2021-11-23 13:20   ` [RFC PATCH v2 net-next 0/4] txhash: Make hash rethink configurable Akhmat Karakotov
2021-11-30  9:58     ` Akhmat Karakotov
2021-12-01 16:49       ` Eric Dumazet
2021-12-02 16:40         ` Akhmat Karakotov
2021-12-02 16:40           ` [RFC PATCH v2 net-next 1/4] txhash: Make rethinking txhash behavior configurable via sysctl Akhmat Karakotov
2021-12-02 16:40           ` [RFC PATCH v2 net-next 2/4] txhash: Add socket option to control TX hash rethink behavior Akhmat Karakotov
2021-12-02 17:18             ` Eric Dumazet
2021-12-02 21:59             ` kernel test robot
2021-12-02 21:59               ` kernel test robot
2021-12-02 16:40           ` [RFC PATCH v2 net-next 3/4] bpf: Add SO_TXREHASH setsockopt Akhmat Karakotov
2021-12-02 16:40           ` [RFC PATCH v2 net-next 4/4] tcp: change SYN ACK retransmit behaviour to account for rehash Akhmat Karakotov
2021-12-02 17:24             ` Eric Dumazet
2021-12-06 19:11 ` [RFC PATCH v3 net-next 0/4] txhash: Make hash rethink configurable Akhmat Karakotov
2021-12-06 19:11   ` [RFC PATCH v3 net-next 1/4] txhash: Make rethinking txhash behavior configurable via sysctl Akhmat Karakotov
2021-12-06 19:47     ` Eric Dumazet
2021-12-06 19:11   ` [RFC PATCH v3 net-next 2/4] txhash: Add socket option to control TX hash rethink behavior Akhmat Karakotov
2021-12-06 19:48     ` Eric Dumazet
2021-12-06 19:11   ` [RFC PATCH v3 net-next 3/4] bpf: Add SO_TXREHASH setsockopt Akhmat Karakotov
2021-12-06 19:48     ` Eric Dumazet
2021-12-06 19:11   ` [RFC PATCH v3 net-next 4/4] tcp: change SYN ACK retransmit behaviour to account for rehash Akhmat Karakotov
2021-12-06 19:49     ` Eric Dumazet
2022-01-17 15:31     ` Akhmat Karakotov
2022-01-18 16:03       ` Jakub Kicinski
2022-01-18 16:52         ` Akhmat Karakotov
2021-12-04 10:51 [RFC PATCH v2 net-next 2/4] txhash: Add socket option to control TX hash rethink behavior kernel test robot
2021-12-06 13:33 ` Dan Carpenter

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=20211025203521.13507-1-hmukos@yandex-team.ru \
    --to=hmukos@yandex-team.ru \
    --cc=eric.dumazet@gmail.com \
    --cc=mitradir@yandex-team.ru \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    --cc=zeil@yandex-team.ru \
    /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.