xref: /freebsd/share/man/man4/irdma.4 (revision 38a52bd3)
1.\" Copyright(c) 2016 - 2022 Intel Corporation
2.\" All rights reserved.
3.\"
4.\" This software is available to you under a choice of one of two
5.\" licenses. You may choose to be licensed under the terms of the GNU
6.\" General Public License (GPL) Version 2, available from the file
7.\" COPYING in the main directory of this source tree, or the
8.\" OpenFabrics.org BSD license below:
9.\"
10.\"   Redistribution and use in source and binary forms, with or
11.\"   without modification, are permitted provided that the following
12.\"   conditions are met:
13.\"
14.\"   - Redistributions of source code must retain the above
15.\"     copyright notice, this list of conditions and the following
16.\"     disclaimer.
17.\"
18.\"   - Redistributions in binary form must reproduce the above
19.\"     copyright notice, this list of conditions and the following
20.\"     disclaimer in the documentation and/or other materials
21.\"     provided with the distribution.
22.\"
23.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26.\" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27.\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28.\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29.\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30.\" SOFTWARE.
31.\"
32.\" $FreeBSD$
33.\"
34.Dd March 30, 2022
35.Dt IRDMA 4
36.Os
37.Sh NAME
38.Nm irdma
39.Nd RDMA FreeBSD driver for Intel(R) Ethernet Controller E810
40.Sh SYNOPSIS
41This module relies on
42.Xr if_ice 4
43.Bl -tag -nested-width indent
44.It The following kernel options should be included in the configuration:
45.Cd options OFED
46.Cd options OFED_DEBUG_INIT
47.Cd options COMPAT_LINUXKPI
48.Cd options SDP
49.Cd options IPOIB_CM
50.El
51.Sh DESCRIPTION
52.Ss Features
53The
54.Nm
55driver provides RDMA protocol support on RDMA-capable Intel Ethernet 800 Series NICs which are supported by
56.Xr if_ice 4
57.
58.Pp
59The driver supports both iWARP and RoCEv2 protocols.
60.Sh CONFIGURATION
61.Ss TUNABLES
62Tunables can be set at the
63.Xr loader 8
64prompt before booting the kernel or stored in
65.Xr loader.conf 5 .
66.Bl -tag -width indent
67.It Va dev.irdma<interface_number>.roce_enable
68enables RoCEv2 protocol usage on <interface_numer> interface.
69.Pp By default RoCEv2 protocol is used.
70.It Va dev.irdma<interface_number>.dcqcn_cc_cfg_valid
71indicates that all DCQCN parameters are valid and should be updated in registers or QP context.
72.Pp
73Setting this parameter to 1 means that settings in
74.Em dcqcn_min_dec_factor, dcqcn_min_rate_MBps, dcqcn_F, dcqcn_T,
75.Em dcqcn_B, dcqcn_rai_factor, dcqcn_hai_factor, dcqcn_rreduce_mperiod
76are taken into account. Otherwise default values are used.
77.Pp
78Note: "roce_enable" must also be set for this tunable to take effect.
79.It Va dev.irdma<interface_number>.dcqcn_min_dec_factor
80The minimum factor by which the current transmit rate can be changed when processing a CNP. Value is given as a percentage (1-100).
81.Pp
82Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect.
83.It Va dev.irdma<interface_number>.dcqcn_min_rate_MBps
84The minimum value, in Mbits per second, for rate to limit.
85.Pp
86Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect.
87.It Va dev.irdma<interface_number>.dcqcn_F
88The number of times to stay in each stage of bandwidth recovery.
89.Pp
90Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect.
91.It Va dev.irdma<interface_number>.dcqcn_T
92The number of microseconds that should elapse before increasing the CWND in DCQCN mode.
93.Pp
94Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect.
95.It Va dev.irdma<interface_number>.dcqcn_B
96The number of bytes to transmit before updating CWND in DCQCN mode.
97.Pp
98Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect.
99.It Va dev.irdma<interface_number>.dcqcn_rai_factor
100The number of MSS to add to the congestion window in additive increase mode.
101.Pp
102Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect.
103.It Va dev.irdma<interface_number>.dcqcn_hai_factor
104The number of MSS to add to the congestion window in hyperactive increase mode.
105.Pp
106Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect.
107.It Va dev.irdma<interface_number>.dcqcn_rreduce_mperiod
108The minimum time between 2 consecutive rate reductions for a single flow. Rate reduction will occur only if a CNP is received during the relevant time interval.
109.Pp
110Note: "roce_enable" and "dcqcn_cc_cfg_valid" must also be set for this tunable to take effect.
111.Ss SYSCTL PROCEDURES
112Sysctl controls are available for runtime adjustments.
113.Bl -tag -width indent
114.It Va dev.irdma<interface_number>.debug
115defines level of debug messages.
116.Pp
117Typical value: 1 for errors only, 0x7fffffff for full debug.
118.It Va dev.irdma<interface_number>.dcqcn_enable
119enables the DCQCN algorithm for RoCEv2.
120.Pp
121Note: "roce_enable" must also be set for this sysctl to take effect.
122.Pp
123Note: The change may be set at any time, but it will be applied only to newly created QPs.
124.Ss TESTING
125.Bl -enum
126.It
127To load the irdma driver, run:
128.Bl -tag -width indent
129.It
130kldload irdma
131.El
132If if_ice is not already loaded, the system will load it on its own. Please check whether the value of sysctl
133.Va hw.ice.irdma
134is 1, if the irdma driver is not loading. To change the value put:
135.Bl -tag -width indent
136.It
137hw.ice.irdma=1
138.El
139to
140.Pa /boot/loader.conf
141and reboot.
142.It
143To check that the driver was loaded, run:
144.Bl -tag -width indent
145.It
146sysctl -a | grep infiniband
147.El
148Typically, if everything goes well, around 190 entries per PF will appear.
149.It
150Each interface of the card may work in either iWARP or RoCEv2 mode. To enable RoCEv2 compatibility, add:
151.Bl -tag -width indent
152.It
153dev.irdma<interface_number>.roce_enable=1
154.El
155where <interface_number> is a desired ice interface number on which
156RoCEv2 protocol needs to be enabled, to:
157.Bl -tag -width indent
158.It
159.Pa /boot/loader.conf
160.El
161for instance:
162.Bl -tag -width indent
163.It
164dev.irdma0.roce_enable=0
165.It
166dev.irdma1.roce_enable=1
167.El
168will keep iWARP mode on ice0 and enable RoCEv2 mode on interface ice1. The RoCEv2 mode is the default.
169.Dl
170To check irdma roce_enable status, run:
171.Bl -tag -width indent
172.It
173sysctl dev.irdma<interface_number>.roce_enable
174.El
175for instance:
176.Bl -tag -width indent
177.It
178sysctl dev.irdma2.roce_enable
179.El
180with returned value of '0' indicate the iWARP mode, and the value of '1' indicate the RoCEv2 mode.
181.Pp
182Note: An interface configured in one mode will not be able to connect
183to a node configured in another mode.
184.Pp
185Note: RoCEv2 has currently limited support, for functional testing only.
186DCB and Priority Flow Controller (PFC) are not currently supported which
187may lead to significant performance loss or connectivity issues.
188.It
189Enable flow control in the ice driver:
190.Bl -tag -width indent
191.It
192sysctl dev.ice.<interface_number>.fc=3
193.El
194Enable flow control on the switch your system is connected to. See your
195switch documentation for details.
196.It
197The source code for krping software is provided with the kernel in
198/usr/src/sys/contrib/rdma/krping/. To compile the software, change
199directory to /usr/src/sys/modules/rdma/krping/ and invoke the following:
200.Bl -tag -width indent
201.It
202make clean
203.It
204make
205.It
206make install
207.El
208.It
209Start a krping server on one machine:
210.Bl -tag -width indent
211.It
212 echo size=64,count=1,port=6601,addr=100.0.0.189,server > /dev/krping
213.El
214.It
215Connect a client from another machine:
216.Bl -tag -width indent
217.It
218 echo size=64,count=1,port=6601,addr=100.0.0.189,client > /dev/krping
219.El
220.Sh SUPPORT
221For general information and support, go to the Intel support website at:
222.Lk http://support.intel.com/ .
223.Pp
224If an issue is identified with this driver with a supported adapter, email all the specific information related to the issue to
225.Mt freebsd@intel.com .
226.Sh SEE ALSO
227.Xr if_ice 4
228.Sh AUTHORS
229.An -nosplit
230The
231.Nm
232driver was prepared by
233.An Bartosz Sobczak Aq Mt bartosz.sobczak@intel.com .
234