summaryrefslogtreecommitdiff
path: root/fs/smb/client/cifsglob.h
diff options
context:
space:
mode:
authorShyam Prasad N <sprasad@microsoft.com>2022-12-26 11:24:56 +0000
committerSteve French <stfrench@microsoft.com>2023-11-09 10:25:17 -0600
commita6d8fb54a515f0546ffdb7870102b1238917e567 (patch)
tree7e3d5020ea3e68e21d8373b687205a2815c8a102 /fs/smb/client/cifsglob.h
parent0c51cc6f2cb0108e7d49805f6e089cd85caab279 (diff)
downloadlwn-a6d8fb54a515f0546ffdb7870102b1238917e567.tar.gz
lwn-a6d8fb54a515f0546ffdb7870102b1238917e567.zip
cifs: distribute channels across interfaces based on speed
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>
Diffstat (limited to 'fs/smb/client/cifsglob.h')
-rw-r--r--fs/smb/client/cifsglob.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/smb/client/cifsglob.h b/fs/smb/client/cifsglob.h
index eae138040edf..30763c68cc39 100644
--- a/fs/smb/client/cifsglob.h
+++ b/fs/smb/client/cifsglob.h
@@ -969,6 +969,8 @@ struct cifs_server_iface {
struct list_head iface_head;
struct kref refcount;
size_t speed;
+ size_t weight_fulfilled;
+ unsigned int num_channels;
unsigned int rdma_capable : 1;
unsigned int rss_capable : 1;
unsigned int is_active : 1; /* unset if non existent */