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 loadcfg Ar fw-config.txt
61 .Nm Ar nexus Cm loadcfg clear
63 .Nm Ar nexus Cm loadfw Ar fw-image.bin
65 .Nm Ar nexus Cm memdump Ar addr len
67 .Nm Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
69 .Nm Ar nexus Cm regdump Op Ar register-block ...
71 .Nm Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value
73 .Nm Ar nexus Cm sched-queue Ar port Ar queue Ar class
77 .Nm Ar nexus Cm tcb Ar tid
81 provides command-line access to features and debug facilities exported by
84 The target nexus device,
86 , is always the first argument.
87 (The parent nexus for an Ethernet port
90 .Va dev.cxgbe.%d.%parent
94 The rest consists of a command and any parameters required by that command.
97 .It Cm clearstats Ar port_id
98 Clear all transmit, receive, and error statistics of all queues associated
100 The total number of ports attached to a nexus is listed in
101 .Va dev.t4nex.%d.nports
104 identifies a port within this range.
108 .Cm context ingress Ar ingress_cntxt_id
110 .Cm context cong Ar ingress_cntxt_id
112 .Cm context egress Ar egress_cntxt_id
114 .Cm context fl Ar flm_cntxt_id
116 Display hardware context for an ingress queue, congestion manager, egress
117 queue, or freelist manager.
118 .Bl -tag -width ingress_cntxt_id -compact
119 .It Ar ingress_cntxt_id
120 context id of an ingress queue -- the value listed in one of
121 .Va dev.t4nex.%d.fwq.cntxt_id Ns ,
122 .Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns ,
124 .Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns .
125 .It Ar egress_cntxt_id
126 context id of an egress queue -- the value listed in one of
127 .Va dev.t4nex.%d.mgmtq.cntxt_id Ns ,
128 .Va dev.cxgbe.%d.txq.%d.cntxt_id Ns ,
129 .Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns ,
130 .Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns ,
131 .Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns ,
133 .Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns .
134 Note that freelists are egress queues too.
136 context id of a freelist manager.
137 The FLM context id is displayed in the
138 egress context dump of a freelist as FLMcontextID.
140 .It Cm filter mode Op Ar match-criteria ...
141 Display or set the nexus's filter mode.
143 is a whitespace separated list of criteria from the table below.
144 Each criteria has an associated budget which is also listed in the table.
145 The total budget allowed is 36 and attempts to set a filter mode that
146 exceeds this will be rejected.
147 Every filter must conform to the filter mode -- multiple match criteria
148 per filter are allowed but only from among those in the current setting
150 The filter mode can only be changed when there are no existing filters.
152 .Cm ipv4 ipv6 sip dip sport dport matchtype proto vlan iport fcoe
156 defaults to all 1s when not provided explicitly.
157 Also note that many of the items being matched are discrete numeric
158 values rather than bit fields and should be masked with caution.)
163 Criteria Budget Usage Matches if ...
168 incoming packet is an IPv4 datagram.
174 incoming packet is an IPv6 datagram.
178 .Cm sip Ar addr Ns Op / Ns Ar mask
180 bitwise and of the source address in an incoming IP datagram with
185 can be an IPv4 or IPv6 address.
189 .Cm dip Ar addr Ns Op / Ns Ar mask
191 bitwise and of the destination address in an incoming IP datagram with
196 can be an IPv4 or IPv6 address.
200 .Cm sport Ar port Ns Op : Ns Ar mask
202 bitwise and of the source port in an incoming TCP or UDP datagram with
209 .Cm dport Ar port Ns Op : Ns Ar mask
211 bitwise and of the destination port in an incoming TCP or UDP datagram with
220 incoming frame is Fibre Channel over Ethernet(1) or not(0).
224 .Cm iport Ar val Ns Op : Ns Ar mask
226 bitwise and of the ingress port with
230 The ingress port is a 3 bit number that identifies the port on which a
232 Physical ports are numbered 0-3 and 4-7 are internal loopback paths
234 Note that ingress port is not a bit field so it is not always possible
235 to match an arbitrary subset of ingress ports with a single filter rule.
239 .Cm ovlan Ar tag Ns Op : Ns Ar mask
241 bitwise and of the 16-bit outer VLAN tag of an incoming frame with
248 .Cm vlan Ar tag Ns Op : Ns Ar mask
250 bitwise and of the 16-bit VLAN tag of an incoming QinQ frame with
254 The inner VLAN tag is used if the incoming frame is QinQ.
258 .Cm tos Ar val Ns Op : Ns Ar mask
260 bitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an
268 .Cm proto Ar ipproto Ns Op : Ns Ar mask
270 bitwise and of the 8-bit IP protocol in an incoming packet with
277 .Cm ethtype Ar type Ns Op : Ns Ar mask
279 bitwise and of the 16-bit Ethernet type field of an incoming frame with
286 .Cm macidx Ar idx Ns Op : Ns Ar mask
288 bitwise and of the MAC Address Match Index of an incoming frame with
292 The MAC Address Match Index refers to an entry in the MPS TCAM or in the
295 for more information.
299 .Cm matchtype Ar type Ns Op : Ns Ar mask
301 bitwise and of the Match Type of an incoming frame with
305 Match Type is one of the following:
306 .Bl -tag -width "n" -compact
308 destination MAC in incoming frame is a unicast L2 address that is
309 programmed in the MPS TCAM.
311 can be used to match the index (and thus the MAC address) of the match
314 destination MAC in incoming frame is a unicast L2 address that "hit" a
315 hash entry in the MPS hash table.
317 can be used to match the index of the entry in the MPS hash table.
319 destination MAC in incoming frame is a multicast L2 address that is
320 programmed in the MPS TCAM.
322 can be used to match the index (and thus the MAC address) of the match
325 destination MAC in incoming frame is a multicast L2 address that "hit"
326 an entry in the MPS hash table.
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, and
330 does not match in the MPS TCAM or the MPS hash either. (The frame would
331 have been discarded if the interface wasn't in promiscuous mode.)
333 interface on which incoming frame was received is in promiscuous mode
334 and the destination MAC in the frame is not a broadcast address; it
335 wasn't looked up in the MPS TCAM or the MPS hash because the chip is
336 configured to give precedence to promiscuous mode classification.
338 destination MAC in incoming frame is a broadcast address.
340 Not documented. Do not use.
347 incoming frame is part of a fragmented IP datagram(1) or not(0).
350 .It Cm filter Ar idx Ar filter-specification
351 Program a filter at the index specified by
353 .Ar filter-specification
354 consists of one or more matches to try against an incoming frame and an
355 action to perform when all matches succeed.
356 .It Cm filter Ar idx Cm delete
357 Delete filter that is at the given index.
358 .It Cm filter Cm list
359 List all filters programmed into the hardware.
360 .It Cm i2c Ar port_id devaddr addr Op Ar len
361 .It Cm loadcfg Ar fw-config.txt
362 Install the firmware configuration file contained in
365 Set hw.cxgbe.config_file="flash" in loader.conf to get
367 to use the on-flash configuration.
368 .It Cm loadcfg Cm clear
369 Erase configuration file from the card.
370 .It Cm loadfw Ar fw-image.bin
371 Install the firmware contained in
374 .It Cm memdump Ar addr len
377 bytes of data of the card's memory starting at
379 The card's memory map is available in
380 .Va dev.t4nex.%d.misc.meminfo Ns .
381 .It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val
382 .It Cm regdump Op Ar register-block ...
383 Display contents of device registers.
386 can be specified to limit the registers displayed.
387 The default is to display registers for all blocks.
388 Registers with read side effects are not read during a
393 .Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw
394 .Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns .
395 .It Cm sched-class config Op Ar param Ar value
396 Configure optional feature capabilities for the TX scheduler.
397 .Bl -ohang -offset indent
398 .It Sy type Ar scheduler-type
399 Use packet for the packet scheduler.
400 .It Sy minmax Ar value
401 A non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode.
403 NOTE: Many (most) of the parameters and constraints are adapter-specific
404 - for instance the number of channels and classes which are available
405 whether various modes are implemented, etc.
406 Consult the adapter documentation for specific information on any limitations.
408 .It Cm sched-class params Op Ar param Ar value
409 Configure parameters for a scheduling class.
410 .Bl -ohang -offset indent
411 .It Sy type Ar scheduler-type
412 Use packet for packet scheduler.
413 .It Sy level Ar scheduler-hierarchy-level
414 The "level" within the scheduling hierarchy which is being programed:
416 .Bl -tag -width "cl-wrr" -compact -offset indent
421 Class Weighted Round Robin.
424 Channel Rate Limiting.
426 .It Sy mode Ar scheduler-mode
427 The mode in which the scheduling class is going to operate:
429 .Bl -tag -width "class" -compact -offset indent
431 All of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints.
434 Each of the "flows" bound to the scheduling class will be held to the scheduling constraints.
437 E.g. if the scheduling class has a TX bandwidth of 10Mb/s, in
439 mode, all of the "flows" bound to the class would be limited to an
440 aggregate bandwidth of 10Mb/s; but in
442 mode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s.
443 .It Sy rate-unit Ar scheduler-rate-unit
444 The units of the scheduler rate constraints:
446 .Bl -tag -width "bits" -compact -offset indent
453 .It Sy rate-mode Ar scheduler-rate-mode
454 The mode of the scheduler rate constraints:
456 .Bl -tag -width "relative" -compact -offset indent
458 percent of port rate.
463 .It Sy channel Ar scheduler-channel-index
464 The scheduling channel to which the scheduling class will be bound.
465 .It Sy class Ar scheduler-class-index
466 The scheduling class being programmed.
467 .It Sy min-rate Ar minimum-rate
468 The minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access.
469 .It Sy max-rate Ar maximum-rate
470 The maximum rate for a rate-limiting scheduling class hierarchy.
471 .It Sy weight Ar round-robin-weight
472 The weight to be used for a weighted-round-robin scheduling hierarchy.
473 .It Sy pkt-size Ar average-packet-size
474 The average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy.
476 NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available,
477 whether various modes are implemented, etc.
478 Consult the adapter documentation for specific information on any limitations.
480 .It Cm sched-queue Ar port queue class
481 Bind the indicated port's NIC TX
483 to the specified TX Scheduler
489 or any negative value, the binding will apply to
490 all of the TX queues associated with the
494 or any negative value, the TX queue(s) will be unbound from
495 any current TX Scheduler Class binding.
497 Switch to interactive mode.
499 Display contents of the hardware TCB (TCP Control Block) for the
500 connection identfied by
504 /sys/dev/cxgbe/t4_ioctl.h
506 This manual page was written by
507 .An Navdeep Parhar Aq np@FreeBSD.org .