cifs: distribute channels across interfaces based on speed
authorShyam Prasad N <sprasad@microsoft.com>
Mon, 26 Dec 2022 11:24:56 +0000 (11:24 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 3 Dec 2023 06:32:09 +0000 (07:32 +0100)
commit548893404c44fc01a59f17727876e02553146fe6
tree65ab08db3c87b4946cd19e09bfff44b364ca951d
parent5607a415d49c589e15db69008638a94f9b9acc14
cifs: distribute channels across interfaces based on speed

[ Upstream commit a6d8fb54a515f0546ffdb7870102b1238917e567 ]

Today, if the server interfaces RSS capable, we simply
choose the fastest interface to setup a channel. This is not
a scalable approach, and does not make a lot of attempt to
distribute the connections.

This change does a weighted distribution of channels across
all the available server interfaces, where the weight is
a function of the advertised interface speed.

Also make sure that we don't mix rdma and non-rdma for channels.

Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Stable-dep-of: fa1d0508bdd4 ("cifs: account for primary channel in the interface list")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/cifs_debug.c
fs/smb/client/cifsglob.h
fs/smb/client/sess.c