[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7b0c0c5-7c65-28de-44c6-1ddd7f918574@gmail.com>
Date: Mon, 17 May 2021 19:41:41 -0600
From: David Ahern <dsahern@...il.com>
To: Ido Schimmel <idosch@...dia.com>, netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, petrm@...dia.com,
roopa@...dia.com, nikolay@...dia.com, ssuryaextr@...il.com,
mlxsw@...dia.com
Subject: Re: [PATCH net-next 02/10] ipv4: Add a sysctl to control multipath
hash fields
On 5/17/21 12:15 PM, Ido Schimmel wrote:
> A subsequent patch will add a new multipath hash policy where the packet
> fields used for multipath hash calculation are determined by user space.
> This patch adds a sysctl that allows user space to set these fields.
>
> The packet fields are represented using a bitmask and are common between
> IPv4 and IPv6 to allow user space to use the same numbering across both
> protocols. For example, to hash based on standard 5-tuple:
>
> # sysctl -w net.ipv4.fib_multipath_hash_fields=0x0037
> net.ipv4.fib_multipath_hash_fields = 0x0037
>
> The kernel rejects unknown fields, for example:
>
> # sysctl -w net.ipv4.fib_multipath_hash_fields=0x1000
> sysctl: setting key "net.ipv4.fib_multipath_hash_fields": Invalid argument
>
> More fields can be added in the future, if needed.
>
> Signed-off-by: Ido Schimmel <idosch@...dia.com>
> ---
> Documentation/networking/ip-sysctl.rst | 27 ++++++++++++++++
> include/net/ip_fib.h | 43 ++++++++++++++++++++++++++
> include/net/netns/ipv4.h | 1 +
> net/ipv4/fib_frontend.c | 6 ++++
> net/ipv4/sysctl_net_ipv4.c | 12 +++++++
> 5 files changed, 89 insertions(+)
>
Reviewed-by: David Ahern <dsahern@...nel.org>
Powered by blists - more mailing lists