154912308SNavdeep Parhar.\" Copyright (c) 2015, Chelsio Inc 254912308SNavdeep Parhar.\" All rights reserved. 354912308SNavdeep Parhar.\" 454912308SNavdeep Parhar.\" Redistribution and use in source and binary forms, with or without 554912308SNavdeep Parhar.\" modification, are permitted provided that the following conditions are met: 654912308SNavdeep Parhar.\" 754912308SNavdeep Parhar.\" 1. Redistributions of source code must retain the above copyright notice, 854912308SNavdeep Parhar.\" this list of conditions and the following disclaimer. 954912308SNavdeep Parhar.\" 1054912308SNavdeep Parhar.\" 2. Redistributions in binary form must reproduce the above copyright 1154912308SNavdeep Parhar.\" notice, this list of conditions and the following disclaimer in the 1254912308SNavdeep Parhar.\" documentation and/or other materials provided with the distribution. 1354912308SNavdeep Parhar.\" 1454912308SNavdeep Parhar.\" 3. Neither the name of the Chelsio Inc nor the names of its 1554912308SNavdeep Parhar.\" contributors may be used to endorse or promote products derived from 1654912308SNavdeep Parhar.\" this software without specific prior written permission. 1754912308SNavdeep Parhar.\" 1854912308SNavdeep Parhar.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 1954912308SNavdeep Parhar.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2054912308SNavdeep Parhar.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2154912308SNavdeep Parhar.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 2254912308SNavdeep Parhar.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2354912308SNavdeep Parhar.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2454912308SNavdeep Parhar.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2554912308SNavdeep Parhar.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2654912308SNavdeep Parhar.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2754912308SNavdeep Parhar.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2854912308SNavdeep Parhar.\" POSSIBILITY OF SUCH DAMAGE. 2954912308SNavdeep Parhar.\" 3054912308SNavdeep Parhar.\" * Other names and brands may be claimed as the property of others. 3154912308SNavdeep Parhar.\" 3254912308SNavdeep Parhar.\" $FreeBSD$ 3354912308SNavdeep Parhar.\" 341131c927SNavdeep Parhar.Dd April 13, 2018 3554912308SNavdeep Parhar.Dt CXGBETOOL 8 3654912308SNavdeep Parhar.Os 3754912308SNavdeep Parhar.Sh NAME 3854912308SNavdeep Parhar.Nm cxgbetool 3954912308SNavdeep Parhar.Nd Userspace companion to 4054912308SNavdeep Parhar.Xr cxgbe 4 4154912308SNavdeep Parhar.Sh SYNOPSIS 4254912308SNavdeep Parhar.Bl -item -compact 4354912308SNavdeep Parhar.It 4454912308SNavdeep Parhar.Nm Ar nexus command Op Ar parameter ... 4554912308SNavdeep Parhar.Pp 4654912308SNavdeep Parhar.It 4754912308SNavdeep Parhar.Nm Ar nexus Cm clearstats Ar port_id 4854912308SNavdeep Parhar.It 4954912308SNavdeep Parhar.Nm Ar nexus Cm context Bro Cm ingress | egress | fl | cong Brc Ar cntxt_id 5054912308SNavdeep Parhar.It 5154912308SNavdeep Parhar.Nm Ar nexus Cm filter mode Op Ar match-criteria ... 5254912308SNavdeep Parhar.It 5354912308SNavdeep Parhar.Nm Ar nexus Cm filter Ar idx Bro Ar filter-specification | Cm delete Brc 5454912308SNavdeep Parhar.It 5554912308SNavdeep Parhar.Nm Ar nexus Cm filter list 5654912308SNavdeep Parhar.It 5754912308SNavdeep Parhar.Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len 5854912308SNavdeep Parhar.It 5954912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg Ar fw-config.txt 6054912308SNavdeep Parhar.It 6154912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg clear 6254912308SNavdeep Parhar.It 6354912308SNavdeep Parhar.Nm Ar nexus Cm loadfw Ar fw-image.bin 6454912308SNavdeep Parhar.It 6554912308SNavdeep Parhar.Nm Ar nexus Cm memdump Ar addr len 6654912308SNavdeep Parhar.It 671131c927SNavdeep Parhar.Nm Ar nexus Cm policy Ar cop.txt 681131c927SNavdeep Parhar.It 691131c927SNavdeep Parhar.Nm Ar nexus Cm policy clear 701131c927SNavdeep Parhar.It 7154912308SNavdeep Parhar.Nm Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val 7254912308SNavdeep Parhar.It 7354912308SNavdeep Parhar.Nm Ar nexus Cm regdump Op Ar register-block ... 7454912308SNavdeep Parhar.It 7554912308SNavdeep Parhar.Nm Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value 7654912308SNavdeep Parhar.It 7754912308SNavdeep Parhar.Nm Ar nexus Cm sched-queue Ar port Ar queue Ar class 7854912308SNavdeep Parhar.It 7954912308SNavdeep Parhar.Nm Ar nexus Cm stdio 8054912308SNavdeep Parhar.It 8154912308SNavdeep Parhar.Nm Ar nexus Cm tcb Ar tid 8254912308SNavdeep Parhar.El 8354912308SNavdeep Parhar.Sh DESCRIPTION 8454912308SNavdeep Parhar.Nm 8554912308SNavdeep Parharprovides command-line access to features and debug facilities exported by 8654912308SNavdeep Parhar.Xr cxgbe 4 8754912308SNavdeep Parharvia private ioctls. 8854912308SNavdeep ParharThe target nexus device, 8954912308SNavdeep Parhar.Va t4nex%d 9054912308SNavdeep Parhar, is always the first argument. 9154912308SNavdeep Parhar(The parent nexus for an Ethernet port 9254912308SNavdeep Parhar.Va cxgbe%d 9354912308SNavdeep Parharis listed in 9454912308SNavdeep Parhar.Va dev.cxgbe.%d.%parent 9554912308SNavdeep Parharin the 9654912308SNavdeep Parhar.Xr sysctl 8 9754912308SNavdeep ParharMIB). 9854912308SNavdeep ParharThe rest consists of a command and any parameters required by that command. 9954912308SNavdeep Parhar.Ss Commands 10054912308SNavdeep Parhar.Bl -ohang 10154912308SNavdeep Parhar.It Cm clearstats Ar port_id 10254912308SNavdeep ParharClear all transmit, receive, and error statistics of all queues associated 10354912308SNavdeep Parharwith a port. 10454912308SNavdeep ParharThe total number of ports attached to a nexus is listed in 10554912308SNavdeep Parhar.Va dev.t4nex.%d.nports 10654912308SNavdeep Parharand the 0 based 10754912308SNavdeep Parhar.Ar port_id 10854912308SNavdeep Parharidentifies a port within this range. 10954912308SNavdeep Parhar.Pp 11054912308SNavdeep Parhar.Bl -item -compact 11154912308SNavdeep Parhar.It 11254912308SNavdeep Parhar.Cm context ingress Ar ingress_cntxt_id 11354912308SNavdeep Parhar.It 11454912308SNavdeep Parhar.Cm context cong Ar ingress_cntxt_id 11554912308SNavdeep Parhar.It 11654912308SNavdeep Parhar.Cm context egress Ar egress_cntxt_id 11754912308SNavdeep Parhar.It 11854912308SNavdeep Parhar.Cm context fl Ar flm_cntxt_id 11954912308SNavdeep Parhar.El 12054912308SNavdeep ParharDisplay hardware context for an ingress queue, congestion manager, egress 12154912308SNavdeep Parharqueue, or freelist manager. 12254912308SNavdeep Parhar.Bl -tag -width ingress_cntxt_id -compact 12354912308SNavdeep Parhar.It Ar ingress_cntxt_id 12454912308SNavdeep Parharcontext id of an ingress queue -- the value listed in one of 12554912308SNavdeep Parhar.Va dev.t4nex.%d.fwq.cntxt_id Ns , 12654912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns , 12754912308SNavdeep Parharor 12854912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns . 12954912308SNavdeep Parhar.It Ar egress_cntxt_id 13054912308SNavdeep Parharcontext id of an egress queue -- the value listed in one of 13154912308SNavdeep Parhar.Va dev.t4nex.%d.mgmtq.cntxt_id Ns , 13254912308SNavdeep Parhar.Va dev.cxgbe.%d.txq.%d.cntxt_id Ns , 13354912308SNavdeep Parhar.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns , 13454912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns , 13554912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns , 13654912308SNavdeep Parharor 13754912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns . 13854912308SNavdeep ParharNote that freelists are egress queues too. 13954912308SNavdeep Parhar.It Ar flm_cntxt_id 14059daefd7SEnji Coopercontext id of a freelist manager. 14159daefd7SEnji CooperThe FLM context id is displayed in the 14254912308SNavdeep Parharegress context dump of a freelist as FLMcontextID. 14354912308SNavdeep Parhar.El 14454912308SNavdeep Parhar.It Cm filter mode Op Ar match-criteria ... 14554912308SNavdeep ParharDisplay or set the nexus's filter mode. 14654912308SNavdeep Parhar.Ar match-criteria 14754912308SNavdeep Parharis a whitespace separated list of criteria from the table below. 14854912308SNavdeep ParharEach criteria has an associated budget which is also listed in the table. 14954912308SNavdeep ParharThe total budget allowed is 36 and attempts to set a filter mode that 15054912308SNavdeep Parharexceeds this will be rejected. 15154912308SNavdeep ParharEvery filter must conform to the filter mode -- multiple match criteria 15254912308SNavdeep Parharper filter are allowed but only from among those in the current setting 15354912308SNavdeep Parharof the filter mode. 15454912308SNavdeep ParharThe filter mode can only be changed when there are no existing filters. 15554912308SNavdeep ParharIts default value is 15654912308SNavdeep Parhar.Cm ipv4 ipv6 sip dip sport dport matchtype proto vlan iport fcoe 15754912308SNavdeep Parhar.Pp 15854912308SNavdeep Parhar(Note that 15954912308SNavdeep Parhar.Ar mask 16054912308SNavdeep Parhardefaults to all 1s when not provided explicitly. 16154912308SNavdeep ParharAlso note that many of the items being matched are discrete numeric 16254912308SNavdeep Parharvalues rather than bit fields and should be masked with caution.) 16354912308SNavdeep Parhar.TS 16454912308SNavdeep Parharcenter expand; 16554912308SNavdeep Parharcb cb cb cbw(40m) 16654912308SNavdeep Parharcb c l l. 16754912308SNavdeep ParharCriteria Budget Usage Matches if ... 16854912308SNavdeep Parhar_ 16954912308SNavdeep Parharipv4 0 T{ 17054912308SNavdeep Parhar.Cm type ipv4 17154912308SNavdeep ParharT} T{ 17254912308SNavdeep Parharincoming packet is an IPv4 datagram. 17354912308SNavdeep ParharT} 17454912308SNavdeep Parhar_ 17554912308SNavdeep Parharipv6 0 T{ 17654912308SNavdeep Parhar.Cm type ipv6 17754912308SNavdeep ParharT} T{ 17854912308SNavdeep Parharincoming packet is an IPv6 datagram. 17954912308SNavdeep ParharT} 18054912308SNavdeep Parhar_ 18154912308SNavdeep Parharsip 0 T{ 18254912308SNavdeep Parhar.Cm sip Ar addr Ns Op / Ns Ar mask 18354912308SNavdeep ParharT} T{ 18454912308SNavdeep Parharbitwise and of the source address in an incoming IP datagram with 18554912308SNavdeep Parhar.Ar mask 18654912308SNavdeep Parharequals 18754912308SNavdeep Parhar.Ar addr Ns . 18854912308SNavdeep Parhar.Ar addr 18954912308SNavdeep Parharcan be an IPv4 or IPv6 address. 19054912308SNavdeep ParharT} 19154912308SNavdeep Parhar_ 19254912308SNavdeep Parhardip 0 T{ 19354912308SNavdeep Parhar.Cm dip Ar addr Ns Op / Ns Ar mask 19454912308SNavdeep ParharT} T{ 19554912308SNavdeep Parharbitwise and of the destination address in an incoming IP datagram with 19654912308SNavdeep Parhar.Ar mask 19754912308SNavdeep Parharequals 19854912308SNavdeep Parhar.Ar addr Ns . 19954912308SNavdeep Parhar.Ar addr 20054912308SNavdeep Parharcan be an IPv4 or IPv6 address. 20154912308SNavdeep ParharT} 20254912308SNavdeep Parhar_ 20354912308SNavdeep Parharsport 0 T{ 20454912308SNavdeep Parhar.Cm sport Ar port Ns Op : Ns Ar mask 20554912308SNavdeep ParharT} T{ 20654912308SNavdeep Parharbitwise and of the source port in an incoming TCP or UDP datagram with 20754912308SNavdeep Parhar.Ar mask 20854912308SNavdeep Parharequals 20954912308SNavdeep Parhar.Ar port Ns . 21054912308SNavdeep ParharT} 21154912308SNavdeep Parhar_ 21254912308SNavdeep Parhardport 0 T{ 21354912308SNavdeep Parhar.Cm dport Ar port Ns Op : Ns Ar mask 21454912308SNavdeep ParharT} T{ 21554912308SNavdeep Parharbitwise and of the destination port in an incoming TCP or UDP datagram with 21654912308SNavdeep Parhar.Ar mask 21754912308SNavdeep Parharequals 21854912308SNavdeep Parhar.Ar port Ns . 21954912308SNavdeep ParharT} 22054912308SNavdeep Parhar_ 22154912308SNavdeep Parharfcoe 1 T{ 22254912308SNavdeep Parhar.Cm fcoe Brq 0 | 1 22354912308SNavdeep ParharT} T{ 22454912308SNavdeep Parharincoming frame is Fibre Channel over Ethernet(1) or not(0). 22554912308SNavdeep ParharT} 22654912308SNavdeep Parhar_ 22754912308SNavdeep Parhariport 3 T{ 22854912308SNavdeep Parhar.Cm iport Ar val Ns Op : Ns Ar mask 22954912308SNavdeep ParharT} T{ 23054912308SNavdeep Parharbitwise and of the ingress port with 23154912308SNavdeep Parhar.Ar mask 23254912308SNavdeep Parharequals 23354912308SNavdeep Parhar.Ar val Ns . 23454912308SNavdeep ParharThe ingress port is a 3 bit number that identifies the port on which a 23554912308SNavdeep Parharframe arrived. 23654912308SNavdeep ParharPhysical ports are numbered 0-3 and 4-7 are internal loopback paths 23754912308SNavdeep Parharwithin the chip. 23854912308SNavdeep ParharNote that ingress port is not a bit field so it is not always possible 23954912308SNavdeep Parharto match an arbitrary subset of ingress ports with a single filter rule. 24054912308SNavdeep ParharT} 24154912308SNavdeep Parhar_ 24254912308SNavdeep Parharovlan 17 T{ 24354912308SNavdeep Parhar.Cm ovlan Ar tag Ns Op : Ns Ar mask 24454912308SNavdeep ParharT} T{ 24554912308SNavdeep Parharbitwise and of the 16-bit outer VLAN tag of an incoming frame with 24654912308SNavdeep Parhar.Ar mask 24754912308SNavdeep Parharequals 24854912308SNavdeep Parhar.Ar tag Ns . 24954912308SNavdeep ParharT} 25054912308SNavdeep Parhar_ 25154912308SNavdeep Parharvlan 17 T{ 25254912308SNavdeep Parhar.Cm vlan Ar tag Ns Op : Ns Ar mask 25354912308SNavdeep ParharT} T{ 25454912308SNavdeep Parharbitwise and of the 16-bit VLAN tag of an incoming QinQ frame with 25554912308SNavdeep Parhar.Ar mask 25654912308SNavdeep Parharequals 25754912308SNavdeep Parhar.Ar tag Ns . 25854912308SNavdeep ParharThe inner VLAN tag is used if the incoming frame is QinQ. 25954912308SNavdeep ParharT} 26054912308SNavdeep Parhar_ 26154912308SNavdeep Parhartos 8 T{ 26254912308SNavdeep Parhar.Cm tos Ar val Ns Op : Ns Ar mask 26354912308SNavdeep ParharT} T{ 26454912308SNavdeep Parharbitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an 26554912308SNavdeep Parharincoming packet with 26654912308SNavdeep Parhar.Ar mask 26754912308SNavdeep Parharequals 26854912308SNavdeep Parhar.Ar val Ns . 26954912308SNavdeep ParharT} 27054912308SNavdeep Parhar_ 27154912308SNavdeep Parharproto 8 T{ 27254912308SNavdeep Parhar.Cm proto Ar ipproto Ns Op : Ns Ar mask 27354912308SNavdeep ParharT} T{ 27454912308SNavdeep Parharbitwise and of the 8-bit IP protocol in an incoming packet with 27554912308SNavdeep Parhar.Ar mask 27654912308SNavdeep Parharequals 27754912308SNavdeep Parhar.Ar ipproto Ns . 27854912308SNavdeep ParharT} 27954912308SNavdeep Parhar_ 28054912308SNavdeep Parharethtype 16 T{ 28154912308SNavdeep Parhar.Cm ethtype Ar type Ns Op : Ns Ar mask 28254912308SNavdeep ParharT} T{ 28354912308SNavdeep Parharbitwise and of the 16-bit Ethernet type field of an incoming frame with 28454912308SNavdeep Parhar.Ar mask 28554912308SNavdeep Parharequals 28654912308SNavdeep Parhar.Ar type Ns . 28754912308SNavdeep ParharT} 28854912308SNavdeep Parhar_ 28954912308SNavdeep Parharmacidx 9 T{ 29054912308SNavdeep Parhar.Cm macidx Ar idx Ns Op : Ns Ar mask 29154912308SNavdeep ParharT} T{ 29254912308SNavdeep Parharbitwise and of the MAC Address Match Index of an incoming frame with 29354912308SNavdeep Parhar.Ar mask 29454912308SNavdeep Parharequals 29554912308SNavdeep Parhar.Ar idx Ns . 29654912308SNavdeep ParharThe MAC Address Match Index refers to an entry in the MPS TCAM or in the 29754912308SNavdeep ParharMPS hash. See 29854912308SNavdeep Parhar.Cm matchtype 29954912308SNavdeep Parharfor more information. 30054912308SNavdeep ParharT} 30154912308SNavdeep Parhar_ 30254912308SNavdeep Parharmatchtype 3 T{ 30354912308SNavdeep Parhar.Cm matchtype Ar type Ns Op : Ns Ar mask 30454912308SNavdeep ParharT} T{ 30554912308SNavdeep Parharbitwise and of the Match Type of an incoming frame with 30654912308SNavdeep Parhar.Ar mask 30754912308SNavdeep Parharequals 30854912308SNavdeep Parhar.Ar idx Ns . 30954912308SNavdeep ParharMatch Type is one of the following: 31054912308SNavdeep Parhar.Bl -tag -width "n" -compact 31154912308SNavdeep Parhar.It 0 31254912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that is 31354912308SNavdeep Parharprogrammed in the MPS TCAM. 31454912308SNavdeep Parhar.Cm macidx 31554912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match 31654912308SNavdeep Parharin the TCAM. 31754912308SNavdeep Parhar.It 1 31854912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that "hit" a 31954912308SNavdeep Parharhash entry in the MPS hash table. 32054912308SNavdeep Parhar.Cm macidx 32154912308SNavdeep Parharcan be used to match the index of the entry in the MPS hash table. 32254912308SNavdeep Parhar.It 2 32354912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that is 32454912308SNavdeep Parharprogrammed in the MPS TCAM. 32554912308SNavdeep Parhar.Cm macidx 32654912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match 32754912308SNavdeep Parharin the TCAM. 32854912308SNavdeep Parhar.It 3 32954912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that "hit" 33054912308SNavdeep Parharan entry in the MPS hash table. 33154912308SNavdeep Parhar.It 4 33254912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode 33354912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address, and 33454912308SNavdeep Parhardoes not match in the MPS TCAM or the MPS hash either. (The frame would 33554912308SNavdeep Parharhave been discarded if the interface wasn't in promiscuous mode.) 33654912308SNavdeep Parhar.It 5 33754912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode 33854912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address; it 33954912308SNavdeep Parharwasn't looked up in the MPS TCAM or the MPS hash because the chip is 34054912308SNavdeep Parharconfigured to give precedence to promiscuous mode classification. 34154912308SNavdeep Parhar.It 6 34254912308SNavdeep Parhardestination MAC in incoming frame is a broadcast address. 34354912308SNavdeep Parhar.It 7 34454912308SNavdeep ParharNot documented. Do not use. 34554912308SNavdeep Parhar.El 34654912308SNavdeep ParharT} 34754912308SNavdeep Parhar_ 34854912308SNavdeep Parharfrag 1 T{ 34954912308SNavdeep Parhar.Cm frag Brq 0 | 1 35054912308SNavdeep ParharT} T{ 35154912308SNavdeep Parharincoming frame is part of a fragmented IP datagram(1) or not(0). 35254912308SNavdeep ParharT} 35354912308SNavdeep Parhar.TE 35454912308SNavdeep Parhar.It Cm filter Ar idx Ar filter-specification 35554912308SNavdeep ParharProgram a filter at the index specified by 35654912308SNavdeep Parhar.Ar idx Ns . 35754912308SNavdeep Parhar.Ar filter-specification 35854912308SNavdeep Parharconsists of one or more matches to try against an incoming frame and an 35954912308SNavdeep Parharaction to perform when all matches succeed. 36054912308SNavdeep Parhar.It Cm filter Ar idx Cm delete 36154912308SNavdeep ParharDelete filter that is at the given index. 36254912308SNavdeep Parhar.It Cm filter Cm list 36354912308SNavdeep ParharList all filters programmed into the hardware. 36454912308SNavdeep Parhar.It Cm i2c Ar port_id devaddr addr Op Ar len 36554912308SNavdeep Parhar.It Cm loadcfg Ar fw-config.txt 36654912308SNavdeep ParharInstall the firmware configuration file contained in 36754912308SNavdeep Parhar.Ar fw-config.txt 36854912308SNavdeep Parharto the card. 36954912308SNavdeep ParharSet hw.cxgbe.config_file="flash" in loader.conf to get 37054912308SNavdeep Parhar.Xr cxgbe 4 37154912308SNavdeep Parharto use the on-flash configuration. 37254912308SNavdeep Parhar.It Cm loadcfg Cm clear 37354912308SNavdeep ParharErase configuration file from the card. 37454912308SNavdeep Parhar.It Cm loadfw Ar fw-image.bin 37554912308SNavdeep ParharInstall the firmware contained in 37654912308SNavdeep Parhar.Ar fw-image.bin 37754912308SNavdeep Parharto the card. 37854912308SNavdeep Parhar.It Cm memdump Ar addr len 37954912308SNavdeep ParharDisplay 38054912308SNavdeep Parhar.Ar len 38154912308SNavdeep Parharbytes of data of the card's memory starting at 38254912308SNavdeep Parhar.Ar addr Ns . 38354912308SNavdeep ParharThe card's memory map is available in 38454912308SNavdeep Parhar.Va dev.t4nex.%d.misc.meminfo Ns . 3851131c927SNavdeep Parhar.It Cm policy Ar cop.txt 3861131c927SNavdeep ParharInstall the Connection Offload Policy (COP) in 3871131c927SNavdeep Parhar.Ar cop.txt Ns . 3881131c927SNavdeep ParharA COP offers fine-grained control over which connections get offloaded and with 3891131c927SNavdeep Parharwhat parameters. 3901131c927SNavdeep ParharSet 3911131c927SNavdeep Parhar.Cm hw.cxgbe.cop_managed_offloading="1" 3921131c927SNavdeep Parharin loader.conf to ensure that t4_tom will not offload any connection before a 3931131c927SNavdeep ParharCOP is installed. 3941131c927SNavdeep ParharNote that t4_tom must be loaded and operational (IFCAP_TOE enabled) as always 3951131c927SNavdeep Parharfor any kind of offload based on the hardware TOE. 3961131c927SNavdeep Parhar.Bl -column -offset indent "COP installed" "cop_managed_offloading" "Behavior" 3971131c927SNavdeep Parhar.It Sy COP installed Ta Sy cop_managed_offloading Ta Sy Behavior 3981131c927SNavdeep Parhar.It NO Ta 0 Ta offload all [Default] 3991131c927SNavdeep Parhar.It NO Ta 1 Ta no offload 4001131c927SNavdeep Parhar.It YES Ta Don't Care Ta Rule based offload 4011131c927SNavdeep Parhar.El 4021131c927SNavdeep Parhar.Pp 4031131c927SNavdeep ParharThe policy file consists of empty lines, comments (lines begining with #) and 4041131c927SNavdeep Parharany number of rules. 4051131c927SNavdeep ParharRules are applied in the order they appear in the file and processing stops at 4061131c927SNavdeep Parharthe first match. 4071131c927SNavdeep ParharThere is an implicit rule that disables offload for connections that do not 4081131c927SNavdeep Parharmatch anything in the policy. 4091131c927SNavdeep Parhar.Pp 4101131c927SNavdeep ParharEach rule consists of a filter part, which determines what connections the 4111131c927SNavdeep Parharrule applies to, and a settings part, which determines whether whether matching 4121131c927SNavdeep Parharconnections will be offloaded and, if so, with what settings. 4131131c927SNavdeep ParharThe general form of a rule is 4141131c927SNavdeep Parhar.Bl -ohang -offset indent 4151131c927SNavdeep Parhar.It Cm \&[ Ar socket-type Cm \&] Ar pcap-filter Cm => Ar settings 4161131c927SNavdeep Parhar.Pp 4171131c927SNavdeep Parhar.Ar socket-type 4181131c927SNavdeep Parharis one of the following. 4191131c927SNavdeep Parhar.Bl -tag -width "X" -compact 4201131c927SNavdeep Parhar.It Sy A 4211131c927SNavdeep ParharActive open. 4221131c927SNavdeep ParharConnection is being opened by this host. 4231131c927SNavdeep Parhar.It Sy P 4241131c927SNavdeep ParharPassive open. 4251131c927SNavdeep ParharConnection was requested by a peer. 4261131c927SNavdeep Parhar.It Sy L 4271131c927SNavdeep ParharListen called on a socket. 4281131c927SNavdeep ParharDisabling offload in such a rule will prevent a hardware listener from being started. 4291131c927SNavdeep Parhar.It Sy D 4301131c927SNavdeep ParharDon't care. 4311131c927SNavdeep ParharMatches all of the above. 4321131c927SNavdeep Parhar.El 4331131c927SNavdeep Parhar.Pp 4341131c927SNavdeep Parhar.Ar pcap-filter 4351131c927SNavdeep Parharis an expression that follows the 4361131c927SNavdeep Parhar.Xr pcap-filter 7 4371131c927SNavdeep Parharsyntax, or it is the keyword 4381131c927SNavdeep Parhar.Cm all 4391131c927SNavdeep Parharthat matches everything. 4401131c927SNavdeep Parhar.Pp 4411131c927SNavdeep Parhar.Ar settings 4421131c927SNavdeep Parhardetermine whether connections matching 4431131c927SNavdeep Parhar.Ar socket-type 4441131c927SNavdeep Parharand 4451131c927SNavdeep Parhar.Ar pcap-filter 4461131c927SNavdeep Parharare offloaded and optionally sets some per-connection properties if they are. 4471131c927SNavdeep ParharA combination of the following is allowed. 4481131c927SNavdeep Parhar.Bl -tag -width "timestamp" -compact 4491131c927SNavdeep Parhar.It Cm offload 4501131c927SNavdeep ParharConnection should be offloaded. 4511131c927SNavdeep ParharUse 4521131c927SNavdeep Parhar.Cm !offload 4531131c927SNavdeep Parharor 4541131c927SNavdeep Parhar.Cm not offload 4551131c927SNavdeep Parharto disable offload instead. 4561131c927SNavdeep Parhar.It Cm coalesce 4571131c927SNavdeep ParharEnable rx payload coalescing. 4581131c927SNavdeep ParharNegate to disable. 4591131c927SNavdeep Parhar.It Cm timestamp 4601131c927SNavdeep ParharEnable TCP timestamp option. 4611131c927SNavdeep ParharNegate to disable. 4621131c927SNavdeep Parhar.It Cm sack 4631131c927SNavdeep ParharEnable TCP Selective Acknowledgements (SACK). 4641131c927SNavdeep ParharNegate to disable. 4651131c927SNavdeep Parhar.It Cm nagle 4661131c927SNavdeep ParharEnable Nagle's algorithm. 4671131c927SNavdeep ParharNegate to disable. 4681131c927SNavdeep Parhar.It Cm ecn 4691131c927SNavdeep ParharEnable Explicit Congestion Notification (ECN). 4701131c927SNavdeep ParharNegate to disable. 4711131c927SNavdeep Parhar.It Cm ddp 4721131c927SNavdeep ParharUse Direct Data Placement (zero copy receive) and zero copy transmit on the 4731131c927SNavdeep Parharconnection to service AIO requests on the socket. 4741131c927SNavdeep ParharNegate to disable. 4751131c927SNavdeep Parhar.It Cm tls 4761131c927SNavdeep ParharSet ULP mode to ULP_MODE_TLS. 4771131c927SNavdeep Parhar.It Cm cong Ar algo 4781131c927SNavdeep ParharUse the specified congestion control algorithm. 4791131c927SNavdeep Parhar.Ar algo 4801131c927SNavdeep Parharmust be one of 4811131c927SNavdeep Parhar.Cm reno Ns , Cm tahoe Ns , Cm newreno Ns , or Cm highspeed Ns . 4821131c927SNavdeep Parhar.It Cm class Ar sc 4831131c927SNavdeep ParharBind the connection to the specified tx scheduling class. 4841131c927SNavdeep ParharValid range is 0 to 14 (for T4) and 0 to 15 (T5 onwards). 4851131c927SNavdeep Parhar.It Cm rxq Ar qid 4861131c927SNavdeep ParharUse the specified offload rx queue. 4871131c927SNavdeep Parhar.Ar qid 4881131c927SNavdeep Parharshould be between 0 and nofldrxq for the ifnet. 4891131c927SNavdeep Parhar.It Cm txq Ar qnum 4901131c927SNavdeep ParharUse the specified offload tx queue. 4911131c927SNavdeep Parhar.Ar qid 4921131c927SNavdeep Parharshould be between 0 and nofldtxq for the ifnet. 4931131c927SNavdeep Parhar.It Cm bind Ar qnum 4941131c927SNavdeep ParharShorthand for 4951131c927SNavdeep Parhar.Cm rxq Ar qnum Cm txq Ar qnum Ns . 4961131c927SNavdeep ParharUse only when nofldrxq is the same as nofldtxq. 4971131c927SNavdeep Parhar.It Cm mss Ar val 4981131c927SNavdeep ParharSet the advertised TCP MSS in the SYN for this connection to 4991131c927SNavdeep Parhar.Ar val 5001131c927SNavdeep Parhar(in bytes). 5011131c927SNavdeep ParharThe hardware MTU table must already have an entry that is suitable for the MSS. 5021131c927SNavdeep Parhar.El 5031131c927SNavdeep Parhar.Pp 5041131c927SNavdeep Parhar.It Example of a COP. 5051131c927SNavdeep ParharNote that hardware listener for port 22 will be IPv4 only because the rule 5061131c927SNavdeep Parharbefore it will prevent any IPv6 servers other than the first two. Also note 5071131c927SNavdeep Parharthat outgoing connections to 192.168/16 are the only outgoing connections that 5081131c927SNavdeep Parharwill get offloaded. 5091131c927SNavdeep Parhar.Bd -literal 5101131c927SNavdeep Parhar[L] port 80 => offload 5111131c927SNavdeep Parhar[L] port 443 => offload 5121131c927SNavdeep Parhar[L] ip6 => !offload 5131131c927SNavdeep Parhar[L] port 22 => offload 5141131c927SNavdeep Parhar[P] dst port 80 => offload cong highspeed !sack !ecn 5151131c927SNavdeep Parhar[P] dst port 443 => offload tls 5161131c927SNavdeep Parhar[A] dst net 192.168/16 => offload 5171131c927SNavdeep Parhar[A] all => !offload 5181131c927SNavdeep Parhar[D] port 22 => offload !nagle 5191131c927SNavdeep Parhar.Ed 5201131c927SNavdeep Parhar.El 5211131c927SNavdeep Parhar.It Cm policy clear 5221131c927SNavdeep ParharRemove the Connection Offload Policy (COP) if one is in use. 52354912308SNavdeep Parhar.It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val 52454912308SNavdeep Parhar.It Cm regdump Op Ar register-block ... 52559daefd7SEnji CooperDisplay contents of device registers. 52659daefd7SEnji CooperOne or more 52754912308SNavdeep Parhar.Ar register-block 52854912308SNavdeep Parharcan be specified to limit the registers displayed. 52954912308SNavdeep ParharThe default is to display registers for all blocks. 53054912308SNavdeep ParharRegisters with read side effects are not read during a 53154912308SNavdeep Parhar.Cm regdump 53254912308SNavdeep Parharoperation. 53354912308SNavdeep Parhar.Ar register-block 53454912308SNavdeep Parharcan be 53554912308SNavdeep Parhar.Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw 53654912308SNavdeep Parhar.Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns . 53754912308SNavdeep Parhar.It Cm sched-class config Op Ar param Ar value 53854912308SNavdeep ParharConfigure optional feature capabilities for the TX scheduler. 53954912308SNavdeep Parhar.Bl -ohang -offset indent 54054912308SNavdeep Parhar.It Sy type Ar scheduler-type 54154912308SNavdeep ParharUse packet for the packet scheduler. 54254912308SNavdeep Parhar.It Sy minmax Ar value 54354912308SNavdeep ParharA non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode. 54454912308SNavdeep Parhar.Pp 54554912308SNavdeep ParharNOTE: Many (most) of the parameters and constraints are adapter-specific 54654912308SNavdeep Parhar- for instance the number of channels and classes which are available 54759daefd7SEnji Cooperwhether various modes are implemented, etc. 54859daefd7SEnji CooperConsult the adapter documentation for specific information on any limitations. 54954912308SNavdeep Parhar.El 55054912308SNavdeep Parhar.It Cm sched-class params Op Ar param Ar value 55154912308SNavdeep ParharConfigure parameters for a scheduling class. 55254912308SNavdeep Parhar.Bl -ohang -offset indent 55354912308SNavdeep Parhar.It Sy type Ar scheduler-type 55454912308SNavdeep ParharUse packet for packet scheduler. 55554912308SNavdeep Parhar.It Sy level Ar scheduler-hierarchy-level 55654912308SNavdeep ParharThe "level" within the scheduling hierarchy which is being programed: 55754912308SNavdeep Parhar.Pp 55854912308SNavdeep Parhar.Bl -tag -width "cl-wrr" -compact -offset indent 55954912308SNavdeep Parhar.It Sy cl-rl 56054912308SNavdeep ParharClass Rate Limiting. 56154912308SNavdeep Parhar.Pp 56254912308SNavdeep Parhar.It Sy cl-wrr 56354912308SNavdeep ParharClass Weighted Round Robin. 56454912308SNavdeep Parhar.Pp 565*0d7404baSNavdeep Parhar.It Sy ch-rl 56654912308SNavdeep ParharChannel Rate Limiting. 56754912308SNavdeep Parhar.El 56854912308SNavdeep Parhar.It Sy mode Ar scheduler-mode 56954912308SNavdeep ParharThe mode in which the scheduling class is going to operate: 57054912308SNavdeep Parhar.Pp 57154912308SNavdeep Parhar.Bl -tag -width "class" -compact -offset indent 57254912308SNavdeep Parhar.It Sy class 57354912308SNavdeep ParharAll of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints. 57454912308SNavdeep Parhar.Pp 57554912308SNavdeep Parhar.It Sy flow 57654912308SNavdeep ParharEach of the "flows" bound to the scheduling class will be held to the scheduling constraints. 57754912308SNavdeep Parhar.El 57854912308SNavdeep Parhar.Pp 57954912308SNavdeep ParharE.g. if the scheduling class has a TX bandwidth of 10Mb/s, in 58054912308SNavdeep Parhar.Cm class 58154912308SNavdeep Parharmode, all of the "flows" bound to the class would be limited to an 58254912308SNavdeep Parharaggregate bandwidth of 10Mb/s; but in 58354912308SNavdeep Parhar.Cm flow 58454912308SNavdeep Parharmode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s. 58554912308SNavdeep Parhar.It Sy rate-unit Ar scheduler-rate-unit 58654912308SNavdeep ParharThe units of the scheduler rate constraints: 58754912308SNavdeep Parhar.Pp 58854912308SNavdeep Parhar.Bl -tag -width "bits" -compact -offset indent 58954912308SNavdeep Parhar.It Sy bits 59054912308SNavdeep Parharbit rate in Kb/s. 59154912308SNavdeep Parhar.Pp 59254912308SNavdeep Parhar.It Sy pkts 59354912308SNavdeep Parharpackets/s. 59454912308SNavdeep Parhar.El 59554912308SNavdeep Parhar.It Sy rate-mode Ar scheduler-rate-mode 59654912308SNavdeep ParharThe mode of the scheduler rate constraints: 59754912308SNavdeep Parhar.Pp 59854912308SNavdeep Parhar.Bl -tag -width "relative" -compact -offset indent 59954912308SNavdeep Parhar.It Sy relative 60054912308SNavdeep Parharpercent of port rate. 60154912308SNavdeep Parhar.Pp 60254912308SNavdeep Parhar.It Sy absolute 60354912308SNavdeep ParharKb/s. 60454912308SNavdeep Parhar.El 60554912308SNavdeep Parhar.It Sy channel Ar scheduler-channel-index 60654912308SNavdeep ParharThe scheduling channel to which the scheduling class will be bound. 60754912308SNavdeep Parhar.It Sy class Ar scheduler-class-index 60854912308SNavdeep ParharThe scheduling class being programmed. 60954912308SNavdeep Parhar.It Sy min-rate Ar minimum-rate 61054912308SNavdeep ParharThe minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access. 61154912308SNavdeep Parhar.It Sy max-rate Ar maximum-rate 61254912308SNavdeep ParharThe maximum rate for a rate-limiting scheduling class hierarchy. 61354912308SNavdeep Parhar.It Sy weight Ar round-robin-weight 61454912308SNavdeep ParharThe weight to be used for a weighted-round-robin scheduling hierarchy. 61554912308SNavdeep Parhar.It Sy pkt-size Ar average-packet-size 61654912308SNavdeep ParharThe average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy. 61754912308SNavdeep Parhar.Pp 61854912308SNavdeep ParharNOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available, 61959daefd7SEnji Cooperwhether various modes are implemented, etc. 62059daefd7SEnji CooperConsult the adapter documentation for specific information on any limitations. 62154912308SNavdeep Parhar.El 62254912308SNavdeep Parhar.It Cm sched-queue Ar port queue class 62354912308SNavdeep ParharBind the indicated port's NIC TX 62454912308SNavdeep Parhar.Ar queue 62554912308SNavdeep Parharto the specified TX Scheduler 62654912308SNavdeep Parhar.Ar class. 62754912308SNavdeep ParharIf the TX 62854912308SNavdeep Parhar.Ar queue 62954912308SNavdeep Parharis 63054912308SNavdeep Parhar.Cm all, * 63154912308SNavdeep Parharor any negative value, the binding will apply to 63254912308SNavdeep Parharall of the TX queues associated with the 63354912308SNavdeep Parhar.Ar interface. 63454912308SNavdeep ParharIf the class is 63554912308SNavdeep Parhar.Cm unbind, clear 63654912308SNavdeep Parharor any negative value, the TX queue(s) will be unbound from 63754912308SNavdeep Parharany current TX Scheduler Class binding. 63854912308SNavdeep Parhar.It Cm stdio 63954912308SNavdeep ParharSwitch to interactive mode. 64054912308SNavdeep Parhar.It Cm tcb Ar tid 64154912308SNavdeep ParharDisplay contents of the hardware TCB (TCP Control Block) for the 64254912308SNavdeep Parharconnection identfied by 64354912308SNavdeep Parhar.Ar tid Ns . 64454912308SNavdeep Parhar.El 64554912308SNavdeep Parhar.Sh FILES 64654912308SNavdeep Parhar/sys/dev/cxgbe/t4_ioctl.h 64754912308SNavdeep Parhar.Sh AUTHORS 64854912308SNavdeep ParharThis manual page was written by 64954912308SNavdeep Parhar.An Navdeep Parhar Aq np@FreeBSD.org . 650