xref: /linux/Documentation/networking/smc-sysctl.rst (revision 6dfafbd0299a60bfb5d5e277fdf100037c7ded07)
1.. SPDX-License-Identifier: GPL-2.0
2
3==========
4SMC Sysctl
5==========
6
7/proc/sys/net/smc/* Variables
8=============================
9
10autocorking_size - INTEGER
11	Setting SMC auto corking size:
12	SMC auto corking is like TCP auto corking from the application's
13	perspective of view. When applications do consecutive small
14	write()/sendmsg() system calls, we try to coalesce these small writes
15	as much as possible, to lower total amount of CDC and RDMA Write been
16	sent.
17	autocorking_size limits the maximum corked bytes that can be sent to
18	the under device in 1 single sending. If set to 0, the SMC auto corking
19	is disabled.
20	Applications can still use TCP_CORK for optimal behavior when they
21	know how/when to uncork their sockets.
22
23	Default: 64K
24
25smcr_buf_type - INTEGER
26        Controls which type of sndbufs and RMBs to use in later newly created
27        SMC-R link group. Only for SMC-R.
28
29        Default: 0 (physically contiguous sndbufs and RMBs)
30
31        Possible values:
32
33        - 0 - Use physically contiguous buffers
34        - 1 - Use virtually contiguous buffers
35        - 2 - Mixed use of the two types. Try physically contiguous buffers first.
36          If not available, use virtually contiguous buffers then.
37
38smcr_testlink_time - INTEGER
39	How frequently SMC-R link sends out TEST_LINK LLC messages to confirm
40	viability, after the last activity of connections on it. Value 0 means
41	disabling TEST_LINK.
42
43	Default: 30 seconds.
44
45wmem - INTEGER
46	Initial size of send buffer used by SMC sockets.
47
48	The minimum value is 16KiB and there is no hard limit for max value, but
49	only allowed 512KiB for SMC-R and 1MiB for SMC-D.
50
51	Default: 64KiB
52
53rmem - INTEGER
54	Initial size of receive buffer (RMB) used by SMC sockets.
55
56	The minimum value is 16KiB and there is no hard limit for max value, but
57	only allowed 512KiB for SMC-R and 1MiB for SMC-D.
58
59	Default: 64KiB
60
61smcr_max_links_per_lgr - INTEGER
62	Controls the max number of links can be added to a SMC-R link group. Notice that
63	the actual number of the links added to a SMC-R link group depends on the number
64	of RDMA devices exist in the system. The acceptable value ranges from 1 to 2. Only
65	for SMC-R v2.1 and later.
66
67	Default: 2
68
69smcr_max_conns_per_lgr - INTEGER
70	Controls the max number of connections can be added to a SMC-R link group. The
71	acceptable value ranges from 16 to 255. Only for SMC-R v2.1 and later.
72
73	Default: 255
74
75smcr_max_send_wr - INTEGER
76	So-called work request buffers are SMCR link (and RDMA queue pair) level
77	resources necessary for performing RDMA operations. Since up to 255
78	connections can share a link group and thus also a link and the number
79	of the work request buffers is decided when the link is allocated,
80	depending on the workload it can be a bottleneck in a sense that threads
81	have to wait for work request buffers to become available. Before the
82	introduction of this control the maximal number of work request buffers
83	available on the send path used to be hard coded to 16. With this control
84	it becomes configurable. The acceptable range is between 2 and 2048.
85
86	Please be aware that all the buffers need to be allocated as a physically
87	continuous array in which each element is a single buffer and has the size
88	of SMC_WR_BUF_SIZE (48) bytes. If the allocation fails, we keep retrying
89	with half of the buffer count until it is ether successful or (unlikely)
90	we dip below the old hard coded value which is 16 where we give up much
91	like before having this control.
92
93	Default: 16
94
95smcr_max_recv_wr - INTEGER
96	So-called work request buffers are SMCR link (and RDMA queue pair) level
97	resources necessary for performing RDMA operations. Since up to 255
98	connections can share a link group and thus also a link and the number
99	of the work request buffers is decided when the link is allocated,
100	depending on the workload it can be a bottleneck in a sense that threads
101	have to wait for work request buffers to become available. Before the
102	introduction of this control the maximal number of work request buffers
103	available on the receive path used to be hard coded to 16. With this control
104	it becomes configurable. The acceptable range is between 2 and 2048.
105
106	Please be aware that all the buffers need to be allocated as a physically
107	continuous array in which each element is a single buffer and has the size
108	of SMC_WR_BUF_SIZE (48) bytes. If the allocation fails, we keep retrying
109	with half of the buffer count until it is ether successful or (unlikely)
110	we dip below the old hard coded value which is 16 where we give up much
111	like before having this control.
112
113	Default: 48
114