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