xref: /freebsd/usr.sbin/cxgbetool/cxgbetool.8 (revision 36ea2fe3bfd4dc0d90ebbc77e53e03b1edbaff08)
1*36ea2fe3SNavdeep 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*36ea2fe3SNavdeep Parhar.Dd May 14, 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
51*36ea2fe3SNavdeep Parhar.Nm Ar nexus Cm hashfilter mode
5254912308SNavdeep Parhar.It
53*36ea2fe3SNavdeep Parhar.Nm Ar nexus Cm hashfilter Ar filter-specification
54*36ea2fe3SNavdeep Parhar.It
55*36ea2fe3SNavdeep Parhar.Nm Ar nexus Cm hashfilter Ar idx Cm delete
56*36ea2fe3SNavdeep Parhar.It
57*36ea2fe3SNavdeep Parhar.Nm Ar nexus Cm hashfilter list
58*36ea2fe3SNavdeep Parhar.It
59*36ea2fe3SNavdeep Parhar.Nm Ar nexus Cm filter mode
60*36ea2fe3SNavdeep Parhar.It
61*36ea2fe3SNavdeep Parhar.Nm Ar nexus Cm filter Ar idx Ar filter-specification
62*36ea2fe3SNavdeep Parhar.It
63*36ea2fe3SNavdeep Parhar.Nm Ar nexus Cm filter Ar idx Cm delete
6454912308SNavdeep Parhar.It
6554912308SNavdeep Parhar.Nm Ar nexus Cm filter list
6654912308SNavdeep Parhar.It
6754912308SNavdeep Parhar.Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len
6854912308SNavdeep Parhar.It
6954912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg Ar fw-config.txt
7054912308SNavdeep Parhar.It
7154912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg clear
7254912308SNavdeep Parhar.It
7354912308SNavdeep Parhar.Nm Ar nexus Cm loadfw Ar fw-image.bin
7454912308SNavdeep Parhar.It
7554912308SNavdeep Parhar.Nm Ar nexus Cm memdump Ar addr len
7654912308SNavdeep Parhar.It
771131c927SNavdeep Parhar.Nm Ar nexus Cm policy Ar cop.txt
781131c927SNavdeep Parhar.It
791131c927SNavdeep Parhar.Nm Ar nexus Cm policy clear
801131c927SNavdeep Parhar.It
8154912308SNavdeep Parhar.Nm Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
8254912308SNavdeep Parhar.It
8354912308SNavdeep Parhar.Nm Ar nexus Cm regdump Op Ar register-block ...
8454912308SNavdeep Parhar.It
8554912308SNavdeep Parhar.Nm Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value
8654912308SNavdeep Parhar.It
8754912308SNavdeep Parhar.Nm Ar nexus Cm sched-queue Ar port Ar queue Ar class
8854912308SNavdeep Parhar.It
8954912308SNavdeep Parhar.Nm Ar nexus Cm stdio
9054912308SNavdeep Parhar.It
9154912308SNavdeep Parhar.Nm Ar nexus Cm tcb Ar tid
9254912308SNavdeep Parhar.El
9354912308SNavdeep Parhar.Sh DESCRIPTION
9454912308SNavdeep Parhar.Nm
9554912308SNavdeep Parharprovides command-line access to features and debug facilities exported by
9654912308SNavdeep Parhar.Xr cxgbe 4
9754912308SNavdeep Parharvia private ioctls.
9854912308SNavdeep ParharThe target nexus device,
9954912308SNavdeep Parhar.Va t4nex%d
10054912308SNavdeep Parhar, is always the first argument.
10154912308SNavdeep Parhar(The parent nexus for an Ethernet port
10254912308SNavdeep Parhar.Va cxgbe%d
10354912308SNavdeep Parharis listed in
10454912308SNavdeep Parhar.Va dev.cxgbe.%d.%parent
10554912308SNavdeep Parharin the
10654912308SNavdeep Parhar.Xr sysctl 8
10754912308SNavdeep ParharMIB).
10854912308SNavdeep ParharThe rest consists of a command and any parameters required by that command.
10954912308SNavdeep Parhar.Ss Commands
11054912308SNavdeep Parhar.Bl -ohang
11154912308SNavdeep Parhar.It Cm clearstats Ar port_id
11254912308SNavdeep ParharClear all transmit, receive, and error statistics of all queues associated
11354912308SNavdeep Parharwith a port.
11454912308SNavdeep ParharThe total number of ports attached to a nexus is listed in
11554912308SNavdeep Parhar.Va dev.t4nex.%d.nports
11654912308SNavdeep Parharand the 0 based
11754912308SNavdeep Parhar.Ar port_id
11854912308SNavdeep Parharidentifies a port within this range.
11954912308SNavdeep Parhar.Pp
12054912308SNavdeep Parhar.Bl -item -compact
12154912308SNavdeep Parhar.It
12254912308SNavdeep Parhar.Cm context ingress Ar ingress_cntxt_id
12354912308SNavdeep Parhar.It
12454912308SNavdeep Parhar.Cm context cong Ar ingress_cntxt_id
12554912308SNavdeep Parhar.It
12654912308SNavdeep Parhar.Cm context egress Ar egress_cntxt_id
12754912308SNavdeep Parhar.It
12854912308SNavdeep Parhar.Cm context fl Ar flm_cntxt_id
12954912308SNavdeep Parhar.El
13054912308SNavdeep ParharDisplay hardware context for an ingress queue, congestion manager, egress
13154912308SNavdeep Parharqueue, or freelist manager.
13254912308SNavdeep Parhar.Bl -tag -width ingress_cntxt_id -compact
13354912308SNavdeep Parhar.It Ar ingress_cntxt_id
13454912308SNavdeep Parharcontext id of an ingress queue -- the value listed in one of
13554912308SNavdeep Parhar.Va dev.t4nex.%d.fwq.cntxt_id Ns ,
13654912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns ,
13754912308SNavdeep Parharor
13854912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns .
13954912308SNavdeep Parhar.It Ar egress_cntxt_id
14054912308SNavdeep Parharcontext id of an egress queue -- the value listed in one of
14154912308SNavdeep Parhar.Va dev.t4nex.%d.mgmtq.cntxt_id Ns ,
14254912308SNavdeep Parhar.Va dev.cxgbe.%d.txq.%d.cntxt_id Ns ,
14354912308SNavdeep Parhar.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns ,
14454912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns ,
14554912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns ,
14654912308SNavdeep Parharor
14754912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns .
14854912308SNavdeep ParharNote that freelists are egress queues too.
14954912308SNavdeep Parhar.It Ar flm_cntxt_id
15059daefd7SEnji Coopercontext id of a freelist manager.
15159daefd7SEnji CooperThe FLM context id is displayed in the
15254912308SNavdeep Parharegress context dump of a freelist as FLMcontextID.
15354912308SNavdeep Parhar.El
154*36ea2fe3SNavdeep Parhar.Pp
155*36ea2fe3SNavdeep Parhar.Bl -item -compact
156*36ea2fe3SNavdeep Parhar.It
157*36ea2fe3SNavdeep Parhar.Cm hashfilter mode
158*36ea2fe3SNavdeep Parhar.It
159*36ea2fe3SNavdeep Parhar.Cm filter mode
160*36ea2fe3SNavdeep Parhar.El
161*36ea2fe3SNavdeep ParharDisplay a list of match-criteria available for use in filter rules.
162*36ea2fe3SNavdeep ParharA full list of match-criteria known to the chip is in the table below but not
163*36ea2fe3SNavdeep Parharall can be used together and the firmware sets up the available parameters based
164*36ea2fe3SNavdeep Parharon "filterMode" in the configuration file.
165*36ea2fe3SNavdeep ParharEvery filter must conform to the filter mode -- multiple match criteria per
166*36ea2fe3SNavdeep Parharfilter are allowed but only from among those in the current setting of the
167*36ea2fe3SNavdeep Parharfilter mode.
168*36ea2fe3SNavdeep ParharThe filter mode for hash filters is a subset of that for normal TCAM filters and
169*36ea2fe3SNavdeep Parhardepends on the "filterMask" setting in the firmware configuration file.
170*36ea2fe3SNavdeep ParharHash filters do not support masked matches and an exact value for every
171*36ea2fe3SNavdeep Parharparameter in the output of "hashfilter mode" (except ipv4/ipv6) must be provided
172*36ea2fe3SNavdeep Parharwhen creating a hash filter.
17354912308SNavdeep Parhar.Pp
17454912308SNavdeep Parhar(Note that
17554912308SNavdeep Parhar.Ar mask
17654912308SNavdeep Parhardefaults to all 1s when not provided explicitly.
177*36ea2fe3SNavdeep ParharHash filters do not support masked matches.
17854912308SNavdeep ParharAlso note that many of the items being matched are discrete numeric
17954912308SNavdeep Parharvalues rather than bit fields and should be masked with caution.)
18054912308SNavdeep Parhar.TS
18154912308SNavdeep Parharcenter expand;
182*36ea2fe3SNavdeep Parharcb cb cbw(40m)
183*36ea2fe3SNavdeep Parharcb l l.
184*36ea2fe3SNavdeep ParharCriteria	Usage	Matches if ...
18554912308SNavdeep Parhar_
186*36ea2fe3SNavdeep Parharipv4	T{
18754912308SNavdeep Parhar.Cm type ipv4
18854912308SNavdeep ParharT}	T{
18954912308SNavdeep Parharincoming packet is an IPv4 datagram.
19054912308SNavdeep ParharT}
19154912308SNavdeep Parhar_
192*36ea2fe3SNavdeep Parharipv6	T{
19354912308SNavdeep Parhar.Cm type ipv6
19454912308SNavdeep ParharT}	T{
19554912308SNavdeep Parharincoming packet is an IPv6 datagram.
19654912308SNavdeep ParharT}
19754912308SNavdeep Parhar_
198*36ea2fe3SNavdeep Parharsip	T{
19954912308SNavdeep Parhar.Cm sip Ar addr Ns Op / Ns Ar mask
20054912308SNavdeep ParharT}	T{
20154912308SNavdeep Parharbitwise and of the source address in an incoming IP datagram with
20254912308SNavdeep Parhar.Ar mask
20354912308SNavdeep Parharequals
20454912308SNavdeep Parhar.Ar addr Ns .
20554912308SNavdeep Parhar.Ar addr
20654912308SNavdeep Parharcan be an IPv4 or IPv6 address.
20754912308SNavdeep ParharT}
20854912308SNavdeep Parhar_
209*36ea2fe3SNavdeep Parhardip	T{
21054912308SNavdeep Parhar.Cm dip Ar addr Ns Op / Ns Ar mask
21154912308SNavdeep ParharT}	T{
21254912308SNavdeep Parharbitwise and of the destination address in an incoming IP datagram with
21354912308SNavdeep Parhar.Ar mask
21454912308SNavdeep Parharequals
21554912308SNavdeep Parhar.Ar addr Ns .
21654912308SNavdeep Parhar.Ar addr
21754912308SNavdeep Parharcan be an IPv4 or IPv6 address.
21854912308SNavdeep ParharT}
21954912308SNavdeep Parhar_
220*36ea2fe3SNavdeep Parharsport	T{
22154912308SNavdeep Parhar.Cm sport Ar port Ns Op : Ns Ar mask
22254912308SNavdeep ParharT}	T{
22354912308SNavdeep Parharbitwise and of the source port in an incoming TCP or UDP datagram with
22454912308SNavdeep Parhar.Ar mask
22554912308SNavdeep Parharequals
22654912308SNavdeep Parhar.Ar port Ns .
22754912308SNavdeep ParharT}
22854912308SNavdeep Parhar_
229*36ea2fe3SNavdeep Parhardport	T{
23054912308SNavdeep Parhar.Cm dport Ar port Ns Op : Ns Ar mask
23154912308SNavdeep ParharT}	T{
23254912308SNavdeep Parharbitwise and of the destination port in an incoming TCP or UDP datagram with
23354912308SNavdeep Parhar.Ar mask
23454912308SNavdeep Parharequals
23554912308SNavdeep Parhar.Ar port Ns .
23654912308SNavdeep ParharT}
23754912308SNavdeep Parhar_
238*36ea2fe3SNavdeep Parharfcoe	T{
23954912308SNavdeep Parhar.Cm fcoe Brq 0 | 1
24054912308SNavdeep ParharT}	T{
24154912308SNavdeep Parharincoming frame is Fibre Channel over Ethernet(1) or not(0).
24254912308SNavdeep ParharT}
24354912308SNavdeep Parhar_
244*36ea2fe3SNavdeep Parhariport	T{
24554912308SNavdeep Parhar.Cm iport Ar val Ns Op : Ns Ar mask
24654912308SNavdeep ParharT}	T{
24754912308SNavdeep Parharbitwise and of the ingress port with
24854912308SNavdeep Parhar.Ar mask
24954912308SNavdeep Parharequals
25054912308SNavdeep Parhar.Ar val Ns .
25154912308SNavdeep ParharThe ingress port is a 3 bit number that identifies the port on which a
25254912308SNavdeep Parharframe arrived.
25354912308SNavdeep ParharPhysical ports are numbered 0-3 and 4-7 are internal loopback paths
25454912308SNavdeep Parharwithin the chip.
25554912308SNavdeep ParharNote that ingress port is not a bit field so it is not always possible
25654912308SNavdeep Parharto match an arbitrary subset of ingress ports with a single filter rule.
25754912308SNavdeep ParharT}
25854912308SNavdeep Parhar_
259*36ea2fe3SNavdeep Parharovlan	T{
26054912308SNavdeep Parhar.Cm ovlan Ar tag Ns Op : Ns Ar mask
26154912308SNavdeep ParharT}	T{
26254912308SNavdeep Parharbitwise and of the 16-bit outer VLAN tag of an incoming frame with
26354912308SNavdeep Parhar.Ar mask
26454912308SNavdeep Parharequals
26554912308SNavdeep Parhar.Ar tag Ns .
26654912308SNavdeep ParharT}
26754912308SNavdeep Parhar_
268*36ea2fe3SNavdeep Parharvlan	T{
26954912308SNavdeep Parhar.Cm vlan Ar tag Ns Op : Ns Ar mask
27054912308SNavdeep ParharT}	T{
27154912308SNavdeep Parharbitwise and of the 16-bit VLAN tag of an incoming QinQ frame with
27254912308SNavdeep Parhar.Ar mask
27354912308SNavdeep Parharequals
27454912308SNavdeep Parhar.Ar tag Ns .
27554912308SNavdeep ParharThe inner VLAN tag is used if the incoming frame is QinQ.
27654912308SNavdeep ParharT}
27754912308SNavdeep Parhar_
278*36ea2fe3SNavdeep Parhartos	T{
27954912308SNavdeep Parhar.Cm tos Ar val Ns Op : Ns Ar mask
28054912308SNavdeep ParharT}	T{
28154912308SNavdeep Parharbitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an
28254912308SNavdeep Parharincoming packet with
28354912308SNavdeep Parhar.Ar mask
28454912308SNavdeep Parharequals
28554912308SNavdeep Parhar.Ar val Ns .
28654912308SNavdeep ParharT}
28754912308SNavdeep Parhar_
288*36ea2fe3SNavdeep Parharproto	T{
28954912308SNavdeep Parhar.Cm proto Ar ipproto Ns Op : Ns Ar mask
29054912308SNavdeep ParharT}	T{
29154912308SNavdeep Parharbitwise and of the 8-bit IP protocol in an incoming packet with
29254912308SNavdeep Parhar.Ar mask
29354912308SNavdeep Parharequals
29454912308SNavdeep Parhar.Ar ipproto Ns .
29554912308SNavdeep ParharT}
29654912308SNavdeep Parhar_
297*36ea2fe3SNavdeep Parharethtype	T{
29854912308SNavdeep Parhar.Cm ethtype Ar type Ns Op : Ns Ar mask
29954912308SNavdeep ParharT}	T{
30054912308SNavdeep Parharbitwise and of the 16-bit Ethernet type field of an incoming frame with
30154912308SNavdeep Parhar.Ar mask
30254912308SNavdeep Parharequals
30354912308SNavdeep Parhar.Ar type Ns .
30454912308SNavdeep ParharT}
30554912308SNavdeep Parhar_
306*36ea2fe3SNavdeep Parharmacidx	T{
30754912308SNavdeep Parhar.Cm macidx Ar idx Ns Op : Ns Ar mask
30854912308SNavdeep ParharT}	T{
30954912308SNavdeep Parharbitwise and of the MAC Address Match Index of an incoming frame with
31054912308SNavdeep Parhar.Ar mask
31154912308SNavdeep Parharequals
31254912308SNavdeep Parhar.Ar idx Ns .
31354912308SNavdeep ParharThe MAC Address Match Index refers to an entry in the MPS TCAM or in the
31454912308SNavdeep ParharMPS hash.  See
31554912308SNavdeep Parhar.Cm matchtype
31654912308SNavdeep Parharfor more information.
31754912308SNavdeep ParharT}
31854912308SNavdeep Parhar_
319*36ea2fe3SNavdeep Parharmatchtype	T{
32054912308SNavdeep Parhar.Cm matchtype Ar type Ns Op : Ns Ar mask
32154912308SNavdeep ParharT}	T{
32254912308SNavdeep Parharbitwise and of the Match Type of an incoming frame with
32354912308SNavdeep Parhar.Ar mask
32454912308SNavdeep Parharequals
32554912308SNavdeep Parhar.Ar idx Ns .
32654912308SNavdeep ParharMatch Type is one of the following:
32754912308SNavdeep Parhar.Bl -tag -width "n" -compact
32854912308SNavdeep Parhar.It 0
32954912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that is
33054912308SNavdeep Parharprogrammed in the MPS TCAM.
33154912308SNavdeep Parhar.Cm macidx
33254912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match
33354912308SNavdeep Parharin the TCAM.
33454912308SNavdeep Parhar.It 1
33554912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that "hit" a
33654912308SNavdeep Parharhash entry in the MPS hash table.
33754912308SNavdeep Parhar.Cm macidx
33854912308SNavdeep Parharcan be used to match the index of the entry in the MPS hash table.
33954912308SNavdeep Parhar.It 2
34054912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that is
34154912308SNavdeep Parharprogrammed in the MPS TCAM.
34254912308SNavdeep Parhar.Cm macidx
34354912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match
34454912308SNavdeep Parharin the TCAM.
34554912308SNavdeep Parhar.It 3
34654912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that "hit"
34754912308SNavdeep Parharan entry in the MPS hash table.
34854912308SNavdeep Parhar.It 4
34954912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode
35054912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address, and
35154912308SNavdeep Parhardoes not match in the MPS TCAM or the MPS hash either.  (The frame would
35254912308SNavdeep Parharhave been discarded if the interface wasn't in promiscuous mode.)
35354912308SNavdeep Parhar.It 5
35454912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode
35554912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address; it
35654912308SNavdeep Parharwasn't looked up in the MPS TCAM or the MPS hash because the chip is
35754912308SNavdeep Parharconfigured to give precedence to promiscuous mode classification.
35854912308SNavdeep Parhar.It 6
35954912308SNavdeep Parhardestination MAC in incoming frame is a broadcast address.
36054912308SNavdeep Parhar.It 7
36154912308SNavdeep ParharNot documented.  Do not use.
36254912308SNavdeep Parhar.El
36354912308SNavdeep ParharT}
36454912308SNavdeep Parhar_
365*36ea2fe3SNavdeep Parharfrag	T{
36654912308SNavdeep Parhar.Cm frag Brq 0 | 1
36754912308SNavdeep ParharT}	T{
36854912308SNavdeep Parharincoming frame is part of a fragmented IP datagram(1) or not(0).
36954912308SNavdeep ParharT}
37054912308SNavdeep Parhar.TE
371*36ea2fe3SNavdeep Parhar.Pp
372*36ea2fe3SNavdeep Parhar.Bl -item -compact
373*36ea2fe3SNavdeep Parhar.It
374*36ea2fe3SNavdeep Parhar.Cm hashfilter Ar filter-specification
375*36ea2fe3SNavdeep Parhar.It
376*36ea2fe3SNavdeep Parhar.Cm filter Ar idx Ar filter-specification
377*36ea2fe3SNavdeep Parhar.El
378*36ea2fe3SNavdeep ParharProgram a filter.
379*36ea2fe3SNavdeep Parhar.Pp
380*36ea2fe3SNavdeep ParharTCAM filters: The number of available filters is in
381*36ea2fe3SNavdeep Parhardev.<nexus>.<instance>.nfilters.
382*36ea2fe3SNavdeep Parhar.Ar idx
383*36ea2fe3SNavdeep Parharmust be an unused index between 0 and nfilters - 1.
384*36ea2fe3SNavdeep ParharIPv6 filters consume 4 consecutive entries on T4/T5 and and 2 on T6 and
385*36ea2fe3SNavdeep Parhar.Ar idx
386*36ea2fe3SNavdeep Parharmust be aligned to 4 or 2 in this case.
387*36ea2fe3SNavdeep Parhar.Pp
388*36ea2fe3SNavdeep ParharHash filters:  These reside in the card's memory instead of its TCAM and are
389*36ea2fe3SNavdeep Parharenabled with a special configuration file that is selected with
390*36ea2fe3SNavdeep Parhar.Cm hw.cxgbe.config_file="hashfilter"
391*36ea2fe3SNavdeep Parharin loader.conf.
392*36ea2fe3SNavdeep ParharThere are at least half a million filters available with the sample config
393*36ea2fe3SNavdeep Parharshipped with the driver.
394*36ea2fe3SNavdeep ParharNote that the hardware selects the index for a hashfilter and this index is
395*36ea2fe3SNavdeep Parhardisplayed when the filter is created.
396*36ea2fe3SNavdeep ParharHash and TCAM filters can be used together.
397*36ea2fe3SNavdeep Parhar.Pp
39854912308SNavdeep Parhar.Ar filter-specification
399*36ea2fe3SNavdeep Parharconsists of one or more matches (see Usage in the table above) to try against an
400*36ea2fe3SNavdeep Parharincoming frame, an action to perform when all matches succeed, and some
401*36ea2fe3SNavdeep Parharadditional operational parameters.
402*36ea2fe3SNavdeep ParharHashfilters require an exact value for the 5-tuple (sip, dip, sport, dport,
403*36ea2fe3SNavdeep Parharproto) and for any other match-criteria listed in "hashfilter mode".
404*36ea2fe3SNavdeep ParharPossible filter actions are
405*36ea2fe3SNavdeep Parhar.Cm drop Ns ,
406*36ea2fe3SNavdeep Parhar.Cm pass Ns , or
407*36ea2fe3SNavdeep Parhar.Cm switch Ns .
408*36ea2fe3SNavdeep Parhar.Pp
409*36ea2fe3SNavdeep Parhar.Bl -tag -width nat_dport -offset indent -compact
410*36ea2fe3SNavdeep ParharOperational parameters that can be used with all filters:
411*36ea2fe3SNavdeep Parhar.It Cm hitcnts
412*36ea2fe3SNavdeep ParharCount filter hits: 0 or 1 (default).
413*36ea2fe3SNavdeep Parhar.It Cm prio
414*36ea2fe3SNavdeep ParharFilter has priority over active and server regions of TCAM: 0 (default) or 1.
415*36ea2fe3SNavdeep Parhar.El
416*36ea2fe3SNavdeep Parhar.Pp
417*36ea2fe3SNavdeep Parhar.Bl -tag -width nat_dport -offset indent -compact
418*36ea2fe3SNavdeep ParharOperational parameters that can be used with filters with
419*36ea2fe3SNavdeep Parhar.Cm action pass Ns :
420*36ea2fe3SNavdeep Parhar.It Cm queue
421*36ea2fe3SNavdeep ParharRx queue index to which to deliver the packet.  By default, packets that hit a
422*36ea2fe3SNavdeep Parharfilter with action pass are delivered based on their RSS hash as usual.  Use
423*36ea2fe3SNavdeep Parharthis to steer them to a particular queue.
424*36ea2fe3SNavdeep Parhar.It Cm rpttid
425*36ea2fe3SNavdeep ParharReport the filter tid instead of the RSS hash in the rx descriptor.
426*36ea2fe3SNavdeep Parhar0 (default) or 1.
427*36ea2fe3SNavdeep Parhar.It Cm tcbhash
428*36ea2fe3SNavdeep ParharSelect TCB hash information in rx descriptor.
429*36ea2fe3SNavdeep Parhar0 (default) or 1
430*36ea2fe3SNavdeep Parhar.El
431*36ea2fe3SNavdeep Parhar.Pp
432*36ea2fe3SNavdeep Parhar.Bl -tag -width nat_dport -offset indent -compact
433*36ea2fe3SNavdeep ParharOperational parameters that can be used with filters with
434*36ea2fe3SNavdeep Parhar.Cm action switch Ns :
435*36ea2fe3SNavdeep Parhar.It Cm eport
436*36ea2fe3SNavdeep ParharEgress port number on which to send the packet matching the filter.
437*36ea2fe3SNavdeep Parhar0 to dev.<nexus>.<instance>.nports - 1.
438*36ea2fe3SNavdeep Parhar.It Cm dmac
439*36ea2fe3SNavdeep ParharReplace packet destination MAC address with the one provided before switching
440*36ea2fe3SNavdeep Parharit out of eport.
441*36ea2fe3SNavdeep Parhar.It Cm smac
442*36ea2fe3SNavdeep ParharReplace packet source MAC address with the one provided before switching it
443*36ea2fe3SNavdeep Parharout of eport.
444*36ea2fe3SNavdeep Parhar.It Cm swapmac
445*36ea2fe3SNavdeep ParharSwap packet source and destination MAC addresses before switching it out of
446*36ea2fe3SNavdeep Parhareport.
447*36ea2fe3SNavdeep Parhar.It Cm vlan
448*36ea2fe3SNavdeep ParharInsert, remove, or rewrite the VLAN tag before switching the packet out of
449*36ea2fe3SNavdeep Parhareport.
450*36ea2fe3SNavdeep Parhar.Cm vlan=none
451*36ea2fe3SNavdeep Parharremoves the tag,
452*36ea2fe3SNavdeep Parhar.Cm vlan= Ns Ar tag
453*36ea2fe3SNavdeep Parharreplaces the existing tag with the one provided, and
454*36ea2fe3SNavdeep Parhar.Cm vlan=+ Ns Ar tag
455*36ea2fe3SNavdeep Parharinserts the given tag into the frame.
456*36ea2fe3SNavdeep Parhar.It Cm nat
457*36ea2fe3SNavdeep ParharSpecify the desired NAT mode. Valid NAT modes values are:
458*36ea2fe3SNavdeep Parhar.Bl -tag -width dip-dp-sip -compact
459*36ea2fe3SNavdeep Parhar.It Cm dip
460*36ea2fe3SNavdeep ParharPerform NAT on destination IP.
461*36ea2fe3SNavdeep Parhar.It Cm dip-dp
462*36ea2fe3SNavdeep ParharPerform NAT on destination IP, destination port.
463*36ea2fe3SNavdeep Parhar.It Cm dip-dp-sip
464*36ea2fe3SNavdeep ParharPerform NAT on destination IP, destination port, source IP.
465*36ea2fe3SNavdeep Parhar.It Cm dip-dp-sp
466*36ea2fe3SNavdeep ParharPerform NAT on destination IP, destination port, source port.
467*36ea2fe3SNavdeep Parhar.It Cm sip-sp
468*36ea2fe3SNavdeep ParharPerform NAT on source IP, source port.
469*36ea2fe3SNavdeep Parhar.It Cm dip-sip-sp
470*36ea2fe3SNavdeep ParharPerform NAT on destination IP, source IP, source port.
471*36ea2fe3SNavdeep Parhar.It Cm all
472*36ea2fe3SNavdeep ParharPerform NAT on all 4-tuple fields.
473*36ea2fe3SNavdeep Parhar.El
474*36ea2fe3SNavdeep Parhar.It Cm natflag
475*36ea2fe3SNavdeep ParharPerform NAT only on segments which do not have TCP FIN or RST set.
476*36ea2fe3SNavdeep Parhar.It Cm natseq
477*36ea2fe3SNavdeep ParharPerform NAT only if incoming segment's sequence number + payload length is less
478*36ea2fe3SNavdeep Parharthan this supplied value.
479*36ea2fe3SNavdeep Parhar.It Cm nat_dip
480*36ea2fe3SNavdeep ParharPerform NAT using this destination IP.
481*36ea2fe3SNavdeep Parhar.It Cm nat_sip
482*36ea2fe3SNavdeep ParharPerform NAT using this source IP.
483*36ea2fe3SNavdeep Parhar.It Cm nat_dport
484*36ea2fe3SNavdeep ParharPerform NAT using this destination port.
485*36ea2fe3SNavdeep Parhar.It Cm nat_sport
486*36ea2fe3SNavdeep ParharPerform NAT using this source port.
487*36ea2fe3SNavdeep ParharPerform NAT only if incoming segment's sequence number + payload length is less
488*36ea2fe3SNavdeep Parharthan this supplied value.
489*36ea2fe3SNavdeep Parhar.El
490*36ea2fe3SNavdeep Parhar.Pp
491*36ea2fe3SNavdeep Parhar.Bl -item -compact
492*36ea2fe3SNavdeep Parhar.It
493*36ea2fe3SNavdeep Parhar.Cm hashfilter Ar idx Cm delete
494*36ea2fe3SNavdeep Parhar.It
495*36ea2fe3SNavdeep Parhar.Cm filter Ar idx Cm delete
496*36ea2fe3SNavdeep Parhar.El
49754912308SNavdeep ParharDelete filter that is at the given index.
49854912308SNavdeep Parhar.It Cm filter Cm list
49954912308SNavdeep ParharList all filters programmed into the hardware.
50054912308SNavdeep Parhar.It Cm i2c Ar port_id devaddr addr Op Ar len
50154912308SNavdeep Parhar.It Cm loadcfg Ar fw-config.txt
50254912308SNavdeep ParharInstall the firmware configuration file contained in
50354912308SNavdeep Parhar.Ar fw-config.txt
50454912308SNavdeep Parharto the card.
50554912308SNavdeep ParharSet hw.cxgbe.config_file="flash" in loader.conf to get
50654912308SNavdeep Parhar.Xr cxgbe 4
50754912308SNavdeep Parharto use the on-flash configuration.
50854912308SNavdeep Parhar.It Cm loadcfg Cm clear
50954912308SNavdeep ParharErase configuration file from the card.
51054912308SNavdeep Parhar.It Cm loadfw Ar fw-image.bin
51154912308SNavdeep ParharInstall the firmware contained in
51254912308SNavdeep Parhar.Ar fw-image.bin
51354912308SNavdeep Parharto the card.
51454912308SNavdeep Parhar.It Cm memdump Ar addr len
51554912308SNavdeep ParharDisplay
51654912308SNavdeep Parhar.Ar len
51754912308SNavdeep Parharbytes of data of the card's memory starting at
51854912308SNavdeep Parhar.Ar addr Ns .
51954912308SNavdeep ParharThe card's memory map is available in
52054912308SNavdeep Parhar.Va dev.t4nex.%d.misc.meminfo Ns .
5211131c927SNavdeep Parhar.It Cm policy Ar cop.txt
5221131c927SNavdeep ParharInstall the Connection Offload Policy (COP) in
5231131c927SNavdeep Parhar.Ar cop.txt Ns .
5241131c927SNavdeep ParharA COP offers fine-grained control over which connections get offloaded and with
5251131c927SNavdeep Parharwhat parameters.
5261131c927SNavdeep ParharSet
5271131c927SNavdeep Parhar.Cm hw.cxgbe.cop_managed_offloading="1"
5281131c927SNavdeep Parharin loader.conf to ensure that t4_tom will not offload any connection before a
5291131c927SNavdeep ParharCOP is installed.
5301131c927SNavdeep ParharNote that t4_tom must be loaded and operational (IFCAP_TOE enabled) as always
5311131c927SNavdeep Parharfor any kind of offload based on the hardware TOE.
5321131c927SNavdeep Parhar.Bl -column -offset indent "COP installed" "cop_managed_offloading" "Behavior"
5331131c927SNavdeep Parhar.It Sy COP installed Ta Sy cop_managed_offloading Ta Sy Behavior
5341131c927SNavdeep Parhar.It NO Ta 0 Ta offload all [Default]
5351131c927SNavdeep Parhar.It NO Ta 1 Ta no offload
5361131c927SNavdeep Parhar.It YES Ta Don't Care Ta Rule based offload
5371131c927SNavdeep Parhar.El
5381131c927SNavdeep Parhar.Pp
5391131c927SNavdeep ParharThe policy file consists of empty lines, comments (lines begining with #) and
5401131c927SNavdeep Parharany number of rules.
5411131c927SNavdeep ParharRules are applied in the order they appear in the file and processing stops at
5421131c927SNavdeep Parharthe first match.
5431131c927SNavdeep ParharThere is an implicit rule that disables offload for connections that do not
5441131c927SNavdeep Parharmatch anything in the policy.
5451131c927SNavdeep Parhar.Pp
5461131c927SNavdeep ParharEach rule consists of a filter part, which determines what connections the
5471131c927SNavdeep Parharrule applies to, and a settings part, which determines whether whether matching
5481131c927SNavdeep Parharconnections will be offloaded and, if so, with what settings.
5491131c927SNavdeep ParharThe general form of a rule is
5501131c927SNavdeep Parhar.Bl -ohang -offset indent
5511131c927SNavdeep Parhar.It Cm \&[ Ar socket-type Cm \&] Ar pcap-filter Cm => Ar settings
5521131c927SNavdeep Parhar.Pp
5531131c927SNavdeep Parhar.Ar socket-type
5541131c927SNavdeep Parharis one of the following.
5551131c927SNavdeep Parhar.Bl -tag -width "X" -compact
5561131c927SNavdeep Parhar.It Sy A
5571131c927SNavdeep ParharActive open.
5581131c927SNavdeep ParharConnection is being opened by this host.
5591131c927SNavdeep Parhar.It Sy P
5601131c927SNavdeep ParharPassive open.
5611131c927SNavdeep ParharConnection was requested by a peer.
5621131c927SNavdeep Parhar.It Sy L
5631131c927SNavdeep ParharListen called on a socket.
5641131c927SNavdeep ParharDisabling offload in such a rule will prevent a hardware listener from being started.
5651131c927SNavdeep Parhar.It Sy D
5661131c927SNavdeep ParharDon't care.
5671131c927SNavdeep ParharMatches all of the above.
5681131c927SNavdeep Parhar.El
5691131c927SNavdeep Parhar.Pp
5701131c927SNavdeep Parhar.Ar pcap-filter
5711131c927SNavdeep Parharis an expression that follows the
5721131c927SNavdeep Parhar.Xr pcap-filter 7
5731131c927SNavdeep Parharsyntax, or it is the keyword
5741131c927SNavdeep Parhar.Cm all
5751131c927SNavdeep Parharthat matches everything.
5761131c927SNavdeep Parhar.Pp
5771131c927SNavdeep Parhar.Ar settings
5781131c927SNavdeep Parhardetermine whether connections matching
5791131c927SNavdeep Parhar.Ar socket-type
5801131c927SNavdeep Parharand
5811131c927SNavdeep Parhar.Ar pcap-filter
5821131c927SNavdeep Parharare offloaded and optionally sets some per-connection properties if they are.
5831131c927SNavdeep ParharA combination of the following is allowed.
5841131c927SNavdeep Parhar.Bl -tag -width "timestamp" -compact
5851131c927SNavdeep Parhar.It Cm offload
5861131c927SNavdeep ParharConnection should be offloaded.
5871131c927SNavdeep ParharUse
5881131c927SNavdeep Parhar.Cm !offload
5891131c927SNavdeep Parharor
5901131c927SNavdeep Parhar.Cm not offload
5911131c927SNavdeep Parharto disable offload instead.
5921131c927SNavdeep Parhar.It Cm coalesce
5931131c927SNavdeep ParharEnable rx payload coalescing.
5941131c927SNavdeep ParharNegate to disable.
5951131c927SNavdeep Parhar.It Cm timestamp
5961131c927SNavdeep ParharEnable TCP timestamp option.
5971131c927SNavdeep ParharNegate to disable.
5981131c927SNavdeep Parhar.It Cm sack
5991131c927SNavdeep ParharEnable TCP Selective Acknowledgements (SACK).
6001131c927SNavdeep ParharNegate to disable.
6011131c927SNavdeep Parhar.It Cm nagle
6021131c927SNavdeep ParharEnable Nagle's algorithm.
6031131c927SNavdeep ParharNegate to disable.
6041131c927SNavdeep Parhar.It Cm ecn
6051131c927SNavdeep ParharEnable Explicit Congestion Notification (ECN).
6061131c927SNavdeep ParharNegate to disable.
6071131c927SNavdeep Parhar.It Cm ddp
6081131c927SNavdeep ParharUse Direct Data Placement (zero copy receive) and zero copy transmit on the
6091131c927SNavdeep Parharconnection to service AIO requests on the socket.
6101131c927SNavdeep ParharNegate to disable.
6111131c927SNavdeep Parhar.It Cm tls
6121131c927SNavdeep ParharSet ULP mode to ULP_MODE_TLS.
6131131c927SNavdeep Parhar.It Cm cong Ar algo
6141131c927SNavdeep ParharUse the specified congestion control algorithm.
6151131c927SNavdeep Parhar.Ar algo
6161131c927SNavdeep Parharmust be one of
6171131c927SNavdeep Parhar.Cm reno Ns , Cm tahoe Ns , Cm newreno Ns , or Cm highspeed Ns .
6181131c927SNavdeep Parhar.It Cm class Ar sc
6191131c927SNavdeep ParharBind the connection to the specified tx scheduling class.
6201131c927SNavdeep ParharValid range is 0 to 14 (for T4) and 0 to 15 (T5 onwards).
6211131c927SNavdeep Parhar.It Cm rxq Ar qid
6221131c927SNavdeep ParharUse the specified offload rx queue.
6231131c927SNavdeep Parhar.Ar qid
6241131c927SNavdeep Parharshould be between 0 and nofldrxq for the ifnet.
6251131c927SNavdeep Parhar.It Cm txq Ar qnum
6261131c927SNavdeep ParharUse the specified offload tx queue.
6271131c927SNavdeep Parhar.Ar qid
6281131c927SNavdeep Parharshould be between 0 and nofldtxq for the ifnet.
6291131c927SNavdeep Parhar.It Cm bind Ar qnum
6301131c927SNavdeep ParharShorthand for
6311131c927SNavdeep Parhar.Cm rxq Ar qnum Cm txq Ar qnum Ns .
6321131c927SNavdeep ParharUse only when nofldrxq is the same as nofldtxq.
6331131c927SNavdeep Parhar.It Cm mss Ar val
6341131c927SNavdeep ParharSet the advertised TCP MSS in the SYN for this connection to
6351131c927SNavdeep Parhar.Ar val
6361131c927SNavdeep Parhar(in bytes).
6371131c927SNavdeep ParharThe hardware MTU table must already have an entry that is suitable for the MSS.
6381131c927SNavdeep Parhar.El
6391131c927SNavdeep Parhar.Pp
6401131c927SNavdeep Parhar.It Example of a COP.
6411131c927SNavdeep ParharNote that hardware listener for port 22 will be IPv4 only because the rule
6421131c927SNavdeep Parharbefore it will prevent any IPv6 servers other than the first two.  Also note
6431131c927SNavdeep Parharthat outgoing connections to 192.168/16 are the only outgoing connections that
6441131c927SNavdeep Parharwill get offloaded.
6451131c927SNavdeep Parhar.Bd -literal
6461131c927SNavdeep Parhar[L] port 80 => offload
6471131c927SNavdeep Parhar[L] port 443 => offload
6481131c927SNavdeep Parhar[L] ip6 => !offload
6491131c927SNavdeep Parhar[L] port 22 => offload
6501131c927SNavdeep Parhar[P] dst port 80 => offload cong highspeed !sack !ecn
6511131c927SNavdeep Parhar[P] dst port 443 => offload tls
6521131c927SNavdeep Parhar[A] dst net 192.168/16 => offload
6531131c927SNavdeep Parhar[A] all => !offload
6541131c927SNavdeep Parhar[D] port 22 => offload !nagle
6551131c927SNavdeep Parhar.Ed
6561131c927SNavdeep Parhar.El
6571131c927SNavdeep Parhar.It Cm policy clear
6581131c927SNavdeep ParharRemove the Connection Offload Policy (COP) if one is in use.
65954912308SNavdeep Parhar.It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
66054912308SNavdeep Parhar.It Cm regdump Op Ar register-block ...
66159daefd7SEnji CooperDisplay contents of device registers.
66259daefd7SEnji CooperOne or more
66354912308SNavdeep Parhar.Ar register-block
66454912308SNavdeep Parharcan be specified to limit the registers displayed.
66554912308SNavdeep ParharThe default is to display registers for all blocks.
66654912308SNavdeep ParharRegisters with read side effects are not read during a
66754912308SNavdeep Parhar.Cm regdump
66854912308SNavdeep Parharoperation.
66954912308SNavdeep Parhar.Ar register-block
67054912308SNavdeep Parharcan be
67154912308SNavdeep Parhar.Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw
67254912308SNavdeep Parhar.Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns .
67354912308SNavdeep Parhar.It Cm sched-class config Op Ar param Ar value
67454912308SNavdeep ParharConfigure optional feature capabilities for the TX scheduler.
67554912308SNavdeep Parhar.Bl -ohang -offset indent
67654912308SNavdeep Parhar.It Sy type Ar scheduler-type
67754912308SNavdeep ParharUse packet for the packet scheduler.
67854912308SNavdeep Parhar.It Sy minmax Ar value
67954912308SNavdeep ParharA non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode.
68054912308SNavdeep Parhar.Pp
68154912308SNavdeep ParharNOTE:  Many (most) of the parameters and constraints are adapter-specific
68254912308SNavdeep Parhar- for instance the number of channels and classes which are available
68359daefd7SEnji Cooperwhether various modes are implemented, etc.
68459daefd7SEnji CooperConsult the adapter documentation for specific information on any limitations.
68554912308SNavdeep Parhar.El
68654912308SNavdeep Parhar.It Cm sched-class params Op Ar param Ar value
68754912308SNavdeep ParharConfigure parameters for a scheduling class.
68854912308SNavdeep Parhar.Bl -ohang -offset indent
68954912308SNavdeep Parhar.It Sy type Ar scheduler-type
69054912308SNavdeep ParharUse packet for packet scheduler.
69154912308SNavdeep Parhar.It Sy level Ar scheduler-hierarchy-level
69254912308SNavdeep ParharThe "level" within the scheduling hierarchy which is being programed:
69354912308SNavdeep Parhar.Pp
69454912308SNavdeep Parhar.Bl -tag -width "cl-wrr" -compact -offset indent
69554912308SNavdeep Parhar.It Sy cl-rl
69654912308SNavdeep ParharClass Rate Limiting.
69754912308SNavdeep Parhar.Pp
69854912308SNavdeep Parhar.It Sy cl-wrr
69954912308SNavdeep ParharClass Weighted Round Robin.
70054912308SNavdeep Parhar.Pp
7010d7404baSNavdeep Parhar.It Sy ch-rl
70254912308SNavdeep ParharChannel Rate Limiting.
70354912308SNavdeep Parhar.El
70454912308SNavdeep Parhar.It Sy mode Ar scheduler-mode
70554912308SNavdeep ParharThe mode in which the scheduling class is going to operate:
70654912308SNavdeep Parhar.Pp
70754912308SNavdeep Parhar.Bl -tag -width "class" -compact -offset indent
70854912308SNavdeep Parhar.It Sy class
70954912308SNavdeep ParharAll of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints.
71054912308SNavdeep Parhar.Pp
71154912308SNavdeep Parhar.It Sy flow
71254912308SNavdeep ParharEach of the "flows" bound to the scheduling class will be held to the scheduling constraints.
71354912308SNavdeep Parhar.El
71454912308SNavdeep Parhar.Pp
71554912308SNavdeep ParharE.g. if the scheduling class has a TX bandwidth of 10Mb/s, in
71654912308SNavdeep Parhar.Cm class
71754912308SNavdeep Parharmode, all of the "flows" bound to the class would be  limited  to  an
71854912308SNavdeep Parharaggregate bandwidth of 10Mb/s; but in
71954912308SNavdeep Parhar.Cm flow
72054912308SNavdeep Parharmode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s.
72154912308SNavdeep Parhar.It Sy rate-unit Ar scheduler-rate-unit
72254912308SNavdeep ParharThe units of the scheduler rate constraints:
72354912308SNavdeep Parhar.Pp
72454912308SNavdeep Parhar.Bl -tag -width "bits" -compact -offset indent
72554912308SNavdeep Parhar.It Sy bits
72654912308SNavdeep Parharbit rate in Kb/s.
72754912308SNavdeep Parhar.Pp
72854912308SNavdeep Parhar.It Sy pkts
72954912308SNavdeep Parharpackets/s.
73054912308SNavdeep Parhar.El
73154912308SNavdeep Parhar.It Sy rate-mode Ar scheduler-rate-mode
73254912308SNavdeep ParharThe mode of the scheduler rate constraints:
73354912308SNavdeep Parhar.Pp
73454912308SNavdeep Parhar.Bl -tag -width "relative" -compact -offset indent
73554912308SNavdeep Parhar.It Sy relative
73654912308SNavdeep Parharpercent of port rate.
73754912308SNavdeep Parhar.Pp
73854912308SNavdeep Parhar.It Sy absolute
73954912308SNavdeep ParharKb/s.
74054912308SNavdeep Parhar.El
74154912308SNavdeep Parhar.It Sy channel Ar scheduler-channel-index
74254912308SNavdeep ParharThe scheduling channel to which the scheduling class will be bound.
74354912308SNavdeep Parhar.It Sy class Ar scheduler-class-index
74454912308SNavdeep ParharThe scheduling class being programmed.
74554912308SNavdeep Parhar.It Sy min-rate Ar minimum-rate
74654912308SNavdeep ParharThe minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access.
74754912308SNavdeep Parhar.It Sy max-rate Ar maximum-rate
74854912308SNavdeep ParharThe maximum rate for a rate-limiting scheduling class hierarchy.
74954912308SNavdeep Parhar.It Sy weight Ar round-robin-weight
75054912308SNavdeep ParharThe weight to be used for a weighted-round-robin scheduling hierarchy.
75154912308SNavdeep Parhar.It Sy pkt-size Ar average-packet-size
75254912308SNavdeep ParharThe average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy.
75354912308SNavdeep Parhar.Pp
75454912308SNavdeep ParharNOTE:  Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available,
75559daefd7SEnji Cooperwhether various modes are implemented, etc.
75659daefd7SEnji CooperConsult the adapter documentation for specific information on any limitations.
75754912308SNavdeep Parhar.El
75854912308SNavdeep Parhar.It Cm sched-queue Ar port queue class
75954912308SNavdeep ParharBind the indicated port's NIC TX
76054912308SNavdeep Parhar.Ar queue
76154912308SNavdeep Parharto the specified TX Scheduler
76254912308SNavdeep Parhar.Ar class.
76354912308SNavdeep ParharIf the TX
76454912308SNavdeep Parhar.Ar queue
76554912308SNavdeep Parharis
76654912308SNavdeep Parhar.Cm all, *
76754912308SNavdeep Parharor any negative value, the binding will apply to
76854912308SNavdeep Parharall  of  the TX queues associated with the
76954912308SNavdeep Parhar.Ar interface.
77054912308SNavdeep ParharIf the class is
77154912308SNavdeep Parhar.Cm unbind, clear
77254912308SNavdeep Parharor any negative value, the TX queue(s) will be unbound from
77354912308SNavdeep Parharany current TX Scheduler Class binding.
77454912308SNavdeep Parhar.It Cm stdio
77554912308SNavdeep ParharSwitch to interactive mode.
77654912308SNavdeep Parhar.It Cm tcb Ar tid
77754912308SNavdeep ParharDisplay contents of the hardware TCB (TCP Control Block) for the
77854912308SNavdeep Parharconnection identfied by
77954912308SNavdeep Parhar.Ar tid Ns .
78054912308SNavdeep Parhar.El
78154912308SNavdeep Parhar.Sh FILES
78254912308SNavdeep Parhar/sys/dev/cxgbe/t4_ioctl.h
78354912308SNavdeep Parhar.Sh AUTHORS
78454912308SNavdeep ParharThis manual page was written by
78554912308SNavdeep Parhar.An Navdeep Parhar Aq np@FreeBSD.org .
786