xref: /freebsd/usr.sbin/cxgbetool/cxgbetool.8 (revision 59daefd7eb0de158f06f8a4bb3af6d8ba3c487c0)
154912308SNavdeep Parhar.\" Copyright (c) 2015, Chelsio Inc
254912308SNavdeep Parhar.\" All rights reserved.
354912308SNavdeep Parhar.\"
454912308SNavdeep Parhar.\" Redistribution and use in source and binary forms, with or without
554912308SNavdeep Parhar.\" modification, are permitted provided that the following conditions are met:
654912308SNavdeep Parhar.\"
754912308SNavdeep Parhar.\" 1. Redistributions of source code must retain the above copyright notice,
854912308SNavdeep Parhar.\"    this list of conditions and the following disclaimer.
954912308SNavdeep Parhar.\"
1054912308SNavdeep Parhar.\" 2. Redistributions in binary form must reproduce the above copyright
1154912308SNavdeep Parhar.\"    notice, this list of conditions and the following disclaimer in the
1254912308SNavdeep Parhar.\"    documentation and/or other materials provided with the distribution.
1354912308SNavdeep Parhar.\"
1454912308SNavdeep Parhar.\" 3. Neither the name of the Chelsio Inc nor the names of its
1554912308SNavdeep Parhar.\"    contributors may be used to endorse or promote products derived from
1654912308SNavdeep Parhar.\"    this software without specific prior written permission.
1754912308SNavdeep Parhar.\"
1854912308SNavdeep Parhar.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1954912308SNavdeep Parhar.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2054912308SNavdeep Parhar.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2154912308SNavdeep Parhar.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
2254912308SNavdeep Parhar.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2354912308SNavdeep Parhar.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2454912308SNavdeep Parhar.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2554912308SNavdeep Parhar.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2654912308SNavdeep Parhar.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2754912308SNavdeep Parhar.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2854912308SNavdeep Parhar.\" POSSIBILITY OF SUCH DAMAGE.
2954912308SNavdeep Parhar.\"
3054912308SNavdeep Parhar.\" * Other names and brands may be claimed as the property of others.
3154912308SNavdeep Parhar.\"
3254912308SNavdeep Parhar.\" $FreeBSD$
3354912308SNavdeep Parhar.\"
34*59daefd7SEnji Cooper.Dd March 6, 2017
3554912308SNavdeep Parhar.Dt CXGBETOOL 8
3654912308SNavdeep Parhar.Os
3754912308SNavdeep Parhar.Sh NAME
3854912308SNavdeep Parhar.Nm cxgbetool
3954912308SNavdeep Parhar.Nd Userspace companion to
4054912308SNavdeep Parhar.Xr cxgbe 4
4154912308SNavdeep Parhar.Sh SYNOPSIS
4254912308SNavdeep Parhar.Bl -item -compact
4354912308SNavdeep Parhar.It
4454912308SNavdeep Parhar.Nm Ar nexus command Op Ar parameter ...
4554912308SNavdeep Parhar.Pp
4654912308SNavdeep Parhar.It
4754912308SNavdeep Parhar.Nm Ar nexus Cm clearstats Ar port_id
4854912308SNavdeep Parhar.It
4954912308SNavdeep Parhar.Nm Ar nexus Cm context Bro Cm ingress | egress | fl | cong Brc Ar cntxt_id
5054912308SNavdeep Parhar.It
5154912308SNavdeep Parhar.Nm Ar nexus Cm filter mode Op Ar match-criteria ...
5254912308SNavdeep Parhar.It
5354912308SNavdeep Parhar.Nm Ar nexus Cm filter Ar idx Bro Ar filter-specification | Cm delete Brc
5454912308SNavdeep Parhar.It
5554912308SNavdeep Parhar.Nm Ar nexus Cm filter list
5654912308SNavdeep Parhar.It
5754912308SNavdeep Parhar.Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len
5854912308SNavdeep Parhar.It
5954912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg Ar fw-config.txt
6054912308SNavdeep Parhar.It
6154912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg clear
6254912308SNavdeep Parhar.It
6354912308SNavdeep Parhar.Nm Ar nexus Cm loadfw Ar fw-image.bin
6454912308SNavdeep Parhar.It
6554912308SNavdeep Parhar.Nm Ar nexus Cm memdump Ar addr len
6654912308SNavdeep Parhar.It
6754912308SNavdeep Parhar.Nm Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
6854912308SNavdeep Parhar.It
6954912308SNavdeep Parhar.Nm Ar nexus Cm regdump Op Ar register-block ...
7054912308SNavdeep Parhar.It
7154912308SNavdeep Parhar.Nm Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value
7254912308SNavdeep Parhar.It
7354912308SNavdeep Parhar.Nm Ar nexus Cm sched-queue Ar port Ar queue Ar class
7454912308SNavdeep Parhar.It
7554912308SNavdeep Parhar.Nm Ar nexus Cm stdio
7654912308SNavdeep Parhar.It
7754912308SNavdeep Parhar.Nm Ar nexus Cm tcb Ar tid
7854912308SNavdeep Parhar.El
7954912308SNavdeep Parhar.Sh DESCRIPTION
8054912308SNavdeep Parhar.Nm
8154912308SNavdeep Parharprovides command-line access to features and debug facilities exported by
8254912308SNavdeep Parhar.Xr cxgbe 4
8354912308SNavdeep Parharvia private ioctls.
8454912308SNavdeep ParharThe target nexus device,
8554912308SNavdeep Parhar.Va t4nex%d
8654912308SNavdeep Parhar, is always the first argument.
8754912308SNavdeep Parhar(The parent nexus for an Ethernet port
8854912308SNavdeep Parhar.Va cxgbe%d
8954912308SNavdeep Parharis listed in
9054912308SNavdeep Parhar.Va dev.cxgbe.%d.%parent
9154912308SNavdeep Parharin the
9254912308SNavdeep Parhar.Xr sysctl 8
9354912308SNavdeep ParharMIB).
9454912308SNavdeep ParharThe rest consists of a command and any parameters required by that command.
9554912308SNavdeep Parhar.Ss Commands
9654912308SNavdeep Parhar.Bl -ohang
9754912308SNavdeep Parhar.It Cm clearstats Ar port_id
9854912308SNavdeep ParharClear all transmit, receive, and error statistics of all queues associated
9954912308SNavdeep Parharwith a port.
10054912308SNavdeep ParharThe total number of ports attached to a nexus is listed in
10154912308SNavdeep Parhar.Va dev.t4nex.%d.nports
10254912308SNavdeep Parharand the 0 based
10354912308SNavdeep Parhar.Ar port_id
10454912308SNavdeep Parharidentifies a port within this range.
10554912308SNavdeep Parhar.Pp
10654912308SNavdeep Parhar.Bl -item -compact
10754912308SNavdeep Parhar.It
10854912308SNavdeep Parhar.Cm context ingress Ar ingress_cntxt_id
10954912308SNavdeep Parhar.It
11054912308SNavdeep Parhar.Cm context cong Ar ingress_cntxt_id
11154912308SNavdeep Parhar.It
11254912308SNavdeep Parhar.Cm context egress Ar egress_cntxt_id
11354912308SNavdeep Parhar.It
11454912308SNavdeep Parhar.Cm context fl Ar flm_cntxt_id
11554912308SNavdeep Parhar.El
11654912308SNavdeep ParharDisplay hardware context for an ingress queue, congestion manager, egress
11754912308SNavdeep Parharqueue, or freelist manager.
11854912308SNavdeep Parhar.Bl -tag -width ingress_cntxt_id -compact
11954912308SNavdeep Parhar.It Ar ingress_cntxt_id
12054912308SNavdeep Parharcontext id of an ingress queue -- the value listed in one of
12154912308SNavdeep Parhar.Va dev.t4nex.%d.fwq.cntxt_id Ns ,
12254912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns ,
12354912308SNavdeep Parharor
12454912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns .
12554912308SNavdeep Parhar.It Ar egress_cntxt_id
12654912308SNavdeep Parharcontext id of an egress queue -- the value listed in one of
12754912308SNavdeep Parhar.Va dev.t4nex.%d.mgmtq.cntxt_id Ns ,
12854912308SNavdeep Parhar.Va dev.cxgbe.%d.txq.%d.cntxt_id Ns ,
12954912308SNavdeep Parhar.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns ,
13054912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns ,
13154912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns ,
13254912308SNavdeep Parharor
13354912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns .
13454912308SNavdeep ParharNote that freelists are egress queues too.
13554912308SNavdeep Parhar.It Ar flm_cntxt_id
136*59daefd7SEnji Coopercontext id of a freelist manager.
137*59daefd7SEnji CooperThe FLM context id is displayed in the
13854912308SNavdeep Parharegress context dump of a freelist as FLMcontextID.
13954912308SNavdeep Parhar.El
14054912308SNavdeep Parhar.It Cm filter mode Op Ar match-criteria ...
14154912308SNavdeep ParharDisplay or set the nexus's filter mode.
14254912308SNavdeep Parhar.Ar match-criteria
14354912308SNavdeep Parharis a whitespace separated list of criteria from the table below.
14454912308SNavdeep ParharEach criteria has an associated budget which is also listed in the table.
14554912308SNavdeep ParharThe total budget allowed is 36 and attempts to set a filter mode that
14654912308SNavdeep Parharexceeds this will be rejected.
14754912308SNavdeep ParharEvery filter must conform to the filter mode -- multiple match criteria
14854912308SNavdeep Parharper filter are allowed but only from among those in the current setting
14954912308SNavdeep Parharof the filter mode.
15054912308SNavdeep ParharThe filter mode can only be changed when there are no existing filters.
15154912308SNavdeep ParharIts default value is
15254912308SNavdeep Parhar.Cm ipv4 ipv6 sip dip sport dport matchtype proto vlan iport fcoe
15354912308SNavdeep Parhar.Pp
15454912308SNavdeep Parhar(Note that
15554912308SNavdeep Parhar.Ar mask
15654912308SNavdeep Parhardefaults to all 1s when not provided explicitly.
15754912308SNavdeep ParharAlso note that many of the items being matched are discrete numeric
15854912308SNavdeep Parharvalues rather than bit fields and should be masked with caution.)
15954912308SNavdeep Parhar.TS
16054912308SNavdeep Parharcenter expand;
16154912308SNavdeep Parharcb cb cb cbw(40m)
16254912308SNavdeep Parharcb c l l.
16354912308SNavdeep ParharCriteria	Budget	Usage	Matches if ...
16454912308SNavdeep Parhar_
16554912308SNavdeep Parharipv4	0	T{
16654912308SNavdeep Parhar.Cm type ipv4
16754912308SNavdeep ParharT}	T{
16854912308SNavdeep Parharincoming packet is an IPv4 datagram.
16954912308SNavdeep ParharT}
17054912308SNavdeep Parhar_
17154912308SNavdeep Parharipv6	0	T{
17254912308SNavdeep Parhar.Cm type ipv6
17354912308SNavdeep ParharT}	T{
17454912308SNavdeep Parharincoming packet is an IPv6 datagram.
17554912308SNavdeep ParharT}
17654912308SNavdeep Parhar_
17754912308SNavdeep Parharsip	0	T{
17854912308SNavdeep Parhar.Cm sip Ar addr Ns Op / Ns Ar mask
17954912308SNavdeep ParharT}	T{
18054912308SNavdeep Parharbitwise and of the source address in an incoming IP datagram with
18154912308SNavdeep Parhar.Ar mask
18254912308SNavdeep Parharequals
18354912308SNavdeep Parhar.Ar addr Ns .
18454912308SNavdeep Parhar.Ar addr
18554912308SNavdeep Parharcan be an IPv4 or IPv6 address.
18654912308SNavdeep ParharT}
18754912308SNavdeep Parhar_
18854912308SNavdeep Parhardip	0	T{
18954912308SNavdeep Parhar.Cm dip Ar addr Ns Op / Ns Ar mask
19054912308SNavdeep ParharT}	T{
19154912308SNavdeep Parharbitwise and of the destination address in an incoming IP datagram with
19254912308SNavdeep Parhar.Ar mask
19354912308SNavdeep Parharequals
19454912308SNavdeep Parhar.Ar addr Ns .
19554912308SNavdeep Parhar.Ar addr
19654912308SNavdeep Parharcan be an IPv4 or IPv6 address.
19754912308SNavdeep ParharT}
19854912308SNavdeep Parhar_
19954912308SNavdeep Parharsport	0	T{
20054912308SNavdeep Parhar.Cm sport Ar port Ns Op : Ns Ar mask
20154912308SNavdeep ParharT}	T{
20254912308SNavdeep Parharbitwise and of the source port in an incoming TCP or UDP datagram with
20354912308SNavdeep Parhar.Ar mask
20454912308SNavdeep Parharequals
20554912308SNavdeep Parhar.Ar port Ns .
20654912308SNavdeep ParharT}
20754912308SNavdeep Parhar_
20854912308SNavdeep Parhardport	0	T{
20954912308SNavdeep Parhar.Cm dport Ar port Ns Op : Ns Ar mask
21054912308SNavdeep ParharT}	T{
21154912308SNavdeep Parharbitwise and of the destination port in an incoming TCP or UDP datagram with
21254912308SNavdeep Parhar.Ar mask
21354912308SNavdeep Parharequals
21454912308SNavdeep Parhar.Ar port Ns .
21554912308SNavdeep ParharT}
21654912308SNavdeep Parhar_
21754912308SNavdeep Parharfcoe	1	T{
21854912308SNavdeep Parhar.Cm fcoe Brq 0 | 1
21954912308SNavdeep ParharT}	T{
22054912308SNavdeep Parharincoming frame is Fibre Channel over Ethernet(1) or not(0).
22154912308SNavdeep ParharT}
22254912308SNavdeep Parhar_
22354912308SNavdeep Parhariport	3	T{
22454912308SNavdeep Parhar.Cm iport Ar val Ns Op : Ns Ar mask
22554912308SNavdeep ParharT}	T{
22654912308SNavdeep Parharbitwise and of the ingress port with
22754912308SNavdeep Parhar.Ar mask
22854912308SNavdeep Parharequals
22954912308SNavdeep Parhar.Ar val Ns .
23054912308SNavdeep ParharThe ingress port is a 3 bit number that identifies the port on which a
23154912308SNavdeep Parharframe arrived.
23254912308SNavdeep ParharPhysical ports are numbered 0-3 and 4-7 are internal loopback paths
23354912308SNavdeep Parharwithin the chip.
23454912308SNavdeep ParharNote that ingress port is not a bit field so it is not always possible
23554912308SNavdeep Parharto match an arbitrary subset of ingress ports with a single filter rule.
23654912308SNavdeep ParharT}
23754912308SNavdeep Parhar_
23854912308SNavdeep Parharovlan	17	T{
23954912308SNavdeep Parhar.Cm ovlan Ar tag Ns Op : Ns Ar mask
24054912308SNavdeep ParharT}	T{
24154912308SNavdeep Parharbitwise and of the 16-bit outer VLAN tag of an incoming frame with
24254912308SNavdeep Parhar.Ar mask
24354912308SNavdeep Parharequals
24454912308SNavdeep Parhar.Ar tag Ns .
24554912308SNavdeep ParharT}
24654912308SNavdeep Parhar_
24754912308SNavdeep Parharvlan	17	T{
24854912308SNavdeep Parhar.Cm vlan Ar tag Ns Op : Ns Ar mask
24954912308SNavdeep ParharT}	T{
25054912308SNavdeep Parharbitwise and of the 16-bit VLAN tag of an incoming QinQ frame with
25154912308SNavdeep Parhar.Ar mask
25254912308SNavdeep Parharequals
25354912308SNavdeep Parhar.Ar tag Ns .
25454912308SNavdeep ParharThe inner VLAN tag is used if the incoming frame is QinQ.
25554912308SNavdeep ParharT}
25654912308SNavdeep Parhar_
25754912308SNavdeep Parhartos	8	T{
25854912308SNavdeep Parhar.Cm tos Ar val Ns Op : Ns Ar mask
25954912308SNavdeep ParharT}	T{
26054912308SNavdeep Parharbitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an
26154912308SNavdeep Parharincoming packet with
26254912308SNavdeep Parhar.Ar mask
26354912308SNavdeep Parharequals
26454912308SNavdeep Parhar.Ar val Ns .
26554912308SNavdeep ParharT}
26654912308SNavdeep Parhar_
26754912308SNavdeep Parharproto	8	T{
26854912308SNavdeep Parhar.Cm proto Ar ipproto Ns Op : Ns Ar mask
26954912308SNavdeep ParharT}	T{
27054912308SNavdeep Parharbitwise and of the 8-bit IP protocol in an incoming packet with
27154912308SNavdeep Parhar.Ar mask
27254912308SNavdeep Parharequals
27354912308SNavdeep Parhar.Ar ipproto Ns .
27454912308SNavdeep ParharT}
27554912308SNavdeep Parhar_
27654912308SNavdeep Parharethtype	16	T{
27754912308SNavdeep Parhar.Cm ethtype Ar type Ns Op : Ns Ar mask
27854912308SNavdeep ParharT}	T{
27954912308SNavdeep Parharbitwise and of the 16-bit Ethernet type field of an incoming frame with
28054912308SNavdeep Parhar.Ar mask
28154912308SNavdeep Parharequals
28254912308SNavdeep Parhar.Ar type Ns .
28354912308SNavdeep ParharT}
28454912308SNavdeep Parhar_
28554912308SNavdeep Parharmacidx	9	T{
28654912308SNavdeep Parhar.Cm macidx Ar idx Ns Op : Ns Ar mask
28754912308SNavdeep ParharT}	T{
28854912308SNavdeep Parharbitwise and of the MAC Address Match Index of an incoming frame with
28954912308SNavdeep Parhar.Ar mask
29054912308SNavdeep Parharequals
29154912308SNavdeep Parhar.Ar idx Ns .
29254912308SNavdeep ParharThe MAC Address Match Index refers to an entry in the MPS TCAM or in the
29354912308SNavdeep ParharMPS hash.  See
29454912308SNavdeep Parhar.Cm matchtype
29554912308SNavdeep Parharfor more information.
29654912308SNavdeep ParharT}
29754912308SNavdeep Parhar_
29854912308SNavdeep Parharmatchtype	3	T{
29954912308SNavdeep Parhar.Cm matchtype Ar type Ns Op : Ns Ar mask
30054912308SNavdeep ParharT}	T{
30154912308SNavdeep Parharbitwise and of the Match Type of an incoming frame with
30254912308SNavdeep Parhar.Ar mask
30354912308SNavdeep Parharequals
30454912308SNavdeep Parhar.Ar idx Ns .
30554912308SNavdeep ParharMatch Type is one of the following:
30654912308SNavdeep Parhar.Bl -tag -width "n" -compact
30754912308SNavdeep Parhar.It 0
30854912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that is
30954912308SNavdeep Parharprogrammed in the MPS TCAM.
31054912308SNavdeep Parhar.Cm macidx
31154912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match
31254912308SNavdeep Parharin the TCAM.
31354912308SNavdeep Parhar.It 1
31454912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that "hit" a
31554912308SNavdeep Parharhash entry in the MPS hash table.
31654912308SNavdeep Parhar.Cm macidx
31754912308SNavdeep Parharcan be used to match the index of the entry in the MPS hash table.
31854912308SNavdeep Parhar.It 2
31954912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that is
32054912308SNavdeep Parharprogrammed in the MPS TCAM.
32154912308SNavdeep Parhar.Cm macidx
32254912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match
32354912308SNavdeep Parharin the TCAM.
32454912308SNavdeep Parhar.It 3
32554912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that "hit"
32654912308SNavdeep Parharan entry in the MPS hash table.
32754912308SNavdeep Parhar.It 4
32854912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode
32954912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address, and
33054912308SNavdeep Parhardoes not match in the MPS TCAM or the MPS hash either.  (The frame would
33154912308SNavdeep Parharhave been discarded if the interface wasn't in promiscuous mode.)
33254912308SNavdeep Parhar.It 5
33354912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode
33454912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address; it
33554912308SNavdeep Parharwasn't looked up in the MPS TCAM or the MPS hash because the chip is
33654912308SNavdeep Parharconfigured to give precedence to promiscuous mode classification.
33754912308SNavdeep Parhar.It 6
33854912308SNavdeep Parhardestination MAC in incoming frame is a broadcast address.
33954912308SNavdeep Parhar.It 7
34054912308SNavdeep ParharNot documented.  Do not use.
34154912308SNavdeep Parhar.El
34254912308SNavdeep ParharT}
34354912308SNavdeep Parhar_
34454912308SNavdeep Parharfrag	1	T{
34554912308SNavdeep Parhar.Cm frag Brq 0 | 1
34654912308SNavdeep ParharT}	T{
34754912308SNavdeep Parharincoming frame is part of a fragmented IP datagram(1) or not(0).
34854912308SNavdeep ParharT}
34954912308SNavdeep Parhar.TE
35054912308SNavdeep Parhar.It Cm filter Ar idx Ar filter-specification
35154912308SNavdeep ParharProgram a filter at the index specified by
35254912308SNavdeep Parhar.Ar idx Ns .
35354912308SNavdeep Parhar.Ar filter-specification
35454912308SNavdeep Parharconsists of one or more matches to try against an incoming frame and an
35554912308SNavdeep Parharaction to perform when all matches succeed.
35654912308SNavdeep Parhar.It Cm filter Ar idx Cm delete
35754912308SNavdeep ParharDelete filter that is at the given index.
35854912308SNavdeep Parhar.It Cm filter Cm list
35954912308SNavdeep ParharList all filters programmed into the hardware.
36054912308SNavdeep Parhar.It Cm i2c Ar port_id devaddr addr Op Ar len
36154912308SNavdeep Parhar.It Cm loadcfg Ar fw-config.txt
36254912308SNavdeep ParharInstall the firmware configuration file contained in
36354912308SNavdeep Parhar.Ar fw-config.txt
36454912308SNavdeep Parharto the card.
36554912308SNavdeep ParharSet hw.cxgbe.config_file="flash" in loader.conf to get
36654912308SNavdeep Parhar.Xr cxgbe 4
36754912308SNavdeep Parharto use the on-flash configuration.
36854912308SNavdeep Parhar.It Cm loadcfg Cm clear
36954912308SNavdeep ParharErase configuration file from the card.
37054912308SNavdeep Parhar.It Cm loadfw Ar fw-image.bin
37154912308SNavdeep ParharInstall the firmware contained in
37254912308SNavdeep Parhar.Ar fw-image.bin
37354912308SNavdeep Parharto the card.
37454912308SNavdeep Parhar.It Cm memdump Ar addr len
37554912308SNavdeep ParharDisplay
37654912308SNavdeep Parhar.Ar len
37754912308SNavdeep Parharbytes of data of the card's memory starting at
37854912308SNavdeep Parhar.Ar addr Ns .
37954912308SNavdeep ParharThe card's memory map is available in
38054912308SNavdeep Parhar.Va dev.t4nex.%d.misc.meminfo Ns .
38154912308SNavdeep Parhar.It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
38254912308SNavdeep Parhar.It Cm regdump Op Ar register-block ...
383*59daefd7SEnji CooperDisplay contents of device registers.
384*59daefd7SEnji CooperOne or more
38554912308SNavdeep Parhar.Ar register-block
38654912308SNavdeep Parharcan be specified to limit the registers displayed.
38754912308SNavdeep ParharThe default is to display registers for all blocks.
38854912308SNavdeep ParharRegisters with read side effects are not read during a
38954912308SNavdeep Parhar.Cm regdump
39054912308SNavdeep Parharoperation.
39154912308SNavdeep Parhar.Ar register-block
39254912308SNavdeep Parharcan be
39354912308SNavdeep Parhar.Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw
39454912308SNavdeep Parhar.Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns .
39554912308SNavdeep Parhar.It Cm sched-class config Op Ar param Ar value
39654912308SNavdeep ParharConfigure optional feature capabilities for the TX scheduler.
39754912308SNavdeep Parhar.Bl -ohang -offset indent
39854912308SNavdeep Parhar.It Sy type Ar scheduler-type
39954912308SNavdeep ParharUse packet for the packet scheduler.
40054912308SNavdeep Parhar.It Sy minmax Ar value
40154912308SNavdeep ParharA non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode.
40254912308SNavdeep Parhar.Pp
40354912308SNavdeep ParharNOTE:  Many (most) of the parameters and constraints are adapter-specific
40454912308SNavdeep Parhar- for instance the number of channels and classes which are available
405*59daefd7SEnji Cooperwhether various modes are implemented, etc.
406*59daefd7SEnji CooperConsult the adapter documentation for specific information on any limitations.
40754912308SNavdeep Parhar.El
40854912308SNavdeep Parhar.It Cm sched-class params Op Ar param Ar value
40954912308SNavdeep ParharConfigure parameters for a scheduling class.
41054912308SNavdeep Parhar.Bl -ohang -offset indent
41154912308SNavdeep Parhar.It Sy type Ar scheduler-type
41254912308SNavdeep ParharUse packet for packet scheduler.
41354912308SNavdeep Parhar.It Sy level Ar scheduler-hierarchy-level
41454912308SNavdeep ParharThe "level" within the scheduling hierarchy which is being programed:
41554912308SNavdeep Parhar.Pp
41654912308SNavdeep Parhar.Bl -tag -width "cl-wrr" -compact -offset indent
41754912308SNavdeep Parhar.It Sy cl-rl
41854912308SNavdeep ParharClass Rate Limiting.
41954912308SNavdeep Parhar.Pp
42054912308SNavdeep Parhar.It Sy cl-wrr
42154912308SNavdeep ParharClass Weighted Round Robin.
42254912308SNavdeep Parhar.Pp
42354912308SNavdeep Parhar.It Sy cl-wrr
42454912308SNavdeep ParharChannel Rate Limiting.
42554912308SNavdeep Parhar.El
42654912308SNavdeep Parhar.It Sy mode Ar scheduler-mode
42754912308SNavdeep ParharThe mode in which the scheduling class is going to operate:
42854912308SNavdeep Parhar.Pp
42954912308SNavdeep Parhar.Bl -tag -width "class" -compact -offset indent
43054912308SNavdeep Parhar.It Sy class
43154912308SNavdeep ParharAll of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints.
43254912308SNavdeep Parhar.Pp
43354912308SNavdeep Parhar.It Sy flow
43454912308SNavdeep ParharEach of the "flows" bound to the scheduling class will be held to the scheduling constraints.
43554912308SNavdeep Parhar.El
43654912308SNavdeep Parhar.Pp
43754912308SNavdeep ParharE.g. if the scheduling class has a TX bandwidth of 10Mb/s, in
43854912308SNavdeep Parhar.Cm class
43954912308SNavdeep Parharmode, all of the "flows" bound to the class would be  limited  to  an
44054912308SNavdeep Parharaggregate bandwidth of 10Mb/s; but in
44154912308SNavdeep Parhar.Cm flow
44254912308SNavdeep Parharmode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s.
44354912308SNavdeep Parhar.It Sy rate-unit Ar scheduler-rate-unit
44454912308SNavdeep ParharThe units of the scheduler rate constraints:
44554912308SNavdeep Parhar.Pp
44654912308SNavdeep Parhar.Bl -tag -width "bits" -compact -offset indent
44754912308SNavdeep Parhar.It Sy bits
44854912308SNavdeep Parharbit rate in Kb/s.
44954912308SNavdeep Parhar.Pp
45054912308SNavdeep Parhar.It Sy pkts
45154912308SNavdeep Parharpackets/s.
45254912308SNavdeep Parhar.El
45354912308SNavdeep Parhar.It Sy rate-mode Ar scheduler-rate-mode
45454912308SNavdeep ParharThe mode of the scheduler rate constraints:
45554912308SNavdeep Parhar.Pp
45654912308SNavdeep Parhar.Bl -tag -width "relative" -compact -offset indent
45754912308SNavdeep Parhar.It Sy relative
45854912308SNavdeep Parharpercent of port rate.
45954912308SNavdeep Parhar.Pp
46054912308SNavdeep Parhar.It Sy absolute
46154912308SNavdeep ParharKb/s.
46254912308SNavdeep Parhar.El
46354912308SNavdeep Parhar.It Sy channel Ar scheduler-channel-index
46454912308SNavdeep ParharThe scheduling channel to which the scheduling class will be bound.
46554912308SNavdeep Parhar.It Sy class Ar scheduler-class-index
46654912308SNavdeep ParharThe scheduling class being programmed.
46754912308SNavdeep Parhar.It Sy min-rate Ar minimum-rate
46854912308SNavdeep ParharThe minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access.
46954912308SNavdeep Parhar.It Sy max-rate Ar maximum-rate
47054912308SNavdeep ParharThe maximum rate for a rate-limiting scheduling class hierarchy.
47154912308SNavdeep Parhar.It Sy weight Ar round-robin-weight
47254912308SNavdeep ParharThe weight to be used for a weighted-round-robin scheduling hierarchy.
47354912308SNavdeep Parhar.It Sy pkt-size Ar average-packet-size
47454912308SNavdeep ParharThe average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy.
47554912308SNavdeep Parhar.Pp
47654912308SNavdeep ParharNOTE:  Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available,
477*59daefd7SEnji Cooperwhether various modes are implemented, etc.
478*59daefd7SEnji CooperConsult the adapter documentation for specific information on any limitations.
47954912308SNavdeep Parhar.El
48054912308SNavdeep Parhar.It Cm sched-queue Ar port queue class
48154912308SNavdeep ParharBind the indicated port's NIC TX
48254912308SNavdeep Parhar.Ar queue
48354912308SNavdeep Parharto the specified TX Scheduler
48454912308SNavdeep Parhar.Ar class.
48554912308SNavdeep ParharIf the TX
48654912308SNavdeep Parhar.Ar queue
48754912308SNavdeep Parharis
48854912308SNavdeep Parhar.Cm all, *
48954912308SNavdeep Parharor any negative value, the binding will apply to
49054912308SNavdeep Parharall  of  the TX queues associated with the
49154912308SNavdeep Parhar.Ar interface.
49254912308SNavdeep ParharIf the class is
49354912308SNavdeep Parhar.Cm unbind, clear
49454912308SNavdeep Parharor any negative value, the TX queue(s) will be unbound from
49554912308SNavdeep Parharany current TX Scheduler Class binding.
49654912308SNavdeep Parhar.It Cm stdio
49754912308SNavdeep ParharSwitch to interactive mode.
49854912308SNavdeep Parhar.It Cm tcb Ar tid
49954912308SNavdeep ParharDisplay contents of the hardware TCB (TCP Control Block) for the
50054912308SNavdeep Parharconnection identfied by
50154912308SNavdeep Parhar.Ar tid Ns .
50254912308SNavdeep Parhar.El
50354912308SNavdeep Parhar.Sh FILES
50454912308SNavdeep Parhar/sys/dev/cxgbe/t4_ioctl.h
50554912308SNavdeep Parhar.Sh AUTHORS
50654912308SNavdeep ParharThis manual page was written by
50754912308SNavdeep Parhar.An Navdeep Parhar Aq np@FreeBSD.org .
508