1 .\" Copyright (c) 2015, Chelsio Inc
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions are met:
7 .\" 1. Redistributions of source code must retain the above copyright notice,
8 .\" this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the Chelsio Inc nor the names of its
15 .\" contributors may be used to endorse or promote products derived from
16 .\" this software without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 .\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22 .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
30 .\" * Other names and brands may be claimed as the property of others.
39 .Nd Userspace companion to
44 .Nm Ar nexus command Op Ar parameter ...
47 .Nm Ar nexus Cm clearstats Ar port_id
49 .Nm Ar nexus Cm context Bro Cm ingress | egress | fl | cong Brc Ar cntxt_id
51 .Nm Ar nexus Cm filter mode Op Ar match-criteria ...
53 .Nm Ar nexus Cm filter Ar idx Bro Ar filter-specification | Cm delete Brc
55 .Nm Ar nexus Cm filter list
57 .Nm Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len
59 .Nm Ar nexus Cm loadfw Ar fw-image.bin
61 .Nm Ar nexus Cm memdump Ar addr len
63 .Nm Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
65 .Nm Ar nexus Cm regdump Op Ar register-block ...
67 .Nm Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value
69 .Nm Ar nexus Cm sched-queue Ar port Ar queue Ar class
73 .Nm Ar nexus Cm tcb Ar tid
77 provides command-line access to features and debug facilities exported by
80 The target nexus device,
82 , is always the first argument.
83 (The parent nexus for an Ethernet port
86 .Va dev.cxgbe.%d.%parent
90 The rest consists of a command and any parameters required by that command.
93 .It Cm clearstats Ar port_id
94 Clear all transmit, receive, and error statistics of all queues associated
96 The total number of ports attached to a nexus is listed in
97 .Va dev.t4nex.%d.nports
100 identifies a port within this range.
104 .Cm context ingress Ar ingress_cntxt_id
106 .Cm context cong Ar ingress_cntxt_id
108 .Cm context egress Ar egress_cntxt_id
110 .Cm context fl Ar flm_cntxt_id
112 Display hardware context for an ingress queue, congestion manager, egress
113 queue, or freelist manager.
114 .Bl -tag -width ingress_cntxt_id -compact
115 .It Ar ingress_cntxt_id
116 context id of an ingress queue -- the value listed in one of
117 .Va dev.t4nex.%d.fwq.cntxt_id Ns ,
118 .Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns ,
120 .Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns .
121 .It Ar egress_cntxt_id
122 context id of an egress queue -- the value listed in one of
123 .Va dev.t4nex.%d.mgmtq.cntxt_id Ns ,
124 .Va dev.cxgbe.%d.txq.%d.cntxt_id Ns ,
125 .Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns ,
126 .Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns ,
127 .Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns ,
129 .Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns .
130 Note that freelists are egress queues too.
132 context id of a freelist manager. The FLM context id is displayed in the
133 egress context dump of a freelist as FLMcontextID.
135 .It Cm filter mode Op Ar match-criteria ...
136 Display or set the nexus's filter mode.
138 is a whitespace separated list of criteria from the table below.
139 Each criteria has an associated budget which is also listed in the table.
140 The total budget allowed is 36 and attempts to set a filter mode that
141 exceeds this will be rejected.
142 Every filter must conform to the filter mode -- multiple match criteria
143 per filter are allowed but only from among those in the current setting
145 The filter mode can only be changed when there are no existing filters.
147 .Cm ipv4 ipv6 sip dip sport dport matchtype proto vlan iport fcoe
151 defaults to all 1s when not provided explicitly.
152 Also note that many of the items being matched are discrete numeric
153 values rather than bit fields and should be masked with caution.)
158 Criteria Budget Usage Matches if ...
163 incoming packet is an IPv4 datagram.
169 incoming packet is an IPv6 datagram.
173 .Cm sip Ar addr Ns Op / Ns Ar mask
175 bitwise and of the source address in an incoming IP datagram with
180 can be an IPv4 or IPv6 address.
184 .Cm dip Ar addr Ns Op / Ns Ar mask
186 bitwise and of the destination address in an incoming IP datagram with
191 can be an IPv4 or IPv6 address.
195 .Cm sport Ar port Ns Op : Ns Ar mask
197 bitwise and of the source port in an incoming TCP or UDP datagram with
204 .Cm dport Ar port Ns Op : Ns Ar mask
206 bitwise and of the destination port in an incoming TCP or UDP datagram with
215 incoming frame is Fibre Channel over Ethernet(1) or not(0).
219 .Cm iport Ar val Ns Op : Ns Ar mask
221 bitwise and of the ingress port with
225 The ingress port is a 3 bit number that identifies the port on which a
227 Physical ports are numbered 0-3 and 4-7 are internal loopback paths
229 Note that ingress port is not a bit field so it is not always possible
230 to match an arbitrary subset of ingress ports with a single filter rule.
234 .Cm ovlan Ar tag Ns Op : Ns Ar mask
236 bitwise and of the 16-bit outer VLAN tag of an incoming frame with
243 .Cm vlan Ar tag Ns Op : Ns Ar mask
245 bitwise and of the 16-bit VLAN tag of an incoming QinQ frame with
249 The inner VLAN tag is used if the incoming frame is QinQ.
253 .Cm tos Ar val Ns Op : Ns Ar mask
255 bitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an
263 .Cm proto Ar ipproto Ns Op : Ns Ar mask
265 bitwise and of the 8-bit IP protocol in an incoming packet with
272 .Cm ethtype Ar type Ns Op : Ns Ar mask
274 bitwise and of the 16-bit Ethernet type field of an incoming frame with
281 .Cm macidx Ar idx Ns Op : Ns Ar mask
283 bitwise and of the MAC Address Match Index of an incoming frame with
287 The MAC Address Match Index refers to an entry in the MPS TCAM or in the
290 for more information.
294 .Cm matchtype Ar type Ns Op : Ns Ar mask
296 bitwise and of the Match Type of an incoming frame with
300 Match Type is one of the following:
301 .Bl -tag -width "n" -compact
303 destination MAC in incoming frame is a unicast L2 address that is
304 programmed in the MPS TCAM.
306 can be used to match the index (and thus the MAC address) of the match
309 destination MAC in incoming frame is a unicast L2 address that "hit" a
310 hash entry in the MPS hash table.
312 can be used to match the index of the entry in the MPS hash table.
314 destination MAC in incoming frame is a multicast L2 address that is
315 programmed in the MPS TCAM.
317 can be used to match the index (and thus the MAC address) of the match
320 destination MAC in incoming frame is a multicast L2 address that "hit"
321 an entry in the MPS hash table.
323 interface on which incoming frame was received is in promiscuous mode
324 and the destination MAC in the frame is not a broadcast address, and
325 does not match in the MPS TCAM or the MPS hash either. (The frame would
326 have been discarded if the interface wasn't in promiscuous mode.)
328 interface on which incoming frame was received is in promiscuous mode
329 and the destination MAC in the frame is not a broadcast address; it
330 wasn't looked up in the MPS TCAM or the MPS hash because the chip is
331 configured to give precedence to promiscuous mode classification.
333 destination MAC in incoming frame is a broadcast address.
335 Not documented. Do not use.
342 incoming frame is part of a fragmented IP datagram(1) or not(0).
345 .It Cm filter Ar idx Ar filter-specification
346 Program a filter at the index specified by
348 .Ar filter-specification
349 consists of one or more matches to try against an incoming frame and an
350 action to perform when all matches succeed.
351 .It Cm filter Ar idx Cm delete
352 Delete filter that is at the given index.
353 .It Cm filter Cm list
354 List all filters programmed into the hardware.
355 .It Cm i2c Ar port_id devaddr addr Op Ar len
356 .It Cm loadfw Ar fw-image.bin
357 Install the firmware contained in
360 .It Cm memdump Ar addr len
363 bytes of data of the card's memory starting at
365 The card's memory map is available in
366 .Va dev.t4nex.%d.misc.meminfo Ns .
367 .It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
368 .It Cm regdump Op Ar register-block ...
369 Display contents of device registers. One or more
371 can be specified to limit the registers displayed.
372 The default is to display registers for all blocks.
373 Registers with read side effects are not read during a
378 .Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw
379 .Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns .
380 .It Cm sched-class config Op Ar param Ar value
381 Configure optional feature capabilities for the TX scheduler.
382 .Bl -ohang -offset indent
383 .It Sy type Ar scheduler-type
384 Use packet for the packet scheduler.
385 .It Sy minmax Ar value
386 A non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode.
388 NOTE: Many (most) of the parameters and constraints are adapter-specific
389 - for instance the number of channels and classes which are available
390 whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations.
392 .It Cm sched-class params Op Ar param Ar value
393 Configure parameters for a scheduling class.
394 .Bl -ohang -offset indent
395 .It Sy type Ar scheduler-type
396 Use packet for packet scheduler.
397 .It Sy level Ar scheduler-hierarchy-level
398 The "level" within the scheduling hierarchy which is being programed:
400 .Bl -tag -width "cl-wrr" -compact -offset indent
405 Class Weighted Round Robin.
408 Channel Rate Limiting.
410 .It Sy mode Ar scheduler-mode
411 The mode in which the scheduling class is going to operate:
413 .Bl -tag -width "class" -compact -offset indent
415 All of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints.
418 Each of the "flows" bound to the scheduling class will be held to the scheduling constraints.
421 E.g. if the scheduling class has a TX bandwidth of 10Mb/s, in
423 mode, all of the "flows" bound to the class would be limited to an
424 aggregate bandwidth of 10Mb/s; but in
426 mode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s.
427 .It Sy rate-unit Ar scheduler-rate-unit
428 The units of the scheduler rate constraints:
430 .Bl -tag -width "bits" -compact -offset indent
437 .It Sy rate-mode Ar scheduler-rate-mode
438 The mode of the scheduler rate constraints:
440 .Bl -tag -width "relative" -compact -offset indent
442 percent of port rate.
447 .It Sy channel Ar scheduler-channel-index
448 The scheduling channel to which the scheduling class will be bound.
449 .It Sy class Ar scheduler-class-index
450 The scheduling class being programmed.
451 .It Sy min-rate Ar minimum-rate
452 The minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access.
453 .It Sy max-rate Ar maximum-rate
454 The maximum rate for a rate-limiting scheduling class hierarchy.
455 .It Sy weight Ar round-robin-weight
456 The weight to be used for a weighted-round-robin scheduling hierarchy.
457 .It Sy pkt-size Ar average-packet-size
458 The average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy.
460 NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available,
461 whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations.
463 .It Cm sched-queue Ar port queue class
464 Bind the indicated port's NIC TX
466 to the specified TX Scheduler
472 or any negative value, the binding will apply to
473 all of the TX queues associated with the
477 or any negative value, the TX queue(s) will be unbound from
478 any current TX Scheduler Class binding.
480 Switch to interactive mode.
482 Display contents of the hardware TCB (TCP Control Block) for the
483 connection identfied by
487 /sys/dev/cxgbe/t4_ioctl.h
489 This manual page was written by
490 .An Navdeep Parhar Aq np@FreeBSD.org .