xref: /freebsd/usr.sbin/cxgbetool/cxgbetool.8 (revision 54912308c8cf41f59bc0cc29d107975896bdc7dd)
1*54912308SNavdeep Parhar.\" Copyright (c) 2015, Chelsio Inc
2*54912308SNavdeep Parhar.\" All rights reserved.
3*54912308SNavdeep Parhar.\"
4*54912308SNavdeep Parhar.\" Redistribution and use in source and binary forms, with or without
5*54912308SNavdeep Parhar.\" modification, are permitted provided that the following conditions are met:
6*54912308SNavdeep Parhar.\"
7*54912308SNavdeep Parhar.\" 1. Redistributions of source code must retain the above copyright notice,
8*54912308SNavdeep Parhar.\"    this list of conditions and the following disclaimer.
9*54912308SNavdeep Parhar.\"
10*54912308SNavdeep Parhar.\" 2. Redistributions in binary form must reproduce the above copyright
11*54912308SNavdeep Parhar.\"    notice, this list of conditions and the following disclaimer in the
12*54912308SNavdeep Parhar.\"    documentation and/or other materials provided with the distribution.
13*54912308SNavdeep Parhar.\"
14*54912308SNavdeep Parhar.\" 3. Neither the name of the Chelsio Inc nor the names of its
15*54912308SNavdeep Parhar.\"    contributors may be used to endorse or promote products derived from
16*54912308SNavdeep Parhar.\"    this software without specific prior written permission.
17*54912308SNavdeep Parhar.\"
18*54912308SNavdeep Parhar.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19*54912308SNavdeep Parhar.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20*54912308SNavdeep Parhar.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21*54912308SNavdeep Parhar.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22*54912308SNavdeep Parhar.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23*54912308SNavdeep Parhar.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24*54912308SNavdeep Parhar.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25*54912308SNavdeep Parhar.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26*54912308SNavdeep Parhar.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27*54912308SNavdeep Parhar.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28*54912308SNavdeep Parhar.\" POSSIBILITY OF SUCH DAMAGE.
29*54912308SNavdeep Parhar.\"
30*54912308SNavdeep Parhar.\" * Other names and brands may be claimed as the property of others.
31*54912308SNavdeep Parhar.\"
32*54912308SNavdeep Parhar.\" $FreeBSD$
33*54912308SNavdeep Parhar.\"
34*54912308SNavdeep Parhar.Dd February 1, 2013
35*54912308SNavdeep Parhar.Dt CXGBETOOL 8
36*54912308SNavdeep Parhar.Os
37*54912308SNavdeep Parhar.Sh NAME
38*54912308SNavdeep Parhar.Nm cxgbetool
39*54912308SNavdeep Parhar.Nd Userspace companion to
40*54912308SNavdeep Parhar.Xr cxgbe 4
41*54912308SNavdeep Parhar.Sh SYNOPSIS
42*54912308SNavdeep Parhar.Bl -item -compact
43*54912308SNavdeep Parhar.It
44*54912308SNavdeep Parhar.Nm Ar nexus command Op Ar parameter ...
45*54912308SNavdeep Parhar.Pp
46*54912308SNavdeep Parhar.It
47*54912308SNavdeep Parhar.Nm Ar nexus Cm clearstats Ar port_id
48*54912308SNavdeep Parhar.It
49*54912308SNavdeep Parhar.Nm Ar nexus Cm context Bro Cm ingress | egress | fl | cong Brc Ar cntxt_id
50*54912308SNavdeep Parhar.It
51*54912308SNavdeep Parhar.Nm Ar nexus Cm filter mode Op Ar match-criteria ...
52*54912308SNavdeep Parhar.It
53*54912308SNavdeep Parhar.Nm Ar nexus Cm filter Ar idx Bro Ar filter-specification | Cm delete Brc
54*54912308SNavdeep Parhar.It
55*54912308SNavdeep Parhar.Nm Ar nexus Cm filter list
56*54912308SNavdeep Parhar.It
57*54912308SNavdeep Parhar.Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len
58*54912308SNavdeep Parhar.It
59*54912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg Ar fw-config.txt
60*54912308SNavdeep Parhar.It
61*54912308SNavdeep Parhar.Nm Ar nexus Cm loadcfg clear
62*54912308SNavdeep Parhar.It
63*54912308SNavdeep Parhar.Nm Ar nexus Cm loadfw Ar fw-image.bin
64*54912308SNavdeep Parhar.It
65*54912308SNavdeep Parhar.Nm Ar nexus Cm memdump Ar addr len
66*54912308SNavdeep Parhar.It
67*54912308SNavdeep Parhar.Nm Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
68*54912308SNavdeep Parhar.It
69*54912308SNavdeep Parhar.Nm Ar nexus Cm regdump Op Ar register-block ...
70*54912308SNavdeep Parhar.It
71*54912308SNavdeep Parhar.Nm Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value
72*54912308SNavdeep Parhar.It
73*54912308SNavdeep Parhar.Nm Ar nexus Cm sched-queue Ar port Ar queue Ar class
74*54912308SNavdeep Parhar.It
75*54912308SNavdeep Parhar.Nm Ar nexus Cm stdio
76*54912308SNavdeep Parhar.It
77*54912308SNavdeep Parhar.Nm Ar nexus Cm tcb Ar tid
78*54912308SNavdeep Parhar.El
79*54912308SNavdeep Parhar.Sh DESCRIPTION
80*54912308SNavdeep Parhar.Nm
81*54912308SNavdeep Parharprovides command-line access to features and debug facilities exported by
82*54912308SNavdeep Parhar.Xr cxgbe 4
83*54912308SNavdeep Parharvia private ioctls.
84*54912308SNavdeep ParharThe target nexus device,
85*54912308SNavdeep Parhar.Va t4nex%d
86*54912308SNavdeep Parhar, is always the first argument.
87*54912308SNavdeep Parhar(The parent nexus for an Ethernet port
88*54912308SNavdeep Parhar.Va cxgbe%d
89*54912308SNavdeep Parharis listed in
90*54912308SNavdeep Parhar.Va dev.cxgbe.%d.%parent
91*54912308SNavdeep Parharin the
92*54912308SNavdeep Parhar.Xr sysctl 8
93*54912308SNavdeep ParharMIB).
94*54912308SNavdeep ParharThe rest consists of a command and any parameters required by that command.
95*54912308SNavdeep Parhar.Ss Commands
96*54912308SNavdeep Parhar.Bl -ohang
97*54912308SNavdeep Parhar.It Cm clearstats Ar port_id
98*54912308SNavdeep ParharClear all transmit, receive, and error statistics of all queues associated
99*54912308SNavdeep Parharwith a port.
100*54912308SNavdeep ParharThe total number of ports attached to a nexus is listed in
101*54912308SNavdeep Parhar.Va dev.t4nex.%d.nports
102*54912308SNavdeep Parharand the 0 based
103*54912308SNavdeep Parhar.Ar port_id
104*54912308SNavdeep Parharidentifies a port within this range.
105*54912308SNavdeep Parhar.Pp
106*54912308SNavdeep Parhar.Bl -item -compact
107*54912308SNavdeep Parhar.It
108*54912308SNavdeep Parhar.Cm context ingress Ar ingress_cntxt_id
109*54912308SNavdeep Parhar.It
110*54912308SNavdeep Parhar.Cm context cong Ar ingress_cntxt_id
111*54912308SNavdeep Parhar.It
112*54912308SNavdeep Parhar.Cm context egress Ar egress_cntxt_id
113*54912308SNavdeep Parhar.It
114*54912308SNavdeep Parhar.Cm context fl Ar flm_cntxt_id
115*54912308SNavdeep Parhar.El
116*54912308SNavdeep ParharDisplay hardware context for an ingress queue, congestion manager, egress
117*54912308SNavdeep Parharqueue, or freelist manager.
118*54912308SNavdeep Parhar.Bl -tag -width ingress_cntxt_id -compact
119*54912308SNavdeep Parhar.It Ar ingress_cntxt_id
120*54912308SNavdeep Parharcontext id of an ingress queue -- the value listed in one of
121*54912308SNavdeep Parhar.Va dev.t4nex.%d.fwq.cntxt_id Ns ,
122*54912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns ,
123*54912308SNavdeep Parharor
124*54912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns .
125*54912308SNavdeep Parhar.It Ar egress_cntxt_id
126*54912308SNavdeep Parharcontext id of an egress queue -- the value listed in one of
127*54912308SNavdeep Parhar.Va dev.t4nex.%d.mgmtq.cntxt_id Ns ,
128*54912308SNavdeep Parhar.Va dev.cxgbe.%d.txq.%d.cntxt_id Ns ,
129*54912308SNavdeep Parhar.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns ,
130*54912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns ,
131*54912308SNavdeep Parhar.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns ,
132*54912308SNavdeep Parharor
133*54912308SNavdeep Parhar.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns .
134*54912308SNavdeep ParharNote that freelists are egress queues too.
135*54912308SNavdeep Parhar.It Ar flm_cntxt_id
136*54912308SNavdeep Parharcontext id of a freelist manager.  The FLM context id is displayed in the
137*54912308SNavdeep Parharegress context dump of a freelist as FLMcontextID.
138*54912308SNavdeep Parhar.El
139*54912308SNavdeep Parhar.It Cm filter mode Op Ar match-criteria ...
140*54912308SNavdeep ParharDisplay or set the nexus's filter mode.
141*54912308SNavdeep Parhar.Ar match-criteria
142*54912308SNavdeep Parharis a whitespace separated list of criteria from the table below.
143*54912308SNavdeep ParharEach criteria has an associated budget which is also listed in the table.
144*54912308SNavdeep ParharThe total budget allowed is 36 and attempts to set a filter mode that
145*54912308SNavdeep Parharexceeds this will be rejected.
146*54912308SNavdeep ParharEvery filter must conform to the filter mode -- multiple match criteria
147*54912308SNavdeep Parharper filter are allowed but only from among those in the current setting
148*54912308SNavdeep Parharof the filter mode.
149*54912308SNavdeep ParharThe filter mode can only be changed when there are no existing filters.
150*54912308SNavdeep ParharIts default value is
151*54912308SNavdeep Parhar.Cm ipv4 ipv6 sip dip sport dport matchtype proto vlan iport fcoe
152*54912308SNavdeep Parhar.Pp
153*54912308SNavdeep Parhar(Note that
154*54912308SNavdeep Parhar.Ar mask
155*54912308SNavdeep Parhardefaults to all 1s when not provided explicitly.
156*54912308SNavdeep ParharAlso note that many of the items being matched are discrete numeric
157*54912308SNavdeep Parharvalues rather than bit fields and should be masked with caution.)
158*54912308SNavdeep Parhar.TS
159*54912308SNavdeep Parharcenter expand;
160*54912308SNavdeep Parharcb cb cb cbw(40m)
161*54912308SNavdeep Parharcb c l l.
162*54912308SNavdeep ParharCriteria	Budget	Usage	Matches if ...
163*54912308SNavdeep Parhar_
164*54912308SNavdeep Parharipv4	0	T{
165*54912308SNavdeep Parhar.Cm type ipv4
166*54912308SNavdeep ParharT}	T{
167*54912308SNavdeep Parharincoming packet is an IPv4 datagram.
168*54912308SNavdeep ParharT}
169*54912308SNavdeep Parhar_
170*54912308SNavdeep Parharipv6	0	T{
171*54912308SNavdeep Parhar.Cm type ipv6
172*54912308SNavdeep ParharT}	T{
173*54912308SNavdeep Parharincoming packet is an IPv6 datagram.
174*54912308SNavdeep ParharT}
175*54912308SNavdeep Parhar_
176*54912308SNavdeep Parharsip	0	T{
177*54912308SNavdeep Parhar.Cm sip Ar addr Ns Op / Ns Ar mask
178*54912308SNavdeep ParharT}	T{
179*54912308SNavdeep Parharbitwise and of the source address in an incoming IP datagram with
180*54912308SNavdeep Parhar.Ar mask
181*54912308SNavdeep Parharequals
182*54912308SNavdeep Parhar.Ar addr Ns .
183*54912308SNavdeep Parhar.Ar addr
184*54912308SNavdeep Parharcan be an IPv4 or IPv6 address.
185*54912308SNavdeep ParharT}
186*54912308SNavdeep Parhar_
187*54912308SNavdeep Parhardip	0	T{
188*54912308SNavdeep Parhar.Cm dip Ar addr Ns Op / Ns Ar mask
189*54912308SNavdeep ParharT}	T{
190*54912308SNavdeep Parharbitwise and of the destination address in an incoming IP datagram with
191*54912308SNavdeep Parhar.Ar mask
192*54912308SNavdeep Parharequals
193*54912308SNavdeep Parhar.Ar addr Ns .
194*54912308SNavdeep Parhar.Ar addr
195*54912308SNavdeep Parharcan be an IPv4 or IPv6 address.
196*54912308SNavdeep ParharT}
197*54912308SNavdeep Parhar_
198*54912308SNavdeep Parharsport	0	T{
199*54912308SNavdeep Parhar.Cm sport Ar port Ns Op : Ns Ar mask
200*54912308SNavdeep ParharT}	T{
201*54912308SNavdeep Parharbitwise and of the source port in an incoming TCP or UDP datagram with
202*54912308SNavdeep Parhar.Ar mask
203*54912308SNavdeep Parharequals
204*54912308SNavdeep Parhar.Ar port Ns .
205*54912308SNavdeep ParharT}
206*54912308SNavdeep Parhar_
207*54912308SNavdeep Parhardport	0	T{
208*54912308SNavdeep Parhar.Cm dport Ar port Ns Op : Ns Ar mask
209*54912308SNavdeep ParharT}	T{
210*54912308SNavdeep Parharbitwise and of the destination port in an incoming TCP or UDP datagram with
211*54912308SNavdeep Parhar.Ar mask
212*54912308SNavdeep Parharequals
213*54912308SNavdeep Parhar.Ar port Ns .
214*54912308SNavdeep ParharT}
215*54912308SNavdeep Parhar_
216*54912308SNavdeep Parharfcoe	1	T{
217*54912308SNavdeep Parhar.Cm fcoe Brq 0 | 1
218*54912308SNavdeep ParharT}	T{
219*54912308SNavdeep Parharincoming frame is Fibre Channel over Ethernet(1) or not(0).
220*54912308SNavdeep ParharT}
221*54912308SNavdeep Parhar_
222*54912308SNavdeep Parhariport	3	T{
223*54912308SNavdeep Parhar.Cm iport Ar val Ns Op : Ns Ar mask
224*54912308SNavdeep ParharT}	T{
225*54912308SNavdeep Parharbitwise and of the ingress port with
226*54912308SNavdeep Parhar.Ar mask
227*54912308SNavdeep Parharequals
228*54912308SNavdeep Parhar.Ar val Ns .
229*54912308SNavdeep ParharThe ingress port is a 3 bit number that identifies the port on which a
230*54912308SNavdeep Parharframe arrived.
231*54912308SNavdeep ParharPhysical ports are numbered 0-3 and 4-7 are internal loopback paths
232*54912308SNavdeep Parharwithin the chip.
233*54912308SNavdeep ParharNote that ingress port is not a bit field so it is not always possible
234*54912308SNavdeep Parharto match an arbitrary subset of ingress ports with a single filter rule.
235*54912308SNavdeep ParharT}
236*54912308SNavdeep Parhar_
237*54912308SNavdeep Parharovlan	17	T{
238*54912308SNavdeep Parhar.Cm ovlan Ar tag Ns Op : Ns Ar mask
239*54912308SNavdeep ParharT}	T{
240*54912308SNavdeep Parharbitwise and of the 16-bit outer VLAN tag of an incoming frame with
241*54912308SNavdeep Parhar.Ar mask
242*54912308SNavdeep Parharequals
243*54912308SNavdeep Parhar.Ar tag Ns .
244*54912308SNavdeep ParharT}
245*54912308SNavdeep Parhar_
246*54912308SNavdeep Parharvlan	17	T{
247*54912308SNavdeep Parhar.Cm vlan Ar tag Ns Op : Ns Ar mask
248*54912308SNavdeep ParharT}	T{
249*54912308SNavdeep Parharbitwise and of the 16-bit VLAN tag of an incoming QinQ frame with
250*54912308SNavdeep Parhar.Ar mask
251*54912308SNavdeep Parharequals
252*54912308SNavdeep Parhar.Ar tag Ns .
253*54912308SNavdeep ParharThe inner VLAN tag is used if the incoming frame is QinQ.
254*54912308SNavdeep ParharT}
255*54912308SNavdeep Parhar_
256*54912308SNavdeep Parhartos	8	T{
257*54912308SNavdeep Parhar.Cm tos Ar val Ns Op : Ns Ar mask
258*54912308SNavdeep ParharT}	T{
259*54912308SNavdeep Parharbitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an
260*54912308SNavdeep Parharincoming packet with
261*54912308SNavdeep Parhar.Ar mask
262*54912308SNavdeep Parharequals
263*54912308SNavdeep Parhar.Ar val Ns .
264*54912308SNavdeep ParharT}
265*54912308SNavdeep Parhar_
266*54912308SNavdeep Parharproto	8	T{
267*54912308SNavdeep Parhar.Cm proto Ar ipproto Ns Op : Ns Ar mask
268*54912308SNavdeep ParharT}	T{
269*54912308SNavdeep Parharbitwise and of the 8-bit IP protocol in an incoming packet with
270*54912308SNavdeep Parhar.Ar mask
271*54912308SNavdeep Parharequals
272*54912308SNavdeep Parhar.Ar ipproto Ns .
273*54912308SNavdeep ParharT}
274*54912308SNavdeep Parhar_
275*54912308SNavdeep Parharethtype	16	T{
276*54912308SNavdeep Parhar.Cm ethtype Ar type Ns Op : Ns Ar mask
277*54912308SNavdeep ParharT}	T{
278*54912308SNavdeep Parharbitwise and of the 16-bit Ethernet type field of an incoming frame with
279*54912308SNavdeep Parhar.Ar mask
280*54912308SNavdeep Parharequals
281*54912308SNavdeep Parhar.Ar type Ns .
282*54912308SNavdeep ParharT}
283*54912308SNavdeep Parhar_
284*54912308SNavdeep Parharmacidx	9	T{
285*54912308SNavdeep Parhar.Cm macidx Ar idx Ns Op : Ns Ar mask
286*54912308SNavdeep ParharT}	T{
287*54912308SNavdeep Parharbitwise and of the MAC Address Match Index of an incoming frame with
288*54912308SNavdeep Parhar.Ar mask
289*54912308SNavdeep Parharequals
290*54912308SNavdeep Parhar.Ar idx Ns .
291*54912308SNavdeep ParharThe MAC Address Match Index refers to an entry in the MPS TCAM or in the
292*54912308SNavdeep ParharMPS hash.  See
293*54912308SNavdeep Parhar.Cm matchtype
294*54912308SNavdeep Parharfor more information.
295*54912308SNavdeep ParharT}
296*54912308SNavdeep Parhar_
297*54912308SNavdeep Parharmatchtype	3	T{
298*54912308SNavdeep Parhar.Cm matchtype Ar type Ns Op : Ns Ar mask
299*54912308SNavdeep ParharT}	T{
300*54912308SNavdeep Parharbitwise and of the Match Type of an incoming frame with
301*54912308SNavdeep Parhar.Ar mask
302*54912308SNavdeep Parharequals
303*54912308SNavdeep Parhar.Ar idx Ns .
304*54912308SNavdeep ParharMatch Type is one of the following:
305*54912308SNavdeep Parhar.Bl -tag -width "n" -compact
306*54912308SNavdeep Parhar.It 0
307*54912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that is
308*54912308SNavdeep Parharprogrammed in the MPS TCAM.
309*54912308SNavdeep Parhar.Cm macidx
310*54912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match
311*54912308SNavdeep Parharin the TCAM.
312*54912308SNavdeep Parhar.It 1
313*54912308SNavdeep Parhardestination MAC in incoming frame is a unicast L2 address that "hit" a
314*54912308SNavdeep Parharhash entry in the MPS hash table.
315*54912308SNavdeep Parhar.Cm macidx
316*54912308SNavdeep Parharcan be used to match the index of the entry in the MPS hash table.
317*54912308SNavdeep Parhar.It 2
318*54912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that is
319*54912308SNavdeep Parharprogrammed in the MPS TCAM.
320*54912308SNavdeep Parhar.Cm macidx
321*54912308SNavdeep Parharcan be used to match the index (and thus the MAC address) of the match
322*54912308SNavdeep Parharin the TCAM.
323*54912308SNavdeep Parhar.It 3
324*54912308SNavdeep Parhardestination MAC in incoming frame is a multicast L2 address that "hit"
325*54912308SNavdeep Parharan entry in the MPS hash table.
326*54912308SNavdeep Parhar.It 4
327*54912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode
328*54912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address, and
329*54912308SNavdeep Parhardoes not match in the MPS TCAM or the MPS hash either.  (The frame would
330*54912308SNavdeep Parharhave been discarded if the interface wasn't in promiscuous mode.)
331*54912308SNavdeep Parhar.It 5
332*54912308SNavdeep Parharinterface on which incoming frame was received is in promiscuous mode
333*54912308SNavdeep Parharand the destination MAC in the frame is not a broadcast address; it
334*54912308SNavdeep Parharwasn't looked up in the MPS TCAM or the MPS hash because the chip is
335*54912308SNavdeep Parharconfigured to give precedence to promiscuous mode classification.
336*54912308SNavdeep Parhar.It 6
337*54912308SNavdeep Parhardestination MAC in incoming frame is a broadcast address.
338*54912308SNavdeep Parhar.It 7
339*54912308SNavdeep ParharNot documented.  Do not use.
340*54912308SNavdeep Parhar.El
341*54912308SNavdeep ParharT}
342*54912308SNavdeep Parhar_
343*54912308SNavdeep Parharfrag	1	T{
344*54912308SNavdeep Parhar.Cm frag Brq 0 | 1
345*54912308SNavdeep ParharT}	T{
346*54912308SNavdeep Parharincoming frame is part of a fragmented IP datagram(1) or not(0).
347*54912308SNavdeep ParharT}
348*54912308SNavdeep Parhar.TE
349*54912308SNavdeep Parhar.It Cm filter Ar idx Ar filter-specification
350*54912308SNavdeep ParharProgram a filter at the index specified by
351*54912308SNavdeep Parhar.Ar idx Ns .
352*54912308SNavdeep Parhar.Ar filter-specification
353*54912308SNavdeep Parharconsists of one or more matches to try against an incoming frame and an
354*54912308SNavdeep Parharaction to perform when all matches succeed.
355*54912308SNavdeep Parhar.It Cm filter Ar idx Cm delete
356*54912308SNavdeep ParharDelete filter that is at the given index.
357*54912308SNavdeep Parhar.It Cm filter Cm list
358*54912308SNavdeep ParharList all filters programmed into the hardware.
359*54912308SNavdeep Parhar.It Cm i2c Ar port_id devaddr addr Op Ar len
360*54912308SNavdeep Parhar.It Cm loadcfg Ar fw-config.txt
361*54912308SNavdeep ParharInstall the firmware configuration file contained in
362*54912308SNavdeep Parhar.Ar fw-config.txt
363*54912308SNavdeep Parharto the card.
364*54912308SNavdeep ParharSet hw.cxgbe.config_file="flash" in loader.conf to get
365*54912308SNavdeep Parhar.Xr cxgbe 4
366*54912308SNavdeep Parharto use the on-flash configuration.
367*54912308SNavdeep Parhar.It Cm loadcfg Cm clear
368*54912308SNavdeep ParharErase configuration file from the card.
369*54912308SNavdeep Parhar.It Cm loadfw Ar fw-image.bin
370*54912308SNavdeep ParharInstall the firmware contained in
371*54912308SNavdeep Parhar.Ar fw-image.bin
372*54912308SNavdeep Parharto the card.
373*54912308SNavdeep Parhar.It Cm memdump Ar addr len
374*54912308SNavdeep ParharDisplay
375*54912308SNavdeep Parhar.Ar len
376*54912308SNavdeep Parharbytes of data of the card's memory starting at
377*54912308SNavdeep Parhar.Ar addr Ns .
378*54912308SNavdeep ParharThe card's memory map is available in
379*54912308SNavdeep Parhar.Va dev.t4nex.%d.misc.meminfo Ns .
380*54912308SNavdeep Parhar.It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
381*54912308SNavdeep Parhar.It Cm regdump Op Ar register-block ...
382*54912308SNavdeep ParharDisplay contents of device registers.  One or more
383*54912308SNavdeep Parhar.Ar register-block
384*54912308SNavdeep Parharcan be specified to limit the registers displayed.
385*54912308SNavdeep ParharThe default is to display registers for all blocks.
386*54912308SNavdeep ParharRegisters with read side effects are not read during a
387*54912308SNavdeep Parhar.Cm regdump
388*54912308SNavdeep Parharoperation.
389*54912308SNavdeep Parhar.Ar register-block
390*54912308SNavdeep Parharcan be
391*54912308SNavdeep Parhar.Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw
392*54912308SNavdeep Parhar.Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns .
393*54912308SNavdeep Parhar.It Cm sched-class config Op Ar param Ar value
394*54912308SNavdeep ParharConfigure optional feature capabilities for the TX scheduler.
395*54912308SNavdeep Parhar.Bl -ohang -offset indent
396*54912308SNavdeep Parhar.It Sy type Ar scheduler-type
397*54912308SNavdeep ParharUse packet for the packet scheduler.
398*54912308SNavdeep Parhar.It Sy minmax Ar value
399*54912308SNavdeep ParharA non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode.
400*54912308SNavdeep Parhar.Pp
401*54912308SNavdeep ParharNOTE:  Many (most) of the parameters and constraints are adapter-specific
402*54912308SNavdeep Parhar- for instance the number of channels and classes which are available
403*54912308SNavdeep Parharwhether various modes are implemented, etc.  Consult the adapter documentation for specific information on any limitations.
404*54912308SNavdeep Parhar.El
405*54912308SNavdeep Parhar.It Cm sched-class params Op Ar param Ar value
406*54912308SNavdeep ParharConfigure parameters for a scheduling class.
407*54912308SNavdeep Parhar.Bl -ohang -offset indent
408*54912308SNavdeep Parhar.It Sy type Ar scheduler-type
409*54912308SNavdeep ParharUse packet for packet scheduler.
410*54912308SNavdeep Parhar.It Sy level Ar scheduler-hierarchy-level
411*54912308SNavdeep ParharThe "level" within the scheduling hierarchy which is being programed:
412*54912308SNavdeep Parhar.Pp
413*54912308SNavdeep Parhar.Bl -tag -width "cl-wrr" -compact -offset indent
414*54912308SNavdeep Parhar.It Sy cl-rl
415*54912308SNavdeep ParharClass Rate Limiting.
416*54912308SNavdeep Parhar.Pp
417*54912308SNavdeep Parhar.It Sy cl-wrr
418*54912308SNavdeep ParharClass Weighted Round Robin.
419*54912308SNavdeep Parhar.Pp
420*54912308SNavdeep Parhar.It Sy cl-wrr
421*54912308SNavdeep ParharChannel Rate Limiting.
422*54912308SNavdeep Parhar.El
423*54912308SNavdeep Parhar.It Sy mode Ar scheduler-mode
424*54912308SNavdeep ParharThe mode in which the scheduling class is going to operate:
425*54912308SNavdeep Parhar.Pp
426*54912308SNavdeep Parhar.Bl -tag -width "class" -compact -offset indent
427*54912308SNavdeep Parhar.It Sy class
428*54912308SNavdeep ParharAll of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints.
429*54912308SNavdeep Parhar.Pp
430*54912308SNavdeep Parhar.It Sy flow
431*54912308SNavdeep ParharEach of the "flows" bound to the scheduling class will be held to the scheduling constraints.
432*54912308SNavdeep Parhar.El
433*54912308SNavdeep Parhar.Pp
434*54912308SNavdeep ParharE.g. if the scheduling class has a TX bandwidth of 10Mb/s, in
435*54912308SNavdeep Parhar.Cm class
436*54912308SNavdeep Parharmode, all of the "flows" bound to the class would be  limited  to  an
437*54912308SNavdeep Parharaggregate bandwidth of 10Mb/s; but in
438*54912308SNavdeep Parhar.Cm flow
439*54912308SNavdeep Parharmode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s.
440*54912308SNavdeep Parhar.It Sy rate-unit Ar scheduler-rate-unit
441*54912308SNavdeep ParharThe units of the scheduler rate constraints:
442*54912308SNavdeep Parhar.Pp
443*54912308SNavdeep Parhar.Bl -tag -width "bits" -compact -offset indent
444*54912308SNavdeep Parhar.It Sy bits
445*54912308SNavdeep Parharbit rate in Kb/s.
446*54912308SNavdeep Parhar.Pp
447*54912308SNavdeep Parhar.It Sy pkts
448*54912308SNavdeep Parharpackets/s.
449*54912308SNavdeep Parhar.El
450*54912308SNavdeep Parhar.It Sy rate-mode Ar scheduler-rate-mode
451*54912308SNavdeep ParharThe mode of the scheduler rate constraints:
452*54912308SNavdeep Parhar.Pp
453*54912308SNavdeep Parhar.Bl -tag -width "relative" -compact -offset indent
454*54912308SNavdeep Parhar.It Sy relative
455*54912308SNavdeep Parharpercent of port rate.
456*54912308SNavdeep Parhar.Pp
457*54912308SNavdeep Parhar.It Sy absolute
458*54912308SNavdeep ParharKb/s.
459*54912308SNavdeep Parhar.El
460*54912308SNavdeep Parhar.It Sy channel Ar scheduler-channel-index
461*54912308SNavdeep ParharThe scheduling channel to which the scheduling class will be bound.
462*54912308SNavdeep Parhar.It Sy class Ar scheduler-class-index
463*54912308SNavdeep ParharThe scheduling class being programmed.
464*54912308SNavdeep Parhar.It Sy min-rate Ar minimum-rate
465*54912308SNavdeep ParharThe minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access.
466*54912308SNavdeep Parhar.It Sy max-rate Ar maximum-rate
467*54912308SNavdeep ParharThe maximum rate for a rate-limiting scheduling class hierarchy.
468*54912308SNavdeep Parhar.It Sy weight Ar round-robin-weight
469*54912308SNavdeep ParharThe weight to be used for a weighted-round-robin scheduling hierarchy.
470*54912308SNavdeep Parhar.It Sy pkt-size Ar average-packet-size
471*54912308SNavdeep ParharThe average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy.
472*54912308SNavdeep Parhar.Pp
473*54912308SNavdeep ParharNOTE:  Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available,
474*54912308SNavdeep Parharwhether various modes are implemented, etc.  Consult the adapter documentation for specific information on any limitations.
475*54912308SNavdeep Parhar.El
476*54912308SNavdeep Parhar.It Cm sched-queue Ar port queue class
477*54912308SNavdeep ParharBind the indicated port's NIC TX
478*54912308SNavdeep Parhar.Ar queue
479*54912308SNavdeep Parharto the specified TX Scheduler
480*54912308SNavdeep Parhar.Ar class.
481*54912308SNavdeep ParharIf the TX
482*54912308SNavdeep Parhar.Ar queue
483*54912308SNavdeep Parharis
484*54912308SNavdeep Parhar.Cm all, *
485*54912308SNavdeep Parharor any negative value, the binding will apply to
486*54912308SNavdeep Parharall  of  the TX queues associated with the
487*54912308SNavdeep Parhar.Ar interface.
488*54912308SNavdeep ParharIf the class is
489*54912308SNavdeep Parhar.Cm unbind, clear
490*54912308SNavdeep Parharor any negative value, the TX queue(s) will be unbound from
491*54912308SNavdeep Parharany current TX Scheduler Class binding.
492*54912308SNavdeep Parhar.It Cm stdio
493*54912308SNavdeep ParharSwitch to interactive mode.
494*54912308SNavdeep Parhar.It Cm tcb Ar tid
495*54912308SNavdeep ParharDisplay contents of the hardware TCB (TCP Control Block) for the
496*54912308SNavdeep Parharconnection identfied by
497*54912308SNavdeep Parhar.Ar tid Ns .
498*54912308SNavdeep Parhar.El
499*54912308SNavdeep Parhar.Sh FILES
500*54912308SNavdeep Parhar/sys/dev/cxgbe/t4_ioctl.h
501*54912308SNavdeep Parhar.Sh AUTHORS
502*54912308SNavdeep ParharThis manual page was written by
503*54912308SNavdeep Parhar.An Navdeep Parhar Aq np@FreeBSD.org .
504