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