1ed062a30SDavid C Somayajulu.\" Copyright (c) 2014 Qlogic Corporation. All rights reserved. 2f275c861SEdward Tomasz Napierala.\" 3f275c861SEdward Tomasz Napierala.\" Redistribution and use in source and binary forms, with or without 4f275c861SEdward Tomasz Napierala.\" modification, are permitted provided that the following conditions 5f275c861SEdward Tomasz Napierala.\" are met: 64e400768SDavid Christensen.\" 7f275c861SEdward Tomasz Napierala.\" 1. Redistributions of source code must retain the above copyright 8f275c861SEdward Tomasz Napierala.\" notice, this list of conditions and the following disclaimer. 9f275c861SEdward Tomasz Napierala.\" 2. Redistributions in binary form must reproduce the above copyright 10f275c861SEdward Tomasz Napierala.\" notice, this list of conditions and the following disclaimer in the 11f275c861SEdward Tomasz Napierala.\" documentation and/or other materials provided with the distribution. 12f275c861SEdward Tomasz Napierala.\" 134e400768SDavid Christensen.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' 144e400768SDavid Christensen.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15f275c861SEdward Tomasz Napierala.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 164e400768SDavid Christensen.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 174e400768SDavid Christensen.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 184e400768SDavid Christensen.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 194e400768SDavid Christensen.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 204e400768SDavid Christensen.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 214e400768SDavid Christensen.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 224e400768SDavid Christensen.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 234e400768SDavid Christensen.\" THE POSSIBILITY OF SUCH DAMAGE. 24f275c861SEdward Tomasz Napierala.\" 254e400768SDavid Christensen.Dd April 29, 2012 26f275c861SEdward Tomasz Napierala.Dt BXE 4 27f275c861SEdward Tomasz Napierala.Os 28f275c861SEdward Tomasz Napierala.Sh NAME 29f275c861SEdward Tomasz Napierala.Nm bxe 30ed062a30SDavid C Somayajulu.Nd QLogic NetXtreme II Ethernet 10Gb PCIe adapter driver 31f275c861SEdward Tomasz Napierala.Sh SYNOPSIS 32f275c861SEdward Tomasz NapieralaTo compile this driver into the kernel, 33f275c861SEdward Tomasz Napieralaplace the following lines in your 34f275c861SEdward Tomasz Napieralakernel configuration file: 35f275c861SEdward Tomasz Napierala.Bd -ragged -offset indent 36f275c861SEdward Tomasz Napierala.Cd "device bxe" 37f275c861SEdward Tomasz Napierala.Ed 38f275c861SEdward Tomasz Napierala.Pp 394e400768SDavid ChristensenAlternatively, to load the driver as a module at boot time, place the 404e400768SDavid Christensenfollowing line in 41f275c861SEdward Tomasz Napierala.Xr loader.conf 5 : 42f275c861SEdward Tomasz Napierala.Bd -literal -offset indent 43f275c861SEdward Tomasz Napieralaif_bxe_load="YES" 44f275c861SEdward Tomasz Napierala.Ed 45f275c861SEdward Tomasz Napierala.Sh DESCRIPTION 46f275c861SEdward Tomasz NapieralaThe 47f275c861SEdward Tomasz Napierala.Nm 48ed062a30SDavid C Somayajuludriver provides support for PCIe 10Gb Ethernet adapters based on the QLogic 49f9c8a14bSJoel DahlNetXtreme II family of 10Gb chips. 50f9c8a14bSJoel DahlThe driver supports Jumbo Frames, VLAN 514e400768SDavid Christensentagging, checksum offload (IPv4, TCP, UDP, IPv6-TCP, IPv6-UDP), MSI-X 524e400768SDavid Christenseninterrupts, TCP Segmentation Offload (TSO), Large Receive Offload (LRO), and 534e400768SDavid ChristensenReceive Side Scaling (RSS). 54f275c861SEdward Tomasz Napierala.Sh HARDWARE 55f275c861SEdward Tomasz NapieralaThe 56f275c861SEdward Tomasz Napierala.Nm 57ed062a30SDavid C Somayajuludriver provides support for various NICs based on the QLogic NetXtreme II 584e400768SDavid Christensenfamily of 10Gb Ethernet controller chips, including the following: 59f275c861SEdward Tomasz Napierala.Pp 60f275c861SEdward Tomasz Napierala.Bl -bullet -compact 61f275c861SEdward Tomasz Napierala.It 62ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57710 10Gb 63f275c861SEdward Tomasz Napierala.It 64ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57711 10Gb 65f275c861SEdward Tomasz Napierala.It 66ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57711E 10Gb 674e400768SDavid Christensen.It 68ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57712 10Gb 694e400768SDavid Christensen.It 70ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57712-MF 10Gb 714e400768SDavid Christensen.It 72ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57800 10Gb 734e400768SDavid Christensen.It 74ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57800-MF 10Gb 754e400768SDavid Christensen.It 76ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57810 10Gb 774e400768SDavid Christensen.It 78ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57810-MF 10Gb 794e400768SDavid Christensen.It 80ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57840 10Gb / 20Gb 814e400768SDavid Christensen.It 82ed062a30SDavid C SomayajuluQLogic NetXtreme II BCM57840-MF 10Gb 83f275c861SEdward Tomasz Napierala.El 844e400768SDavid Christensen.Sh CONFIGURATION 854e400768SDavid ChristensenThere a number of configuration parameters that can be set to tweak the 86f9c8a14bSJoel Dahldriver's behavior. 87f9c8a14bSJoel DahlThese parameters can be set via the 884e400768SDavid Christensen.Xr loader.conf 5 89f7c32ed6Sbetterentleyfile to take effect during the next system boot. 90f9c8a14bSJoel DahlThe following parameters affect 914e400768SDavid ChristensenALL instances of the driver. 92f275c861SEdward Tomasz Napierala.Bl -tag -width indent 934e400768SDavid Christensen.It Va hw.bxe.debug 944e400768SDavid ChristensenDEFAULT = 0 954e400768SDavid Christensen.br 96f9c8a14bSJoel DahlSets the default logging level of the driver. 97f9c8a14bSJoel DahlSee the Diagnostics and Debugging 984e400768SDavid Christensensection below for more details. 994e400768SDavid Christensen.It Va hw.bxe.interrupt_mode 1004e400768SDavid ChristensenDEFAULT = 2 1014e400768SDavid Christensen.br 102f9c8a14bSJoel DahlSets the default interrupt mode: 0=IRQ, 1=MSI, 2=MSIX. 103f9c8a14bSJoel DahlIf set to MSIX and 104f9c8a14bSJoel Dahlallocation fails, the driver will roll back and attempt MSI allocation. 105f9c8a14bSJoel DahlIf MSI 1064e400768SDavid Christensenallocation fails, the driver will roll back and attempt fixed level IRQ 107f9c8a14bSJoel Dahlallocation. 108f9c8a14bSJoel DahlIf IRQ allocation fails, then the driver load fails. 109f9c8a14bSJoel DahlWith MSI/MSIX, 1104e400768SDavid Christensenthe driver attempts to allocate a vector for each queue in addition to one more 1114e400768SDavid Christensenfor default processing. 112f275c861SEdward Tomasz Napierala.It Va hw.bxe.queue_count 1134e400768SDavid ChristensenDEFAULT = 4 1144e400768SDavid Christensen.br 115f9c8a14bSJoel DahlSets the default number of fast path packet processing queues. 116f9c8a14bSJoel DahlNote that one 1174e400768SDavid ChristensenMSI/MSIX interrupt vector is allocated per-queue. 1184e400768SDavid Christensen.It Va hw.bxe.max_rx_bufs 1194e400768SDavid ChristensenDEFAULT = 0 1204e400768SDavid Christensen.br 121f9c8a14bSJoel DahlSets the maximum number of receive buffers to allocate per-queue. 122f9c8a14bSJoel DahlZero(0) means 123f9c8a14bSJoel Dahlto allocate a receive buffer for every buffer descriptor. 124f9c8a14bSJoel DahlBy default this 1254e400768SDavid Christensenequates to 4080 buffers per-queue which is the maximum value for this config 1264e400768SDavid Christensenparameter. 1274e400768SDavid Christensen.It Va hw.bxe.hc_rx_ticks 1284e400768SDavid ChristensenDEFAULT = 25 1294e400768SDavid Christensen.br 1304e400768SDavid ChristensenSets the number of ticks for host interrupt coalescing in the receive path. 1314e400768SDavid Christensen.It Va hw.bxe.hc_tx_ticks 1324e400768SDavid ChristensenDEFAULT = 50 1334e400768SDavid Christensen.br 1344e400768SDavid ChristensenSets the number of ticks for host interrupt coalescing in the transmit path. 1354e400768SDavid Christensen.It Va hw.bxe.rx_budget 1364e400768SDavid ChristensenDEFAULT = 0xffffffff 1374e400768SDavid Christensen.br 138f9c8a14bSJoel DahlSets the maximum number of receive packets to process in an interrupt. 139f9c8a14bSJoel DahlIf the 1404e400768SDavid Christensenbudget is reached then the remaining/pending packets will be processed in a 1414e400768SDavid Christensenscheduled taskqueue. 1424e400768SDavid Christensen.It Va hw.bxe.max_aggregation_size 1434e400768SDavid ChristensenDEFAULT = 32768 1444e400768SDavid Christensen.br 145*ffc4f93eSBenedict ReuschlingSets the maximum LRO aggregation byte size. 146f9c8a14bSJoel DahlThe higher the value the more 147f9c8a14bSJoel Dahlpackets the hardware will aggregate. 148f9c8a14bSJoel DahlMaximum is 65K. 149f275c861SEdward Tomasz Napierala.It Va hw.bxe.mrrs 1504e400768SDavid ChristensenDEFAULT = -1 1514e400768SDavid Christensen.br 1524e400768SDavid ChristensenSets the PCI MRRS: -1=Auto, 0=128B, 1=256B, 2=512B, 3=1KB 1534e400768SDavid Christensen.It Va hw.bxe.autogreeen 1544e400768SDavid ChristensenDEFAULT = 0 1554e400768SDavid Christensen.br 1564e400768SDavid ChristensenSet AutoGrEEEN: 0=HW_DEFAULT, 1=FORCE_ON, 2=FORCE_OFF 1574e400768SDavid Christensen.It Va hw.bxe.udp_rss 1584e400768SDavid ChristensenDEFAULT = 0 1594e400768SDavid Christensen.br 1604e400768SDavid ChristensenEnable/Disable 4-tuple RSS for UDP: 0=DISABLED, 1=ENABLED 161f275c861SEdward Tomasz Napierala.El 1624e400768SDavid Christensen.Pp 1634e400768SDavid ChristensenSpecial care must be taken when modifying the number of queues and receive 164f9c8a14bSJoel Dahlbuffers. 1651cc60ae8SBenedict Reuschling.Fx imposes a limit on the maximum number of 1664e400768SDavid Christensen.Xr mbuf 9 167f9c8a14bSJoel Dahlallocations. 168f9c8a14bSJoel DahlIf buffer allocations fail, the interface initialization will fail 169f9c8a14bSJoel Dahland the interface will not be usable. 170f9c8a14bSJoel DahlThe driver does not make a best effort 171f9c8a14bSJoel Dahlfor buffer allocations. 172f9c8a14bSJoel DahlIt is an all or nothing effort. 1734e400768SDavid Christensen.Pp 1744e400768SDavid ChristensenYou can tweak the 1754e400768SDavid Christensen.Xr mbuf 9 1764e400768SDavid Christensenallocation limit using 1774e400768SDavid Christensen.Xr sysctl 8 1784e400768SDavid Christensenand view the current usage with 1794e400768SDavid Christensen.Xr netstat 1 1804e400768SDavid Christensenas follows: 1814e400768SDavid Christensen.Bd -literal -offset indent 1824e400768SDavid Christensen# netstat -m 1834e400768SDavid Christensen# sysctl kern.ipc.nmbclusters 1844e400768SDavid Christensen# sysctl kern.ipc.nmbclusters=<#> 1854e400768SDavid Christensen.Ed 1864e400768SDavid Christensen.Pp 1874e400768SDavid ChristensenThere are additional configuration parameters that can be set on a per-instance 188f9c8a14bSJoel Dahlbasis to dynamically override the default configuration. 189f9c8a14bSJoel DahlThe '#' below must be 1904e400768SDavid Christensenreplaced with the driver instance / interface unit number: 1914e400768SDavid Christensen.Bl -tag -width indent 1924e400768SDavid Christensen.It Va dev.bxe.#.debug 1934e400768SDavid ChristensenDEFAULT = 0 1944e400768SDavid Christensen.br 195f9c8a14bSJoel DahlSets the default logging level of the driver instance. 196f9c8a14bSJoel DahlSee 197f9c8a14bSJoel Dahl.Va hw.bxe.debug 198f9c8a14bSJoel Dahlabove and 1994e400768SDavid Christensenthe Diagnostics and Debugging section below for more details. 2004e400768SDavid Christensen.It Va dev.bxe.#.rx_budget 2014e400768SDavid ChristensenDEFAULT = 0xffffffff 2024e400768SDavid Christensen.br 2034e400768SDavid ChristensenSets the maximum number of receive packets to process in an interrupt for the 204f9c8a14bSJoel Dahldriver instance. 205f9c8a14bSJoel DahlSee 206f9c8a14bSJoel Dahl.Va hw.bxe.rx_budget 207f9c8a14bSJoel Dahlabove for more details. 2084e400768SDavid Christensen.El 2094e400768SDavid Christensen.Pp 2104e400768SDavid ChristensenAdditional items can be configured using 2114e400768SDavid Christensen.Xr ifconfig 8 : 2124e400768SDavid Christensen.Bl -tag -width indent 2134e400768SDavid Christensen.It Va MTU - Maximum Transmission Unit 2144e400768SDavid ChristensenDEFAULT = 1500 2154e400768SDavid Christensen.br 2164e400768SDavid ChristensenRANGE = 46-9184 2174e400768SDavid Christensen.br 2184e400768SDavid Christensen# ifconfig bxe# mtu <n> 2194e400768SDavid Christensen.It Va Promiscuous Mode 2204e400768SDavid ChristensenDEFAULT = OFF 2214e400768SDavid Christensen.br 2224e400768SDavid Christensen# ifconfig bxe# [ promisc | -promisc ] 2234e400768SDavid Christensen.It Va Rx/Tx Checksum Offload 2244e400768SDavid ChristensenDEFAULT = RX/TX CSUM ON 2254e400768SDavid Christensen.br 2264e400768SDavid ChristensenNote that the Rx and Tx settings are not independent. 2274e400768SDavid Christensen.br 2284e400768SDavid Christensen# ifconfig bxe# [ rxcsum | -rxcsum | txcsum | -txcsum ] 2294e400768SDavid Christensen.It Va TSO - TCP Segmentation Offload 2304e400768SDavid ChristensenDEFAULT = ON 2314e400768SDavid Christensen.br 2324e400768SDavid Christensen# ifconfig bxe# [ tso | -tso | tso6 | -tso6 ] 2334e400768SDavid Christensen.It Va LRO - TCP Large Receive Offload 2344e400768SDavid ChristensenDEFAULT = ON 2354e400768SDavid Christensen.br 2364e400768SDavid Christensen# ifconfig bxe# [ lro | -lro ] 2374e400768SDavid Christensen.El 2384e400768SDavid Christensen.Sh DIAGNOSTICS AND DEBUGGING 2394e400768SDavid ChristensenThere are many statistics exposed by 2404e400768SDavid Christensen.Nm 241f9c8a14bSJoel Dahlvia 242f9c8a14bSJoel Dahl.Xr sysctl 8 . 2434e400768SDavid Christensen.Pp 2444e400768SDavid ChristensenTo dump the default driver configuration: 2454e400768SDavid Christensen.Bd -literal -offset indent 2464e400768SDavid Christensen# sysctl -a | grep hw.bxe 2474e400768SDavid Christensen.Ed 2484e400768SDavid Christensen.Pp 2494e400768SDavid ChristensenTo dump every instance's configuration and detailed statistics: 2504e400768SDavid Christensen.Bd -literal -offset indent 2514e400768SDavid Christensen# sysctl -a | grep dev.bxe 2524e400768SDavid Christensen.Ed 2534e400768SDavid Christensen.Pp 2544e400768SDavid ChristensenTo dump information for a single instance (replace the '#' with the driver 2554e400768SDavid Christenseninstance / interface unit number): 2564e400768SDavid Christensen.Bd -literal -offset indent 2574e400768SDavid Christensen# sysctl -a | grep dev.bxe.# 2584e400768SDavid Christensen.Ed 2594e400768SDavid Christensen.Pp 2604e400768SDavid ChristensenTo dump information for all the queues of a single instance: 2614e400768SDavid Christensen.Bd -literal -offset indent 2624e400768SDavid Christensen# sysctl -a | grep dev.bxe.#.queue 2634e400768SDavid Christensen.Ed 2644e400768SDavid Christensen.Pp 2654e400768SDavid ChristensenTo dump information for a single queue of a single instance (replace the 2664e400768SDavid Christensenadditional '#' with the queue number): 2674e400768SDavid Christensen.Bd -literal -offset indent 2684e400768SDavid Christensen# sysctl -a | grep dev.bxe.#.queue.# 2694e400768SDavid Christensen.Ed 2704e400768SDavid Christensen.Pp 2714e400768SDavid ChristensenThe 2724e400768SDavid Christensen.Nm 2734e400768SDavid Christensendriver has the ability to dump a ton of debug messages to the system 274f9c8a14bSJoel Dahllog. 275f9c8a14bSJoel DahlThe default level of logging can be set with the 276f9c8a14bSJoel Dahl.Va hw.bxe.debug 277f9c8a14bSJoel Dahl.Xr sysctl 8 . 278f9c8a14bSJoel DahlTake care with this setting as it can result in too 279f9c8a14bSJoel Dahlmany logs being dumped. 280f9c8a14bSJoel DahlSince this parameter is the default one, it affects 281f9c8a14bSJoel Dahlevery instance and will dramatically change the timing in the driver. 282f9c8a14bSJoel DahlA better 2834e400768SDavid Christensenalternative to aid in debugging is to dynamically change the debug level of a 284f9c8a14bSJoel Dahlspecific instance with the 285f9c8a14bSJoel Dahl.Va dev.bxe.#.debug 286f9c8a14bSJoel Dahl.Xr sysctl 8 . 287f9c8a14bSJoel DahlThis allows 2884e400768SDavid Christensenyou to turn on/off logging of various debug groups on-the-fly. 2894e400768SDavid Christensen.Pp 2904e400768SDavid ChristensenThe different debug groups that can be toggled are: 2914e400768SDavid Christensen.Bd -literal -offset indent 2924e400768SDavid ChristensenDBG_LOAD 0x00000001 /* load and unload */ 2934e400768SDavid ChristensenDBG_INTR 0x00000002 /* interrupt handling */ 2944e400768SDavid ChristensenDBG_SP 0x00000004 /* slowpath handling */ 2954e400768SDavid ChristensenDBG_STATS 0x00000008 /* stats updates */ 2964e400768SDavid ChristensenDBG_TX 0x00000010 /* packet transmit */ 2974e400768SDavid ChristensenDBG_RX 0x00000020 /* packet receive */ 2984e400768SDavid ChristensenDBG_PHY 0x00000040 /* phy/link handling */ 2994e400768SDavid ChristensenDBG_IOCTL 0x00000080 /* ioctl handling */ 3004e400768SDavid ChristensenDBG_MBUF 0x00000100 /* dumping mbuf info */ 3014e400768SDavid ChristensenDBG_REGS 0x00000200 /* register access */ 3024e400768SDavid ChristensenDBG_LRO 0x00000400 /* lro processing */ 3034e400768SDavid ChristensenDBG_ASSERT 0x80000000 /* debug assert */ 3044e400768SDavid ChristensenDBG_ALL 0xFFFFFFFF /* flying monkeys */ 3054e400768SDavid Christensen.Ed 3064e400768SDavid Christensen.Pp 3074e400768SDavid ChristensenFor example, to debug an issue in the receive path on bxe0: 3084e400768SDavid Christensen.Bd -literal -offset indent 3094e400768SDavid Christensen# sysctl dev.bxe.0.debug=0x22 3104e400768SDavid Christensen.Ed 3114e400768SDavid Christensen.Pp 3124e400768SDavid ChristensenWhen finished turn the logging back off: 3134e400768SDavid Christensen.Bd -literal -offset indent 3144e400768SDavid Christensen# sysctl dev.bxe.0.debug=0 3154e400768SDavid Christensen.Ed 316ed062a30SDavid C Somayajulu.Sh SUPPORT 317ed062a30SDavid C SomayajuluFor support questions please contact your QLogic approved reseller or 318ed062a30SDavid C SomayajuluQLogic Technical Support at 319ed062a30SDavid C Somayajulu.Pa http://support.qlogic.com , 320ed062a30SDavid C Somayajuluor by E-mail at 3216c899950SBaptiste Daroussin.Aq Mt support@qlogic.com . 322f275c861SEdward Tomasz Napierala.Sh SEE ALSO 323f9c8a14bSJoel Dahl.Xr netstat 1 , 324f275c861SEdward Tomasz Napierala.Xr altq 4 , 325f275c861SEdward Tomasz Napierala.Xr arp 4 , 326f275c861SEdward Tomasz Napierala.Xr netintro 4 , 327f275c861SEdward Tomasz Napierala.Xr ng_ether 4 , 328f275c861SEdward Tomasz Napierala.Xr vlan 4 , 329f275c861SEdward Tomasz Napierala.Xr ifconfig 8 330f275c861SEdward Tomasz Napierala.Sh HISTORY 331f275c861SEdward Tomasz NapieralaThe 332f275c861SEdward Tomasz Napierala.Nm 333f275c861SEdward Tomasz Napieraladevice driver first appeared in 334f275c861SEdward Tomasz Napierala.Fx 9.0 . 335f275c861SEdward Tomasz Napierala.Sh AUTHORS 336f275c861SEdward Tomasz NapieralaThe 337f275c861SEdward Tomasz Napierala.Nm 338f275c861SEdward Tomasz Napieraladriver was written by 3396c899950SBaptiste Daroussin.An Eric Davis Aq Mt edavis@broadcom.com , 3406c899950SBaptiste Daroussin.An David Christensen Aq Mt davidch@broadcom.com , 341f275c861SEdward Tomasz Napieralaand 3426c899950SBaptiste Daroussin.An Gary Zambrano Aq Mt zambrano@broadcom.com . 343