136ea2fe3SNavdeep Parhar.\" Copyright (c) 2015, 2018 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.\" 34*ac02945fSNavdeep Parhar.Dd May 23, 2021 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 49*ac02945fSNavdeep Parhar.Nm Ar nexus Cm clip Bro Cm hold | release Brc Ar ipv6-address 50*ac02945fSNavdeep Parhar.It 51*ac02945fSNavdeep Parhar.Nm Ar nexus Cm clip Cm list 52*ac02945fSNavdeep Parhar.It 5354912308SNavdeep Parhar.Nm Ar nexus Cm context Bro Cm ingress | egress | fl | cong Brc Ar cntxt_id 5454912308SNavdeep Parhar.It 5536ea2fe3SNavdeep Parhar.Nm Ar nexus Cm hashfilter mode 5654912308SNavdeep Parhar.It 5736ea2fe3SNavdeep Parhar.Nm Ar nexus Cm hashfilter Ar filter-specification 5836ea2fe3SNavdeep Parhar.It 5936ea2fe3SNavdeep Parhar.Nm Ar nexus Cm hashfilter Ar idx Cm delete 6036ea2fe3SNavdeep Parhar.It 6136ea2fe3SNavdeep Parhar.Nm Ar nexus Cm hashfilter list 6236ea2fe3SNavdeep Parhar.It 6336ea2fe3SNavdeep Parhar.Nm Ar nexus Cm filter mode 6436ea2fe3SNavdeep Parhar.It 6536ea2fe3SNavdeep Parhar.Nm Ar nexus Cm filter Ar idx Ar filter-specification 6636ea2fe3SNavdeep Parhar.It 676ba81353SNavdeep Parhar.Nm Ar nexus Cm filter Ar idx Cm delete Op Cm prio Bro Cm 0 | 1 Brc 6854912308SNavdeep Parhar.It 6954912308SNavdeep Parhar.Nm Ar nexus Cm filter list 7054912308SNavdeep Parhar.It 7154912308SNavdeep Parhar.Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len 7254912308SNavdeep Parhar.It 7354912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg Ar fw-config.txt 7454912308SNavdeep Parhar.It 7554912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg clear 7654912308SNavdeep Parhar.It 7754912308SNavdeep Parhar.Nm Ar nexus Cm loadfw Ar fw-image.bin 7854912308SNavdeep Parhar.It 7954912308SNavdeep Parhar.Nm Ar nexus Cm memdump Ar addr len 8054912308SNavdeep Parhar.It 811131c927SNavdeep Parhar.Nm Ar nexus Cm policy Ar cop.txt 821131c927SNavdeep Parhar.It 831131c927SNavdeep Parhar.Nm Ar nexus Cm policy clear 841131c927SNavdeep Parhar.It 8554912308SNavdeep Parhar.Nm Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val 8654912308SNavdeep Parhar.It 8754912308SNavdeep Parhar.Nm Ar nexus Cm regdump Op Ar register-block ... 8854912308SNavdeep Parhar.It 8954912308SNavdeep Parhar.Nm Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value 9054912308SNavdeep Parhar.It 9154912308SNavdeep Parhar.Nm Ar nexus Cm sched-queue Ar port Ar queue Ar class 9254912308SNavdeep Parhar.It 9354912308SNavdeep Parhar.Nm Ar nexus Cm stdio 9454912308SNavdeep Parhar.It 9554912308SNavdeep Parhar.Nm Ar nexus Cm tcb Ar tid 9654912308SNavdeep Parhar.El 9754912308SNavdeep Parhar.Sh DESCRIPTION 9854912308SNavdeep Parhar.Nm 9954912308SNavdeep Parharprovides command-line access to features and debug facilities exported by 10054912308SNavdeep Parhar.Xr cxgbe 4 10154912308SNavdeep Parharvia private ioctls. 10254912308SNavdeep ParharThe target nexus device, 10354912308SNavdeep Parhar.Va t4nex%d 10454912308SNavdeep Parhar, is always the first argument. 10554912308SNavdeep Parhar(The parent nexus for an Ethernet port 10654912308SNavdeep Parhar.Va cxgbe%d 10754912308SNavdeep Parharis listed in 10854912308SNavdeep Parhar.Va dev.cxgbe.%d.%parent 10954912308SNavdeep Parharin the 11054912308SNavdeep Parhar.Xr sysctl 8 11154912308SNavdeep ParharMIB). 11254912308SNavdeep ParharThe rest consists of a command and any parameters required by that command. 11354912308SNavdeep Parhar.Ss Commands 11454912308SNavdeep Parhar.Bl -ohang 11554912308SNavdeep Parhar.It Cm clearstats Ar port_id 11654912308SNavdeep ParharClear all transmit, receive, and error statistics of all queues associated 11754912308SNavdeep Parharwith a port. 11854912308SNavdeep ParharThe total number of ports attached to a nexus is listed in 11954912308SNavdeep Parhar.Va dev.t4nex.%d.nports 12054912308SNavdeep Parharand the 0 based 12154912308SNavdeep Parhar.Ar port_id 12254912308SNavdeep Parharidentifies a port within this range. 12354912308SNavdeep Parhar.Pp 12454912308SNavdeep Parhar.Bl -item -compact 12554912308SNavdeep Parhar.It 126*ac02945fSNavdeep Parhar.Cm clip hold Ar ipv6-address 127*ac02945fSNavdeep Parhar.El 128*ac02945fSNavdeep ParharInstall a reference on the given 129*ac02945fSNavdeep Parhar.Ar ipv6-address 130*ac02945fSNavdeep Parharin the CLIP (Compressed Local IPv6) table. 131*ac02945fSNavdeep ParharThe address is added to the CLIP table if it is not present there already. 132*ac02945fSNavdeep Parhar.Pp 133*ac02945fSNavdeep Parhar.Bl -item -compact 134*ac02945fSNavdeep Parhar.It 135*ac02945fSNavdeep Parhar.Cm clip list 136*ac02945fSNavdeep Parhar.El 137*ac02945fSNavdeep ParharList the contents of the CLIP table. 138*ac02945fSNavdeep Parhar.Pp 139*ac02945fSNavdeep Parhar.Bl -item -compact 140*ac02945fSNavdeep Parhar.It 141*ac02945fSNavdeep Parhar.Cm clip release Ar ipv6-address 142*ac02945fSNavdeep Parhar.El 143*ac02945fSNavdeep ParharRelease a reference on the given 144*ac02945fSNavdeep Parhar.Ar ipv6-address 145*ac02945fSNavdeep Parharin the CLIP table. 146*ac02945fSNavdeep ParharA reference on the address must have been acquired previously. 147*ac02945fSNavdeep Parhar.Pp 148*ac02945fSNavdeep Parhar.Bl -item -compact 149*ac02945fSNavdeep Parhar.It 15054912308SNavdeep Parhar.Cm context ingress Ar ingress_cntxt_id 15154912308SNavdeep Parhar.It 15254912308SNavdeep Parhar.Cm context cong Ar ingress_cntxt_id 15354912308SNavdeep Parhar.It 15454912308SNavdeep Parhar.Cm context egress Ar egress_cntxt_id 15554912308SNavdeep Parhar.It 15654912308SNavdeep Parhar.Cm context fl Ar flm_cntxt_id 15754912308SNavdeep Parhar.El 15854912308SNavdeep ParharDisplay hardware context for an ingress queue, congestion manager, egress 15954912308SNavdeep Parharqueue, or freelist manager. 16054912308SNavdeep Parhar.Bl -tag -width ingress_cntxt_id -compact 16154912308SNavdeep Parhar.It Ar ingress_cntxt_id 16254912308SNavdeep Parharcontext id of an ingress queue -- the value listed in one of 16354912308SNavdeep Parhar.Va dev.t4nex.%d.fwq.cntxt_id Ns , 16454912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns , 16554912308SNavdeep Parharor 16654912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns . 16754912308SNavdeep Parhar.It Ar egress_cntxt_id 16854912308SNavdeep Parharcontext id of an egress queue -- the value listed in one of 16954912308SNavdeep Parhar.Va dev.t4nex.%d.mgmtq.cntxt_id Ns , 17054912308SNavdeep Parhar.Va dev.cxgbe.%d.txq.%d.cntxt_id Ns , 17154912308SNavdeep Parhar.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns , 17254912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns , 17354912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns , 17454912308SNavdeep Parharor 17554912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns . 17654912308SNavdeep ParharNote that freelists are egress queues too. 17754912308SNavdeep Parhar.It Ar flm_cntxt_id 17859daefd7SEnji Coopercontext id of a freelist manager. 17959daefd7SEnji CooperThe FLM context id is displayed in the 18054912308SNavdeep Parharegress context dump of a freelist as FLMcontextID. 18154912308SNavdeep Parhar.El 18236ea2fe3SNavdeep Parhar.Pp 18336ea2fe3SNavdeep Parhar.Bl -item -compact 18436ea2fe3SNavdeep Parhar.It 18536ea2fe3SNavdeep Parhar.Cm hashfilter mode 18636ea2fe3SNavdeep Parhar.It 18736ea2fe3SNavdeep Parhar.Cm filter mode 18836ea2fe3SNavdeep Parhar.El 18936ea2fe3SNavdeep ParharDisplay a list of match-criteria available for use in filter rules. 19036ea2fe3SNavdeep ParharA full list of match-criteria known to the chip is in the table below but not 19136ea2fe3SNavdeep Parharall can be used together and the firmware sets up the available parameters based 19236ea2fe3SNavdeep Parharon "filterMode" in the configuration file. 19336ea2fe3SNavdeep ParharEvery filter must conform to the filter mode -- multiple match criteria per 19436ea2fe3SNavdeep Parharfilter are allowed but only from among those in the current setting of the 19536ea2fe3SNavdeep Parharfilter mode. 19636ea2fe3SNavdeep ParharThe filter mode for hash filters is a subset of that for normal TCAM filters and 19736ea2fe3SNavdeep Parhardepends on the "filterMask" setting in the firmware configuration file. 19836ea2fe3SNavdeep ParharHash filters do not support masked matches and an exact value for every 19936ea2fe3SNavdeep Parharparameter in the output of "hashfilter mode" (except ipv4/ipv6) must be provided 20036ea2fe3SNavdeep Parharwhen creating a hash filter. 20154912308SNavdeep Parhar.Pp 20254912308SNavdeep Parhar(Note that 20354912308SNavdeep Parhar.Ar mask 20454912308SNavdeep Parhardefaults to all 1s when not provided explicitly. 20536ea2fe3SNavdeep ParharHash filters do not support masked matches. 20654912308SNavdeep ParharAlso note that many of the items being matched are discrete numeric 20754912308SNavdeep Parharvalues rather than bit fields and should be masked with caution.) 20854912308SNavdeep Parhar.TS 20954912308SNavdeep Parharcenter expand; 21036ea2fe3SNavdeep Parharcb cb cbw(40m) 21136ea2fe3SNavdeep Parharcb l l. 21236ea2fe3SNavdeep ParharCriteria Usage Matches if ... 21354912308SNavdeep Parhar_ 21436ea2fe3SNavdeep Parharipv4 T{ 21554912308SNavdeep Parhar.Cm type ipv4 21654912308SNavdeep ParharT} T{ 21754912308SNavdeep Parharincoming packet is an IPv4 datagram. 21854912308SNavdeep ParharT} 21954912308SNavdeep Parhar_ 22036ea2fe3SNavdeep Parharipv6 T{ 22154912308SNavdeep Parhar.Cm type ipv6 22254912308SNavdeep ParharT} T{ 22354912308SNavdeep Parharincoming packet is an IPv6 datagram. 22454912308SNavdeep ParharT} 22554912308SNavdeep Parhar_ 22636ea2fe3SNavdeep Parharsip T{ 22754912308SNavdeep Parhar.Cm sip Ar addr Ns Op / Ns Ar mask 22854912308SNavdeep ParharT} T{ 22954912308SNavdeep Parharbitwise and of the source address in an incoming IP datagram with 23054912308SNavdeep Parhar.Ar mask 23154912308SNavdeep Parharequals 23254912308SNavdeep Parhar.Ar addr Ns . 23354912308SNavdeep Parhar.Ar addr 23454912308SNavdeep Parharcan be an IPv4 or IPv6 address. 23554912308SNavdeep ParharT} 23654912308SNavdeep Parhar_ 23736ea2fe3SNavdeep Parhardip T{ 23854912308SNavdeep Parhar.Cm dip Ar addr Ns Op / Ns Ar mask 23954912308SNavdeep ParharT} T{ 24054912308SNavdeep Parharbitwise and of the destination address in an incoming IP datagram with 24154912308SNavdeep Parhar.Ar mask 24254912308SNavdeep Parharequals 24354912308SNavdeep Parhar.Ar addr Ns . 24454912308SNavdeep Parhar.Ar addr 24554912308SNavdeep Parharcan be an IPv4 or IPv6 address. 24654912308SNavdeep ParharT} 24754912308SNavdeep Parhar_ 24836ea2fe3SNavdeep Parharsport T{ 24954912308SNavdeep Parhar.Cm sport Ar port Ns Op : Ns Ar mask 25054912308SNavdeep ParharT} T{ 25154912308SNavdeep Parharbitwise and of the source port in an incoming TCP or UDP datagram with 25254912308SNavdeep Parhar.Ar mask 25354912308SNavdeep Parharequals 25454912308SNavdeep Parhar.Ar port Ns . 25554912308SNavdeep ParharT} 25654912308SNavdeep Parhar_ 25736ea2fe3SNavdeep Parhardport T{ 25854912308SNavdeep Parhar.Cm dport Ar port Ns Op : Ns Ar mask 25954912308SNavdeep ParharT} T{ 26054912308SNavdeep Parharbitwise and of the destination port in an incoming TCP or UDP datagram with 26154912308SNavdeep Parhar.Ar mask 26254912308SNavdeep Parharequals 26354912308SNavdeep Parhar.Ar port Ns . 26454912308SNavdeep ParharT} 26554912308SNavdeep Parhar_ 26636ea2fe3SNavdeep Parharfcoe T{ 26754912308SNavdeep Parhar.Cm fcoe Brq 0 | 1 26854912308SNavdeep ParharT} T{ 26954912308SNavdeep Parharincoming frame is Fibre Channel over Ethernet(1) or not(0). 27054912308SNavdeep ParharT} 27154912308SNavdeep Parhar_ 27236ea2fe3SNavdeep Parhariport T{ 27354912308SNavdeep Parhar.Cm iport Ar val Ns Op : Ns Ar mask 27454912308SNavdeep ParharT} T{ 27554912308SNavdeep Parharbitwise and of the ingress port with 27654912308SNavdeep Parhar.Ar mask 27754912308SNavdeep Parharequals 27854912308SNavdeep Parhar.Ar val Ns . 27954912308SNavdeep ParharThe ingress port is a 3 bit number that identifies the port on which a 28054912308SNavdeep Parharframe arrived. 28154912308SNavdeep ParharPhysical ports are numbered 0-3 and 4-7 are internal loopback paths 28254912308SNavdeep Parharwithin the chip. 28354912308SNavdeep ParharNote that ingress port is not a bit field so it is not always possible 28454912308SNavdeep Parharto match an arbitrary subset of ingress ports with a single filter rule. 28554912308SNavdeep ParharT} 28654912308SNavdeep Parhar_ 28736ea2fe3SNavdeep Parharovlan T{ 28854912308SNavdeep Parhar.Cm ovlan Ar tag Ns Op : Ns Ar mask 28954912308SNavdeep ParharT} T{ 29054912308SNavdeep Parharbitwise and of the 16-bit outer VLAN tag of an incoming frame with 29154912308SNavdeep Parhar.Ar mask 29254912308SNavdeep Parharequals 29354912308SNavdeep Parhar.Ar tag Ns . 29454912308SNavdeep ParharT} 29554912308SNavdeep Parhar_ 29636ea2fe3SNavdeep Parharvlan T{ 29754912308SNavdeep Parhar.Cm vlan Ar tag Ns Op : Ns Ar mask 29854912308SNavdeep ParharT} T{ 29954912308SNavdeep Parharbitwise and of the 16-bit VLAN tag of an incoming QinQ frame with 30054912308SNavdeep Parhar.Ar mask 30154912308SNavdeep Parharequals 30254912308SNavdeep Parhar.Ar tag Ns . 30354912308SNavdeep ParharThe inner VLAN tag is used if the incoming frame is QinQ. 30454912308SNavdeep ParharT} 30554912308SNavdeep Parhar_ 30636ea2fe3SNavdeep Parhartos T{ 30754912308SNavdeep Parhar.Cm tos Ar val Ns Op : Ns Ar mask 30854912308SNavdeep ParharT} T{ 30954912308SNavdeep Parharbitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an 31054912308SNavdeep Parharincoming packet with 31154912308SNavdeep Parhar.Ar mask 31254912308SNavdeep Parharequals 31354912308SNavdeep Parhar.Ar val Ns . 31454912308SNavdeep ParharT} 31554912308SNavdeep Parhar_ 31636ea2fe3SNavdeep Parharproto T{ 31754912308SNavdeep Parhar.Cm proto Ar ipproto Ns Op : Ns Ar mask 31854912308SNavdeep ParharT} T{ 31954912308SNavdeep Parharbitwise and of the 8-bit IP protocol in an incoming packet with 32054912308SNavdeep Parhar.Ar mask 32154912308SNavdeep Parharequals 32254912308SNavdeep Parhar.Ar ipproto Ns . 32354912308SNavdeep ParharT} 32454912308SNavdeep Parhar_ 32536ea2fe3SNavdeep Parharethtype T{ 32654912308SNavdeep Parhar.Cm ethtype Ar type Ns Op : Ns Ar mask 32754912308SNavdeep ParharT} T{ 32854912308SNavdeep Parharbitwise and of the 16-bit Ethernet type field of an incoming frame with 32954912308SNavdeep Parhar.Ar mask 33054912308SNavdeep Parharequals 33154912308SNavdeep Parhar.Ar type Ns . 33254912308SNavdeep ParharT} 33354912308SNavdeep Parhar_ 33436ea2fe3SNavdeep Parharmacidx T{ 33554912308SNavdeep Parhar.Cm macidx Ar idx Ns Op : Ns Ar mask 33654912308SNavdeep ParharT} T{ 33754912308SNavdeep Parharbitwise and of the MAC Address Match Index of an incoming frame with 33854912308SNavdeep Parhar.Ar mask 33954912308SNavdeep Parharequals 34054912308SNavdeep Parhar.Ar idx Ns . 34154912308SNavdeep ParharThe MAC Address Match Index refers to an entry in the MPS TCAM or in the 34254912308SNavdeep ParharMPS hash. See 34354912308SNavdeep Parhar.Cm matchtype 34454912308SNavdeep Parharfor more information. 34554912308SNavdeep ParharT} 34654912308SNavdeep Parhar_ 34736ea2fe3SNavdeep Parharmatchtype T{ 34854912308SNavdeep Parhar.Cm matchtype Ar type Ns Op : Ns Ar mask 34954912308SNavdeep ParharT} T{ 35054912308SNavdeep Parharbitwise and of the Match Type of an incoming frame with 35154912308SNavdeep Parhar.Ar mask 35254912308SNavdeep Parharequals 35354912308SNavdeep Parhar.Ar idx Ns . 35454912308SNavdeep ParharMatch Type is one of the following: 35554912308SNavdeep Parhar.Bl -tag -width "n" -compact 35654912308SNavdeep Parhar.It 0 35754912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that is 35854912308SNavdeep Parharprogrammed in the MPS TCAM. 35954912308SNavdeep Parhar.Cm macidx 36054912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match 36154912308SNavdeep Parharin the TCAM. 36254912308SNavdeep Parhar.It 1 36354912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that "hit" a 36454912308SNavdeep Parharhash entry in the MPS hash table. 36554912308SNavdeep Parhar.Cm macidx 36654912308SNavdeep Parharcan be used to match the index of the entry in the MPS hash table. 36754912308SNavdeep Parhar.It 2 36854912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that is 36954912308SNavdeep Parharprogrammed in the MPS TCAM. 37054912308SNavdeep Parhar.Cm macidx 37154912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match 37254912308SNavdeep Parharin the TCAM. 37354912308SNavdeep Parhar.It 3 37454912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that "hit" 37554912308SNavdeep Parharan entry in the MPS hash table. 37654912308SNavdeep Parhar.It 4 37754912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode 37854912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address, and 37954912308SNavdeep Parhardoes not match in the MPS TCAM or the MPS hash either. (The frame would 38054912308SNavdeep Parharhave been discarded if the interface wasn't in promiscuous mode.) 38154912308SNavdeep Parhar.It 5 38254912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode 38354912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address; it 38454912308SNavdeep Parharwasn't looked up in the MPS TCAM or the MPS hash because the chip is 38554912308SNavdeep Parharconfigured to give precedence to promiscuous mode classification. 38654912308SNavdeep Parhar.It 6 38754912308SNavdeep Parhardestination MAC in incoming frame is a broadcast address. 38854912308SNavdeep Parhar.It 7 38954912308SNavdeep ParharNot documented. Do not use. 39054912308SNavdeep Parhar.El 39154912308SNavdeep ParharT} 39254912308SNavdeep Parhar_ 39336ea2fe3SNavdeep Parharfrag T{ 39454912308SNavdeep Parhar.Cm frag Brq 0 | 1 39554912308SNavdeep ParharT} T{ 39654912308SNavdeep Parharincoming frame is part of a fragmented IP datagram(1) or not(0). 39754912308SNavdeep ParharT} 39854912308SNavdeep Parhar.TE 39936ea2fe3SNavdeep Parhar.Pp 40036ea2fe3SNavdeep Parhar.Bl -item -compact 40136ea2fe3SNavdeep Parhar.It 40236ea2fe3SNavdeep Parhar.Cm hashfilter Ar filter-specification 40336ea2fe3SNavdeep Parhar.It 40436ea2fe3SNavdeep Parhar.Cm filter Ar idx Ar filter-specification 40536ea2fe3SNavdeep Parhar.El 40636ea2fe3SNavdeep ParharProgram a filter. 40736ea2fe3SNavdeep Parhar.Pp 40836ea2fe3SNavdeep ParharTCAM filters: The number of available filters is in 40936ea2fe3SNavdeep Parhardev.<nexus>.<instance>.nfilters. 41036ea2fe3SNavdeep Parhar.Ar idx 41136ea2fe3SNavdeep Parharmust be an unused index between 0 and nfilters - 1. 4126ba81353SNavdeep ParharIPv6 filters consume 4 consecutive entries on T4/T5 and 2 on T6 and 41336ea2fe3SNavdeep Parhar.Ar idx 41436ea2fe3SNavdeep Parharmust be aligned to 4 or 2 in this case. 41536ea2fe3SNavdeep Parhar.Pp 41636ea2fe3SNavdeep ParharHash filters: These reside in the card's memory instead of its TCAM and are 41736ea2fe3SNavdeep Parharenabled with a special configuration file that is selected with 41836ea2fe3SNavdeep Parhar.Cm hw.cxgbe.config_file="hashfilter" 41936ea2fe3SNavdeep Parharin loader.conf. 42036ea2fe3SNavdeep ParharThere are at least half a million filters available with the sample config 42136ea2fe3SNavdeep Parharshipped with the driver. 42236ea2fe3SNavdeep ParharNote that the hardware selects the index for a hashfilter and this index is 42336ea2fe3SNavdeep Parhardisplayed when the filter is created. 42436ea2fe3SNavdeep ParharHash and TCAM filters can be used together. 42536ea2fe3SNavdeep Parhar.Pp 42654912308SNavdeep Parhar.Ar filter-specification 42736ea2fe3SNavdeep Parharconsists of one or more matches (see Usage in the table above) to try against an 42836ea2fe3SNavdeep Parharincoming frame, an action to perform when all matches succeed, and some 42936ea2fe3SNavdeep Parharadditional operational parameters. 43036ea2fe3SNavdeep ParharHashfilters require an exact value for the 5-tuple (sip, dip, sport, dport, 43136ea2fe3SNavdeep Parharproto) and for any other match-criteria listed in "hashfilter mode". 43236ea2fe3SNavdeep ParharPossible filter actions are 43336ea2fe3SNavdeep Parhar.Cm drop Ns , 43436ea2fe3SNavdeep Parhar.Cm pass Ns , or 43536ea2fe3SNavdeep Parhar.Cm switch Ns . 43636ea2fe3SNavdeep Parhar.Pp 43736ea2fe3SNavdeep Parhar.Bl -tag -width nat_dport -offset indent -compact 43836ea2fe3SNavdeep ParharOperational parameters that can be used with all filters: 43936ea2fe3SNavdeep Parhar.It Cm hitcnts 44036ea2fe3SNavdeep ParharCount filter hits: 0 or 1 (default). 44136ea2fe3SNavdeep Parhar.It Cm prio 44236ea2fe3SNavdeep ParharFilter has priority over active and server regions of TCAM: 0 (default) or 1. 44336ea2fe3SNavdeep Parhar.El 44436ea2fe3SNavdeep Parhar.Pp 44536ea2fe3SNavdeep Parhar.Bl -tag -width nat_dport -offset indent -compact 44636ea2fe3SNavdeep ParharOperational parameters that can be used with filters with 44736ea2fe3SNavdeep Parhar.Cm action pass Ns : 44836ea2fe3SNavdeep Parhar.It Cm queue 44993dcd077SNavdeep ParharContext id of an ingress queue to which to deliver the packet. 45093dcd077SNavdeep ParharThe context id is available in 45193dcd077SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.cntxt_id . 45293dcd077SNavdeep ParharBy default, packets that hit a filter with action pass are delivered based on 45393dcd077SNavdeep Parhartheir RSS hash as usual. 45493dcd077SNavdeep ParharUse this to steer them to a particular queue. 45536ea2fe3SNavdeep Parhar.It Cm rpttid 45636ea2fe3SNavdeep ParharReport the filter tid instead of the RSS hash in the rx descriptor. 45736ea2fe3SNavdeep Parhar0 (default) or 1. 45836ea2fe3SNavdeep Parhar.It Cm tcbhash 45936ea2fe3SNavdeep ParharSelect TCB hash information in rx descriptor. 46036ea2fe3SNavdeep Parhar0 (default) or 1 46136ea2fe3SNavdeep Parhar.El 46236ea2fe3SNavdeep Parhar.Pp 46336ea2fe3SNavdeep Parhar.Bl -tag -width nat_dport -offset indent -compact 46436ea2fe3SNavdeep ParharOperational parameters that can be used with filters with 46536ea2fe3SNavdeep Parhar.Cm action switch Ns : 46636ea2fe3SNavdeep Parhar.It Cm eport 46736ea2fe3SNavdeep ParharEgress port number on which to send the packet matching the filter. 46836ea2fe3SNavdeep Parhar0 to dev.<nexus>.<instance>.nports - 1. 46936ea2fe3SNavdeep Parhar.It Cm dmac 47036ea2fe3SNavdeep ParharReplace packet destination MAC address with the one provided before switching 47136ea2fe3SNavdeep Parharit out of eport. 47236ea2fe3SNavdeep Parhar.It Cm smac 47336ea2fe3SNavdeep ParharReplace packet source MAC address with the one provided before switching it 47436ea2fe3SNavdeep Parharout of eport. 47536ea2fe3SNavdeep Parhar.It Cm swapmac 47636ea2fe3SNavdeep ParharSwap packet source and destination MAC addresses before switching it out of 47736ea2fe3SNavdeep Parhareport. 47836ea2fe3SNavdeep Parhar.It Cm vlan 47936ea2fe3SNavdeep ParharInsert, remove, or rewrite the VLAN tag before switching the packet out of 48036ea2fe3SNavdeep Parhareport. 4811e168376SNavdeep Parhar.Cm none 48236ea2fe3SNavdeep Parharremoves the tag, 4831e168376SNavdeep Parhar.Cm = Ns Ar tag 48436ea2fe3SNavdeep Parharreplaces the existing tag with the one provided, and 4851e168376SNavdeep Parhar.Cm + Ns Ar tag 48636ea2fe3SNavdeep Parharinserts the given tag into the frame. 48736ea2fe3SNavdeep Parhar.It Cm nat 48836ea2fe3SNavdeep ParharSpecify the desired NAT mode. Valid NAT modes values are: 48936ea2fe3SNavdeep Parhar.Bl -tag -width dip-dp-sip -compact 49036ea2fe3SNavdeep Parhar.It Cm dip 49136ea2fe3SNavdeep ParharPerform NAT on destination IP. 49236ea2fe3SNavdeep Parhar.It Cm dip-dp 49336ea2fe3SNavdeep ParharPerform NAT on destination IP, destination port. 49436ea2fe3SNavdeep Parhar.It Cm dip-dp-sip 49536ea2fe3SNavdeep ParharPerform NAT on destination IP, destination port, source IP. 49636ea2fe3SNavdeep Parhar.It Cm dip-dp-sp 49736ea2fe3SNavdeep ParharPerform NAT on destination IP, destination port, source port. 49836ea2fe3SNavdeep Parhar.It Cm sip-sp 49936ea2fe3SNavdeep ParharPerform NAT on source IP, source port. 50036ea2fe3SNavdeep Parhar.It Cm dip-sip-sp 50136ea2fe3SNavdeep ParharPerform NAT on destination IP, source IP, source port. 50236ea2fe3SNavdeep Parhar.It Cm all 50336ea2fe3SNavdeep ParharPerform NAT on all 4-tuple fields. 50436ea2fe3SNavdeep Parhar.El 50536ea2fe3SNavdeep Parhar.It Cm natflag 50636ea2fe3SNavdeep ParharPerform NAT only on segments which do not have TCP FIN or RST set. 50736ea2fe3SNavdeep Parhar.It Cm natseq 50836ea2fe3SNavdeep ParharPerform NAT only if incoming segment's sequence number + payload length is less 50936ea2fe3SNavdeep Parharthan this supplied value. 51036ea2fe3SNavdeep Parhar.It Cm nat_dip 51136ea2fe3SNavdeep ParharPerform NAT using this destination IP. 51236ea2fe3SNavdeep Parhar.It Cm nat_sip 51336ea2fe3SNavdeep ParharPerform NAT using this source IP. 51436ea2fe3SNavdeep Parhar.It Cm nat_dport 51536ea2fe3SNavdeep ParharPerform NAT using this destination port. 51636ea2fe3SNavdeep Parhar.It Cm nat_sport 51736ea2fe3SNavdeep ParharPerform NAT using this source port. 51836ea2fe3SNavdeep ParharPerform NAT only if incoming segment's sequence number + payload length is less 51936ea2fe3SNavdeep Parharthan this supplied value. 52036ea2fe3SNavdeep Parhar.El 52136ea2fe3SNavdeep Parhar.Pp 52236ea2fe3SNavdeep Parhar.Bl -item -compact 52336ea2fe3SNavdeep Parhar.It 52436ea2fe3SNavdeep Parhar.Cm hashfilter Ar idx Cm delete 52536ea2fe3SNavdeep Parhar.It 52636ea2fe3SNavdeep Parhar.Cm filter Ar idx Cm delete 52736ea2fe3SNavdeep Parhar.El 52854912308SNavdeep ParharDelete filter that is at the given index. 52954912308SNavdeep Parhar.It Cm filter Cm list 53054912308SNavdeep ParharList all filters programmed into the hardware. 53154912308SNavdeep Parhar.It Cm i2c Ar port_id devaddr addr Op Ar len 53254912308SNavdeep Parhar.It Cm loadcfg Ar fw-config.txt 53354912308SNavdeep ParharInstall the firmware configuration file contained in 53454912308SNavdeep Parhar.Ar fw-config.txt 53554912308SNavdeep Parharto the card. 53654912308SNavdeep ParharSet hw.cxgbe.config_file="flash" in loader.conf to get 53754912308SNavdeep Parhar.Xr cxgbe 4 53854912308SNavdeep Parharto use the on-flash configuration. 53954912308SNavdeep Parhar.It Cm loadcfg Cm clear 54054912308SNavdeep ParharErase configuration file from the card. 54154912308SNavdeep Parhar.It Cm loadfw Ar fw-image.bin 54254912308SNavdeep ParharInstall the firmware contained in 54354912308SNavdeep Parhar.Ar fw-image.bin 54454912308SNavdeep Parharto the card. 54554912308SNavdeep Parhar.It Cm memdump Ar addr len 54654912308SNavdeep ParharDisplay 54754912308SNavdeep Parhar.Ar len 54854912308SNavdeep Parharbytes of data of the card's memory starting at 54954912308SNavdeep Parhar.Ar addr Ns . 55054912308SNavdeep ParharThe card's memory map is available in 55154912308SNavdeep Parhar.Va dev.t4nex.%d.misc.meminfo Ns . 5521131c927SNavdeep Parhar.It Cm policy Ar cop.txt 5531131c927SNavdeep ParharInstall the Connection Offload Policy (COP) in 5541131c927SNavdeep Parhar.Ar cop.txt Ns . 5551131c927SNavdeep ParharA COP offers fine-grained control over which connections get offloaded and with 5561131c927SNavdeep Parharwhat parameters. 5571131c927SNavdeep ParharSet 5581131c927SNavdeep Parhar.Cm hw.cxgbe.cop_managed_offloading="1" 5591131c927SNavdeep Parharin loader.conf to ensure that t4_tom will not offload any connection before a 5601131c927SNavdeep ParharCOP is installed. 5611131c927SNavdeep ParharNote that t4_tom must be loaded and operational (IFCAP_TOE enabled) as always 5621131c927SNavdeep Parharfor any kind of offload based on the hardware TOE. 5631131c927SNavdeep Parhar.Bl -column -offset indent "COP installed" "cop_managed_offloading" "Behavior" 5641131c927SNavdeep Parhar.It Sy COP installed Ta Sy cop_managed_offloading Ta Sy Behavior 5651131c927SNavdeep Parhar.It NO Ta 0 Ta offload all [Default] 5661131c927SNavdeep Parhar.It NO Ta 1 Ta no offload 5671131c927SNavdeep Parhar.It YES Ta Don't Care Ta Rule based offload 5681131c927SNavdeep Parhar.El 5691131c927SNavdeep Parhar.Pp 5701131c927SNavdeep ParharThe policy file consists of empty lines, comments (lines begining with #) and 5711131c927SNavdeep Parharany number of rules. 5721131c927SNavdeep ParharRules are applied in the order they appear in the file and processing stops at 5731131c927SNavdeep Parharthe first match. 5741131c927SNavdeep ParharThere is an implicit rule that disables offload for connections that do not 5751131c927SNavdeep Parharmatch anything in the policy. 5761131c927SNavdeep Parhar.Pp 5771131c927SNavdeep ParharEach rule consists of a filter part, which determines what connections the 5782911dc6cSGordon Berglingrule applies to, and a settings part, which determines whether matching 5791131c927SNavdeep Parharconnections will be offloaded and, if so, with what settings. 5801131c927SNavdeep ParharThe general form of a rule is 5811131c927SNavdeep Parhar.Bl -ohang -offset indent 5821131c927SNavdeep Parhar.It Cm \&[ Ar socket-type Cm \&] Ar pcap-filter Cm => Ar settings 5831131c927SNavdeep Parhar.Pp 5841131c927SNavdeep Parhar.Ar socket-type 5851131c927SNavdeep Parharis one of the following. 5861131c927SNavdeep Parhar.Bl -tag -width "X" -compact 5871131c927SNavdeep Parhar.It Sy A 5881131c927SNavdeep ParharActive open. 5891131c927SNavdeep ParharConnection is being opened by this host. 5901131c927SNavdeep Parhar.It Sy P 5911131c927SNavdeep ParharPassive open. 5921131c927SNavdeep ParharConnection was requested by a peer. 5931131c927SNavdeep Parhar.It Sy L 5941131c927SNavdeep ParharListen called on a socket. 5951131c927SNavdeep ParharDisabling offload in such a rule will prevent a hardware listener from being started. 5961131c927SNavdeep Parhar.It Sy D 5971131c927SNavdeep ParharDon't care. 5981131c927SNavdeep ParharMatches all of the above. 5991131c927SNavdeep Parhar.El 6001131c927SNavdeep Parhar.Pp 6011131c927SNavdeep Parhar.Ar pcap-filter 6021131c927SNavdeep Parharis an expression that follows the 6031131c927SNavdeep Parhar.Xr pcap-filter 7 6041131c927SNavdeep Parharsyntax, or it is the keyword 6051131c927SNavdeep Parhar.Cm all 6061131c927SNavdeep Parharthat matches everything. 6071131c927SNavdeep Parhar.Pp 6081131c927SNavdeep Parhar.Ar settings 6091131c927SNavdeep Parhardetermine whether connections matching 6101131c927SNavdeep Parhar.Ar socket-type 6111131c927SNavdeep Parharand 6121131c927SNavdeep Parhar.Ar pcap-filter 6131131c927SNavdeep Parharare offloaded and optionally sets some per-connection properties if they are. 6141131c927SNavdeep ParharA combination of the following is allowed. 6151131c927SNavdeep Parhar.Bl -tag -width "timestamp" -compact 6161131c927SNavdeep Parhar.It Cm offload 6171131c927SNavdeep ParharConnection should be offloaded. 6181131c927SNavdeep ParharUse 6191131c927SNavdeep Parhar.Cm !offload 6201131c927SNavdeep Parharor 6211131c927SNavdeep Parhar.Cm not offload 6221131c927SNavdeep Parharto disable offload instead. 6231131c927SNavdeep Parhar.It Cm coalesce 6241131c927SNavdeep ParharEnable rx payload coalescing. 6251131c927SNavdeep ParharNegate to disable. 6261131c927SNavdeep Parhar.It Cm timestamp 6271131c927SNavdeep ParharEnable TCP timestamp option. 6281131c927SNavdeep ParharNegate to disable. 6291131c927SNavdeep Parhar.It Cm sack 6301131c927SNavdeep ParharEnable TCP Selective Acknowledgements (SACK). 6311131c927SNavdeep ParharNegate to disable. 6321131c927SNavdeep Parhar.It Cm nagle 6331131c927SNavdeep ParharEnable Nagle's algorithm. 6341131c927SNavdeep ParharNegate to disable. 6351131c927SNavdeep Parhar.It Cm ecn 6361131c927SNavdeep ParharEnable Explicit Congestion Notification (ECN). 6371131c927SNavdeep ParharNegate to disable. 6381131c927SNavdeep Parhar.It Cm ddp 6391131c927SNavdeep ParharUse Direct Data Placement (zero copy receive) and zero copy transmit on the 6401131c927SNavdeep Parharconnection to service AIO requests on the socket. 6411131c927SNavdeep ParharNegate to disable. 6421131c927SNavdeep Parhar.It Cm tls 6431131c927SNavdeep ParharSet ULP mode to ULP_MODE_TLS. 6441131c927SNavdeep Parhar.It Cm cong Ar algo 6451131c927SNavdeep ParharUse the specified congestion control algorithm. 6461131c927SNavdeep Parhar.Ar algo 6471131c927SNavdeep Parharmust be one of 6481131c927SNavdeep Parhar.Cm reno Ns , Cm tahoe Ns , Cm newreno Ns , or Cm highspeed Ns . 6491131c927SNavdeep Parhar.It Cm class Ar sc 6501131c927SNavdeep ParharBind the connection to the specified tx scheduling class. 6511131c927SNavdeep ParharValid range is 0 to 14 (for T4) and 0 to 15 (T5 onwards). 6521131c927SNavdeep Parhar.It Cm rxq Ar qid 6531131c927SNavdeep ParharUse the specified offload rx queue. 6541131c927SNavdeep Parhar.Ar qid 6551131c927SNavdeep Parharshould be between 0 and nofldrxq for the ifnet. 6561131c927SNavdeep Parhar.It Cm txq Ar qnum 6571131c927SNavdeep ParharUse the specified offload tx queue. 6581131c927SNavdeep Parhar.Ar qid 6591131c927SNavdeep Parharshould be between 0 and nofldtxq for the ifnet. 6601131c927SNavdeep Parhar.It Cm bind Ar qnum 6611131c927SNavdeep ParharShorthand for 6621131c927SNavdeep Parhar.Cm rxq Ar qnum Cm txq Ar qnum Ns . 6631131c927SNavdeep ParharUse only when nofldrxq is the same as nofldtxq. 6641131c927SNavdeep Parhar.It Cm mss Ar val 6651131c927SNavdeep ParharSet the advertised TCP MSS in the SYN for this connection to 6661131c927SNavdeep Parhar.Ar val 6671131c927SNavdeep Parhar(in bytes). 6681131c927SNavdeep ParharThe hardware MTU table must already have an entry that is suitable for the MSS. 6691131c927SNavdeep Parhar.El 6701131c927SNavdeep Parhar.Pp 6711131c927SNavdeep Parhar.It Example of a COP. 6721131c927SNavdeep ParharNote that hardware listener for port 22 will be IPv4 only because the rule 6731131c927SNavdeep Parharbefore it will prevent any IPv6 servers other than the first two. Also note 6741131c927SNavdeep Parharthat outgoing connections to 192.168/16 are the only outgoing connections that 6751131c927SNavdeep Parharwill get offloaded. 6761131c927SNavdeep Parhar.Bd -literal 6771131c927SNavdeep Parhar[L] port 80 => offload 6781131c927SNavdeep Parhar[L] port 443 => offload 6791131c927SNavdeep Parhar[L] ip6 => !offload 6801131c927SNavdeep Parhar[L] port 22 => offload 6811131c927SNavdeep Parhar[P] dst port 80 => offload cong highspeed !sack !ecn 6821131c927SNavdeep Parhar[P] dst port 443 => offload tls 6831131c927SNavdeep Parhar[A] dst net 192.168/16 => offload 6841131c927SNavdeep Parhar[A] all => !offload 6851131c927SNavdeep Parhar[D] port 22 => offload !nagle 6861131c927SNavdeep Parhar.Ed 6871131c927SNavdeep Parhar.El 6881131c927SNavdeep Parhar.It Cm policy clear 6891131c927SNavdeep ParharRemove the Connection Offload Policy (COP) if one is in use. 69054912308SNavdeep Parhar.It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val 69154912308SNavdeep Parhar.It Cm regdump Op Ar register-block ... 69259daefd7SEnji CooperDisplay contents of device registers. 69359daefd7SEnji CooperOne or more 69454912308SNavdeep Parhar.Ar register-block 69554912308SNavdeep Parharcan be specified to limit the registers displayed. 69654912308SNavdeep ParharThe default is to display registers for all blocks. 69754912308SNavdeep ParharRegisters with read side effects are not read during a 69854912308SNavdeep Parhar.Cm regdump 69954912308SNavdeep Parharoperation. 70054912308SNavdeep Parhar.Ar register-block 70154912308SNavdeep Parharcan be 70254912308SNavdeep Parhar.Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw 70354912308SNavdeep Parhar.Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns . 70454912308SNavdeep Parhar.It Cm sched-class config Op Ar param Ar value 70554912308SNavdeep ParharConfigure optional feature capabilities for the TX scheduler. 70654912308SNavdeep Parhar.Bl -ohang -offset indent 70754912308SNavdeep Parhar.It Sy type Ar scheduler-type 70854912308SNavdeep ParharUse packet for the packet scheduler. 70954912308SNavdeep Parhar.It Sy minmax Ar value 71054912308SNavdeep ParharA non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode. 71154912308SNavdeep Parhar.Pp 71254912308SNavdeep ParharNOTE: Many (most) of the parameters and constraints are adapter-specific 71354912308SNavdeep Parhar- for instance the number of channels and classes which are available 71459daefd7SEnji Cooperwhether various modes are implemented, etc. 71559daefd7SEnji CooperConsult the adapter documentation for specific information on any limitations. 71654912308SNavdeep Parhar.El 71754912308SNavdeep Parhar.It Cm sched-class params Op Ar param Ar value 71854912308SNavdeep ParharConfigure parameters for a scheduling class. 71954912308SNavdeep Parhar.Bl -ohang -offset indent 72054912308SNavdeep Parhar.It Sy type Ar scheduler-type 72154912308SNavdeep ParharUse packet for packet scheduler. 72254912308SNavdeep Parhar.It Sy level Ar scheduler-hierarchy-level 72354912308SNavdeep ParharThe "level" within the scheduling hierarchy which is being programed: 72454912308SNavdeep Parhar.Pp 72554912308SNavdeep Parhar.Bl -tag -width "cl-wrr" -compact -offset indent 72654912308SNavdeep Parhar.It Sy cl-rl 72754912308SNavdeep ParharClass Rate Limiting. 72854912308SNavdeep Parhar.Pp 72954912308SNavdeep Parhar.It Sy cl-wrr 73054912308SNavdeep ParharClass Weighted Round Robin. 73154912308SNavdeep Parhar.Pp 7320d7404baSNavdeep Parhar.It Sy ch-rl 73354912308SNavdeep ParharChannel Rate Limiting. 73454912308SNavdeep Parhar.El 73554912308SNavdeep Parhar.It Sy mode Ar scheduler-mode 73654912308SNavdeep ParharThe mode in which the scheduling class is going to operate: 73754912308SNavdeep Parhar.Pp 73854912308SNavdeep Parhar.Bl -tag -width "class" -compact -offset indent 73954912308SNavdeep Parhar.It Sy class 74054912308SNavdeep ParharAll of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints. 74154912308SNavdeep Parhar.Pp 74254912308SNavdeep Parhar.It Sy flow 74354912308SNavdeep ParharEach of the "flows" bound to the scheduling class will be held to the scheduling constraints. 74454912308SNavdeep Parhar.El 74554912308SNavdeep Parhar.Pp 74654912308SNavdeep ParharE.g. if the scheduling class has a TX bandwidth of 10Mb/s, in 74754912308SNavdeep Parhar.Cm class 74854912308SNavdeep Parharmode, all of the "flows" bound to the class would be limited to an 74954912308SNavdeep Parharaggregate bandwidth of 10Mb/s; but in 75054912308SNavdeep Parhar.Cm flow 75154912308SNavdeep Parharmode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s. 75254912308SNavdeep Parhar.It Sy rate-unit Ar scheduler-rate-unit 75354912308SNavdeep ParharThe units of the scheduler rate constraints: 75454912308SNavdeep Parhar.Pp 75554912308SNavdeep Parhar.Bl -tag -width "bits" -compact -offset indent 75654912308SNavdeep Parhar.It Sy bits 75754912308SNavdeep Parharbit rate in Kb/s. 75854912308SNavdeep Parhar.Pp 75954912308SNavdeep Parhar.It Sy pkts 76054912308SNavdeep Parharpackets/s. 76154912308SNavdeep Parhar.El 76254912308SNavdeep Parhar.It Sy rate-mode Ar scheduler-rate-mode 76354912308SNavdeep ParharThe mode of the scheduler rate constraints: 76454912308SNavdeep Parhar.Pp 76554912308SNavdeep Parhar.Bl -tag -width "relative" -compact -offset indent 76654912308SNavdeep Parhar.It Sy relative 76754912308SNavdeep Parharpercent of port rate. 76854912308SNavdeep Parhar.Pp 76954912308SNavdeep Parhar.It Sy absolute 77054912308SNavdeep ParharKb/s. 77154912308SNavdeep Parhar.El 77254912308SNavdeep Parhar.It Sy channel Ar scheduler-channel-index 77354912308SNavdeep ParharThe scheduling channel to which the scheduling class will be bound. 77454912308SNavdeep Parhar.It Sy class Ar scheduler-class-index 77554912308SNavdeep ParharThe scheduling class being programmed. 77654912308SNavdeep Parhar.It Sy min-rate Ar minimum-rate 77754912308SNavdeep ParharThe minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access. 77854912308SNavdeep Parhar.It Sy max-rate Ar maximum-rate 77954912308SNavdeep ParharThe maximum rate for a rate-limiting scheduling class hierarchy. 78054912308SNavdeep Parhar.It Sy weight Ar round-robin-weight 78154912308SNavdeep ParharThe weight to be used for a weighted-round-robin scheduling hierarchy. 78254912308SNavdeep Parhar.It Sy pkt-size Ar average-packet-size 78354912308SNavdeep ParharThe average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy. 78454912308SNavdeep Parhar.Pp 78554912308SNavdeep ParharNOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available, 78659daefd7SEnji Cooperwhether various modes are implemented, etc. 78759daefd7SEnji CooperConsult the adapter documentation for specific information on any limitations. 78854912308SNavdeep Parhar.El 78954912308SNavdeep Parhar.It Cm sched-queue Ar port queue class 79054912308SNavdeep ParharBind the indicated port's NIC TX 79154912308SNavdeep Parhar.Ar queue 79254912308SNavdeep Parharto the specified TX Scheduler 79354912308SNavdeep Parhar.Ar class. 79454912308SNavdeep ParharIf the TX 79554912308SNavdeep Parhar.Ar queue 79654912308SNavdeep Parharis 79754912308SNavdeep Parhar.Cm all, * 79854912308SNavdeep Parharor any negative value, the binding will apply to 79954912308SNavdeep Parharall of the TX queues associated with the 80054912308SNavdeep Parhar.Ar interface. 80154912308SNavdeep ParharIf the class is 80254912308SNavdeep Parhar.Cm unbind, clear 80354912308SNavdeep Parharor any negative value, the TX queue(s) will be unbound from 80454912308SNavdeep Parharany current TX Scheduler Class binding. 80554912308SNavdeep Parhar.It Cm stdio 80654912308SNavdeep ParharSwitch to interactive mode. 80754912308SNavdeep Parhar.It Cm tcb Ar tid 80854912308SNavdeep ParharDisplay contents of the hardware TCB (TCP Control Block) for the 80954912308SNavdeep Parharconnection identfied by 81054912308SNavdeep Parhar.Ar tid Ns . 81154912308SNavdeep Parhar.El 81254912308SNavdeep Parhar.Sh FILES 81354912308SNavdeep Parhar/sys/dev/cxgbe/t4_ioctl.h 81454912308SNavdeep Parhar.Sh AUTHORS 81554912308SNavdeep ParharThis manual page was written by 81654912308SNavdeep Parhar.An Navdeep Parhar Aq np@FreeBSD.org . 817