1.\" 2.\" SPDX-License-Identifier: BSD-3-Clause 3.\" 4.\" Copyright (c) 2015, 2018 Chelsio Inc 5.\" All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions are met: 9.\" 10.\" 1. Redistributions of source code must retain the above copyright notice, 11.\" this list of conditions and the following disclaimer. 12.\" 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 17.\" 3. Neither the name of the Chelsio Inc nor the names of its 18.\" contributors may be used to endorse or promote products derived from 19.\" this software without specific prior written permission. 20.\" 21.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 25.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31.\" POSSIBILITY OF SUCH DAMAGE. 32.\" 33.\" * Other names and brands may be claimed as the property of others. 34.\" 35.Dd May 11, 2025 36.Dt CXGBETOOL 8 37.Os 38.Sh NAME 39.Nm cxgbetool 40.Nd userspace companion to Chelsio cxgbe Ethernet driver 41.Sh SYNOPSIS 42.Bl -item -compact 43.It 44.Nm 45.Ar nexus command Op Ar parameter ... 46.Pp 47.It 48.Nm 49.Ar nexus Cm clearstats Ar port_id 50.It 51.Nm 52.Ar nexus Cm clip Bro Cm hold | release Brc Ar ipv6-address 53.It 54.Nm 55.Ar nexus Cm clip Cm list 56.It 57.Nm 58.Ar nexus Cm context Bro Cm ingress | egress | fl | cong Brc Ar cntxt_id 59.It 60.Nm 61.Ar nexus Cm hashfilter mode 62.It 63.Nm 64.Ar nexus Cm hashfilter Ar filter-specification 65.It 66.Nm 67.Ar nexus Cm hashfilter Ar idx Cm delete 68.It 69.Nm 70.Ar nexus Cm hashfilter list 71.It 72.Nm 73.Ar nexus Cm filter mode 74.It 75.Nm 76.Ar nexus Cm filter Ar idx Ar filter-specification 77.It 78.Nm 79.Ar nexus Cm filter Ar idx Cm delete Op Cm prio Bro Cm 0 | 1 Brc 80.It 81.Nm 82.Ar nexus Cm filter list 83.It 84.Nm 85.Ar nexus Cm i2c Ar port_id devaddr addr Op Ar len 86.It 87.Nm 88.Ar nexus Cm loadcfg Ar fw-config.txt 89.It 90.Nm 91.Ar nexus Cm loadcfg clear 92.It 93.Nm 94.Ar nexus Cm loadfw Ar fw-image.bin 95.It 96.Nm 97.Ar nexus Cm memdump Ar addr len 98.It 99.Nm 100.Ar nexus Cm policy Ar cop.txt 101.It 102.Nm 103.Ar nexus Cm policy clear 104.It 105.Nm 106.Ar nexus Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val 107.It 108.Nm 109.Ar nexus Cm regdump Op Ar register-block ... 110.It 111.Nm 112.Ar nexus Cm sched-class Ar sub-command Op Ar param Ar value 113.It 114.Nm 115.Ar nexus Cm sched-queue Ar port Ar queue Ar class 116.It 117.Nm 118.Ar nexus Cm stdio 119.It 120.Nm 121.Ar nexus Cm tcb Ar tid 122.El 123.Sh DESCRIPTION 124.Nm 125provides command-line access to features and debug facilities exported by 126.Xr cxgbe 4 127via private ioctls. 128The target nexus device, 129.Va t4nex%d 130, is always the first argument. 131(The parent nexus for an Ethernet port 132.Va cxgbe%d 133is listed in 134.Va dev.cxgbe.%d.%parent 135in the 136.Xr sysctl 8 137MIB). 138The rest consists of a command and any parameters required by that command. 139.Ss Commands 140.Bl -ohang 141.It Cm clearstats Ar port_id 142Clear all transmit, receive, and error statistics of all queues associated 143with a port. 144The total number of ports attached to a nexus is listed in 145.Va dev.t4nex.%d.nports 146and the 0 based 147.Ar port_id 148identifies a port within this range. 149.Pp 150.Bl -item -compact 151.It 152.Cm clip hold Ar ipv6-address 153.El 154Install a reference on the given 155.Ar ipv6-address 156in the CLIP (Compressed Local IPv6) table. 157The address is added to the CLIP table if it is not present there already. 158.Pp 159.Bl -item -compact 160.It 161.Cm clip list 162.El 163List the contents of the CLIP table. 164.Pp 165.Bl -item -compact 166.It 167.Cm clip release Ar ipv6-address 168.El 169Release a reference on the given 170.Ar ipv6-address 171in the CLIP table. 172A reference on the address must have been acquired previously. 173.Pp 174.Bl -item -compact 175.It 176.Cm context ingress Ar ingress_cntxt_id 177.It 178.Cm context cong Ar ingress_cntxt_id 179.It 180.Cm context egress Ar egress_cntxt_id 181.It 182.Cm context fl Ar flm_cntxt_id 183.El 184Display hardware context for an ingress queue, congestion manager, egress 185queue, or freelist manager. 186.Bl -tag -width "ingress_cntxt_id" -compact 187.It Ar ingress_cntxt_id 188context id of an ingress queue -- the value listed in one of 189.Va dev.t4nex.%d.fwq.cntxt_id , 190.Va dev.cxgbe.%d.rxq.%d.cntxt_id , 191or 192.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id . 193.It Ar egress_cntxt_id 194context id of an egress queue -- the value listed in one of 195.Va dev.t4nex.%d.mgmtq.cntxt_id , 196.Va dev.cxgbe.%d.txq.%d.cntxt_id , 197.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id , 198.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id , 199.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id , 200or 201.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id . 202Note that freelists are egress queues too. 203.It Ar flm_cntxt_id 204context id of a freelist manager. 205The FLM context id is displayed in the 206egress context dump of a freelist as FLMcontextID. 207.El 208.Pp 209.Bl -item -compact 210.It 211.Cm hashfilter mode 212.It 213.Cm filter mode 214.El 215Display a list of match-criteria available for use in filter rules. 216A full list of match-criteria known to the chip is in the table below but not 217all can be used together and the firmware sets up the available parameters based 218on "filterMode" in the configuration file. 219Every filter must conform to the filter mode -- multiple match criteria per 220filter are allowed but only from among those in the current setting of the 221filter mode. 222The filter mode for hash filters is a subset of that for normal TCAM filters and 223depends on the "filterMask" setting in the firmware configuration file. 224Hash filters do not support masked matches and an exact value for every 225parameter in the output of "hashfilter mode" (except ipv4/ipv6) must be provided 226when creating a hash filter. 227.Pp 228(Note that 229.Ar mask 230defaults to all 1s when not provided explicitly. 231Hash filters do not support masked matches. 232Also note that many of the items being matched are discrete numeric 233values rather than bit fields and should be masked with caution.) 234.TS 235center expand; 236cb cb cbw(40m) 237cb l l. 238Criteria Usage Matches if ... 239_ 240ipv4 T{ 241.Cm type ipv4 242T} T{ 243incoming packet is an IPv4 datagram. 244T} 245_ 246ipv6 T{ 247.Cm type ipv6 248T} T{ 249incoming packet is an IPv6 datagram. 250T} 251_ 252sip T{ 253.Cm sip Ar addr Ns Op / Ns Ar mask 254T} T{ 255bitwise and of the source address in an incoming IP datagram with 256.Ar mask 257equals 258.Ar addr . 259.Ar addr 260can be an IPv4 or IPv6 address. 261T} 262_ 263dip T{ 264.Cm dip Ar addr Ns Op / Ns Ar mask 265T} T{ 266bitwise and of the destination address in an incoming IP datagram with 267.Ar mask 268equals 269.Ar addr . 270.Ar addr 271can be an IPv4 or IPv6 address. 272T} 273_ 274sport T{ 275.Cm sport Ar port Ns Op : Ns Ar mask 276T} T{ 277bitwise and of the source port in an incoming TCP or UDP datagram with 278.Ar mask 279equals 280.Ar port . 281T} 282_ 283dport T{ 284.Cm dport Ar port Ns Op : Ns Ar mask 285T} T{ 286bitwise and of the destination port in an incoming TCP or UDP datagram with 287.Ar mask 288equals 289.Ar port . 290T} 291_ 292fcoe T{ 293.Cm fcoe Brq 0 | 1 294T} T{ 295incoming frame is Fibre Channel over Ethernet(1) or not(0). 296T} 297_ 298iport T{ 299.Cm iport Ar val Ns Op : Ns Ar mask 300T} T{ 301bitwise and of the ingress port with 302.Ar mask 303equals 304.Ar val . 305The ingress port is a 3 bit number that identifies the port on which a 306frame arrived. 307Physical ports are numbered 0-3 and 4-7 are internal loopback paths 308within the chip. 309Note that ingress port is not a bit field so it is not always possible 310to match an arbitrary subset of ingress ports with a single filter rule. 311T} 312_ 313ovlan T{ 314.Cm ovlan Ar tag Ns Op : Ns Ar mask 315T} T{ 316bitwise and of the 16-bit outer VLAN tag of an incoming frame with 317.Ar mask 318equals 319.Ar tag . 320T} 321_ 322vlan T{ 323.Cm vlan Ar tag Ns Op : Ns Ar mask 324T} T{ 325bitwise and of the 16-bit VLAN tag of an incoming QinQ frame with 326.Ar mask 327equals 328.Ar tag . 329The inner VLAN tag is used if the incoming frame is QinQ. 330T} 331_ 332tos T{ 333.Cm tos Ar val Ns Op : Ns Ar mask 334T} T{ 335bitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an 336incoming packet with 337.Ar mask 338equals 339.Ar val . 340T} 341_ 342proto T{ 343.Cm proto Ar ipproto Ns Op : Ns Ar mask 344T} T{ 345bitwise and of the 8-bit IP protocol in an incoming packet with 346.Ar mask 347equals 348.Ar ipproto . 349T} 350_ 351ethtype T{ 352.Cm ethtype Ar type Ns Op : Ns Ar mask 353T} T{ 354bitwise and of the 16-bit Ethernet type field of an incoming frame with 355.Ar mask 356equals 357.Ar type . 358T} 359_ 360macidx T{ 361.Cm macidx Ar idx Ns Op : Ns Ar mask 362T} T{ 363bitwise and of the MAC Address Match Index of an incoming frame with 364.Ar mask 365equals 366.Ar idx . 367The MAC Address Match Index refers to an entry in the MPS TCAM or in the 368MPS hash. See 369.Cm matchtype 370for more information. 371T} 372_ 373matchtype T{ 374.Cm matchtype Ar type Ns Op : Ns Ar mask 375T} T{ 376bitwise and of the Match Type of an incoming frame with 377.Ar mask 378equals 379.Ar idx . 380Match Type is one of the following: 381.Bl -tag -width "n" -compact 382.It 0 383destination MAC in incoming frame is a unicast L2 address that is 384programmed in the MPS TCAM. 385.Cm macidx 386can be used to match the index (and thus the MAC address) of the match 387in the TCAM. 388.It 1 389destination MAC in incoming frame is a unicast L2 address that "hit" a 390hash entry in the MPS hash table. 391.Cm macidx 392can be used to match the index of the entry in the MPS hash table. 393.It 2 394destination MAC in incoming frame is a multicast L2 address that is 395programmed in the MPS TCAM. 396.Cm macidx 397can be used to match the index (and thus the MAC address) of the match 398in the TCAM. 399.It 3 400destination MAC in incoming frame is a multicast L2 address that "hit" 401an entry in the MPS hash table. 402.It 4 403interface on which incoming frame was received is in promiscuous mode 404and the destination MAC in the frame is not a broadcast address, and 405does not match in the MPS TCAM or the MPS hash either. (The frame would 406have been discarded if the interface wasn't in promiscuous mode.) 407.It 5 408interface on which incoming frame was received is in promiscuous mode 409and the destination MAC in the frame is not a broadcast address; it 410wasn't looked up in the MPS TCAM or the MPS hash because the chip is 411configured to give precedence to promiscuous mode classification. 412.It 6 413destination MAC in incoming frame is a broadcast address. 414.It 7 415Not documented. Do not use. 416.El 417T} 418_ 419frag T{ 420.Cm frag Brq 0 | 1 421T} T{ 422incoming frame is part of a fragmented IP datagram(1) or not(0). 423T} 424.TE 425.Pp 426.Bl -item -compact 427.It 428.Cm hashfilter Ar filter-specification 429.It 430.Cm filter Ar idx Ar filter-specification 431.El 432Program a filter. 433.Pp 434TCAM filters: The number of available filters is in 435dev.<nexus>.<instance>.nfilters. 436.Ar idx 437must be an unused index between 0 and nfilters - 1. 438IPv6 filters consume 4 consecutive entries on T4/T5 and 2 on T6 and 439.Ar idx 440must be aligned to 4 or 2 in this case. 441.Pp 442Hash filters: These reside in the card's memory instead of its TCAM and are 443enabled with a special configuration file that is selected with 444.Cm hw.cxgbe.config_file="hashfilter" 445in loader.conf. 446There are at least half a million filters available with the sample config 447shipped with the driver. 448Note that the hardware selects the index for a hashfilter and this index is 449displayed when the filter is created. 450Hash and TCAM filters can be used together. 451.Pp 452.Ar filter-specification 453consists of one or more matches (see Usage in the table above) to try against an 454incoming frame, an action to perform when all matches succeed, and some 455additional operational parameters. 456Hashfilters require an exact value for the 5-tuple (sip, dip, sport, dport, 457proto) and for any other match-criteria listed in "hashfilter mode". 458Possible filter actions are 459.Cm drop , 460.Cm pass , or 461.Cm switch . 462.Pp 463Operational parameters that can be used with all filters: 464.Bl -tag -width "nat_dport" -offset indent -compact 465.It Cm hitcnts 466Count filter hits: 0 or 1 (default). 467.It Cm prio 468Filter has priority over active and server regions of TCAM: 0 (default) or 1. 469.El 470.Pp 471Operational parameters that can be used with filters with 472.Cm action pass : 473.Bl -tag -width "nat_dport" -offset indent -compact 474.It Cm queue 475Context id of an ingress queue to which to deliver the packet. 476The context id is available in 477.Va dev.cxgbe.%d.rxq.%d.cntxt_id . 478By default, packets that hit a filter with action pass are delivered based on 479their RSS hash as usual. 480Use this to steer them to a particular queue. 481.It Cm rpttid 482Report the filter tid instead of the RSS hash in the rx descriptor. 4830 (default) or 1. 484.It Cm tcbhash 485Select TCB hash information in rx descriptor. 4860 (default) or 1 487.El 488.Pp 489Operational parameters that can be used with filters with 490.Cm action switch : 491.Bl -tag -width "nat_dport" -offset indent -compact 492.It Cm eport 493Egress port number on which to send the packet matching the filter. 4940 to dev.<nexus>.<instance>.nports - 1. 495.It Cm dmac 496Replace packet destination MAC address with the one provided before switching 497it out of eport. 498.It Cm smac 499Replace packet source MAC address with the one provided before switching it 500out of eport. 501.It Cm swapmac 502Swap packet source and destination MAC addresses before switching it out of 503eport. 504.It Cm vlan 505Insert, remove, or rewrite the VLAN tag before switching the packet out of 506eport. 507.Cm none 508removes the tag, 509.Cm = Ns Ar tag 510replaces the existing tag with the one provided, and 511.Cm + Ns Ar tag 512inserts the given tag into the frame. 513.It Cm nat 514Specify the desired NAT mode. 515Valid NAT modes values are: 516.Bl -tag -width "dip-dp-sip" -compact 517.It Cm dip 518Perform NAT on destination IP. 519.It Cm dip-dp 520Perform NAT on destination IP, destination port. 521.It Cm dip-dp-sip 522Perform NAT on destination IP, destination port, source IP. 523.It Cm dip-dp-sp 524Perform NAT on destination IP, destination port, source port. 525.It Cm sip-sp 526Perform NAT on source IP, source port. 527.It Cm dip-sip-sp 528Perform NAT on destination IP, source IP, source port. 529.It Cm all 530Perform NAT on all 4-tuple fields. 531.El 532.It Cm natflag 533Perform NAT only on segments which do not have TCP FIN or RST set. 534.It Cm natseq 535Perform NAT only if incoming segment's sequence number + payload length is less 536than this supplied value. 537.It Cm nat_dip 538Perform NAT using this destination IP. 539.It Cm nat_sip 540Perform NAT using this source IP. 541.It Cm nat_dport 542Perform NAT using this destination port. 543.It Cm nat_sport 544Perform NAT using this source port. 545Perform NAT only if incoming segment's sequence number + payload length is less 546than this supplied value. 547.El 548.Pp 549.Bl -item -compact 550.It 551.Cm hashfilter Ar idx Cm delete 552.It 553.Cm filter Ar idx Cm delete 554.El 555Delete filter that is at the given index. 556.It Cm filter Cm list 557List all filters programmed into the hardware. 558.It Cm i2c Ar port_id devaddr addr Op Ar len 559.It Cm loadcfg Ar fw-config.txt 560Install the firmware configuration file contained in 561.Ar fw-config.txt 562to the card. 563Set 564.Cm hw.cxgbe.config_file="flash" 565in loader.conf to get 566.Xr cxgbe 4 567to use the on-flash configuration. 568.It Cm loadcfg Cm clear 569Erase configuration file from the card. 570.It Cm loadfw Ar fw-image.bin 571Install the firmware contained in 572.Ar fw-image.bin 573to the card. 574.It Cm memdump Ar addr len 575Display 576.Ar len 577bytes of data of the card's memory starting at 578.Ar addr . 579The card's memory map is available in 580.Va dev.t4nex.%d.misc.meminfo . 581.It Cm policy Ar cop.txt 582Install the Connection Offload Policy (COP) in 583.Ar cop.txt . 584A COP offers fine-grained control over which connections get offloaded and with 585what parameters. 586Set 587.Cm hw.cxgbe.toe.cop_managed_offloading="1" 588in loader.conf to ensure that t4_tom will not offload any connection before a 589COP is installed. 590Note that t4_tom must be loaded and operational (IFCAP_TOE enabled) as always 591for any kind of offload based on the hardware TOE. 592.Bl -column -offset indent "COP installed" "cop_managed_offloading" "Behavior" 593.It Sy COP installed Ta Sy cop_managed_offloading Ta Sy Behavior 594.It NO Ta 0 Ta offload all [Default] 595.It NO Ta 1 Ta no offload 596.It YES Ta Don't Care Ta Rule based offload 597.El 598.Pp 599The policy file consists of empty lines, comments (lines beginning with #) and 600any number of rules. 601Rules are applied in the order they appear in the file and processing stops at 602the first match. 603There is an implicit rule that disables offload for connections that do not 604match anything in the policy. 605.Pp 606Each rule consists of a filter part, which determines what connections the 607rule applies to, and a settings part, which determines whether matching 608connections will be offloaded and, if so, with what settings. 609The general form of a rule is 610.Bl -ohang -offset indent 611.It Cm \&[ Ar socket-type Cm \&] Ar pcap-filter Cm => Ar settings 612.Pp 613.Ar socket-type 614is one of the following. 615.Bl -tag -width "X" -compact 616.It Sy A 617Active open. 618Connection is being opened by this host. 619.It Sy P 620Passive open. 621Connection was requested by a peer. 622.It Sy L 623Listen called on a socket. 624Disabling offload in such a rule will prevent a hardware listener from being started. 625.It Sy D 626Don't care. 627Matches all of the above. 628.El 629.Pp 630.Ar pcap-filter 631is an expression that follows the 632.Xr pcap-filter 7 633syntax, or it is the keyword 634.Cm all 635that matches everything. 636.Pp 637.Ar settings 638determine whether connections matching 639.Ar socket-type 640and 641.Ar pcap-filter 642are offloaded and optionally sets some per-connection properties if they are. 643A combination of the following is allowed. 644.Bl -tag -width "timestamp" -compact 645.It Cm offload 646Connection should be offloaded. 647Use 648.Cm !offload 649or 650.Cm not offload 651to disable offload instead. 652.It Cm coalesce 653Enable rx payload coalescing. 654Negate to disable. 655.It Cm timestamp 656Enable TCP timestamp option. 657Negate to disable. 658.It Cm sack 659Enable TCP Selective Acknowledgements (SACK). 660Negate to disable. 661.It Cm nagle 662Enable Nagle's algorithm. 663Negate to disable. 664.It Cm ecn 665Enable Explicit Congestion Notification (ECN). 666Negate to disable. 667.It Cm ddp 668Use Direct Data Placement (zero copy receive) and zero copy transmit on the 669connection to service AIO requests on the socket. 670Negate to disable. 671.It Cm tls 672Set ULP mode to ULP_MODE_TLS. 673.It Cm cong Ar algo 674Use the specified congestion control algorithm. 675.Ar algo 676must be one of 677.Cm reno , Cm tahoe , Cm newreno , or Cm highspeed . 678.It Cm class Ar sc 679Bind the connection to the specified tx scheduling class. 680Valid range is 0 to 14 (for T4) and 0 to 15 (T5 onwards). 681.It Cm rxq Ar qnum 682Use the specified offload rx queue. 683.Ar qnum 684should be 685.Cm random , Cm roundrobin , 686or a number between 0 and nofldrxq for the ifnet. 687.It Cm txq Ar qnum 688Use the specified offload tx queue. 689.Ar qnum 690should be 691.Cm random , Cm roundrobin , 692or a number between 0 and nofldtxq for the ifnet. 693.It Cm bind Ar qnum 694Shorthand for 695.Cm rxq Ar qnum Cm txq Ar qnum . 696Use when nofldrxq is the same as nofldtxq. 697.It Cm mss Ar val 698Set the advertised TCP MSS in the SYN for this connection to 699.Ar val 700(in bytes). 701The hardware MTU table must already have an entry that is suitable for the MSS. 702.El 703.It Example of a COP. 704Note that hardware listener for port 22 will be IPv4 only because the rule 705before it will prevent any IPv6 servers other than the first two. 706Also note 707that outgoing connections to 192.168/16 are the only outgoing connections that 708will get offloaded. 709.Bd -literal 710[L] port 80 => offload 711[L] port 443 => offload 712[L] ip6 => !offload 713[L] port 22 => offload 714[P] dst port 80 => offload cong highspeed !sack !ecn 715[P] dst port 443 => offload tls 716[A] dst net 192.168/16 => offload 717[A] all => !offload 718[D] port 22 => offload !nagle 719.Ed 720.El 721.It Cm policy clear 722Remove the Connection Offload Policy (COP) if one is in use. 723.It Bro Cm reg | reg64 Brc Ar addr Ns Op Ar =val 724.It Cm regdump Op Ar register-block ... 725Display contents of device registers. 726One or more 727.Ar register-block 728can be specified to limit the registers displayed. 729The default is to display registers for all blocks. 730Registers with read side effects are not read during a 731.Cm regdump 732operation. 733.Ar register-block 734can be 735.Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw 736.Cm smb i2c mi uart pmu sf pl le ncsi xgmac . 737.It Cm sched-class config Op Ar param Ar value 738Configure optional feature capabilities for the TX scheduler. 739.Bl -ohang -offset indent 740.It Sy type Ar scheduler-type 741Use packet for the packet scheduler. 742.It Sy minmax Ar value 743A non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode. 744.Pp 745NOTE: Many (most) of the parameters and constraints are adapter-specific 746- for instance the number of channels and classes which are available 747whether various modes are implemented, etc. 748Consult the adapter documentation for specific information on any limitations. 749.El 750.It Cm sched-class params Op Ar param Ar value 751Configure parameters for a scheduling class. 752.Bl -ohang -offset indent 753.It Sy type Ar scheduler-type 754Use packet for packet scheduler. 755.It Sy level Ar scheduler-hierarchy-level 756The "level" within the scheduling hierarchy which is being programed: 757.Pp 758.Bl -tag -width "cl-wrr" -compact -offset indent 759.It Sy cl-rl 760Class Rate Limiting. 761.Pp 762.It Sy cl-wrr 763Class Weighted Round Robin. 764.Pp 765.It Sy ch-rl 766Channel Rate Limiting. 767.El 768.It Sy mode Ar scheduler-mode 769The mode in which the scheduling class is going to operate: 770.Pp 771.Bl -tag -width "class" -compact -offset indent 772.It Sy class 773All of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints. 774.Pp 775.It Sy flow 776Each of the "flows" bound to the scheduling class will be held to the scheduling constraints. 777.El 778.Pp 779E.g. if the scheduling class has a TX bandwidth of 10Mb/s, in 780.Cm class 781mode, all of the "flows" bound to the class would be limited to an 782aggregate bandwidth of 10Mb/s; but in 783.Cm flow 784mode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s. 785.It Sy rate-unit Ar scheduler-rate-unit 786The units of the scheduler rate constraints: 787.Pp 788.Bl -tag -width "bits" -compact -offset indent 789.It Sy bits 790bit rate in Kb/s. 791.Pp 792.It Sy pkts 793packets/s. 794.El 795.It Sy rate-mode Ar scheduler-rate-mode 796The mode of the scheduler rate constraints: 797.Pp 798.Bl -tag -width "relative" -compact -offset indent 799.It Sy relative 800percent of port rate. 801.Pp 802.It Sy absolute 803Kb/s. 804.El 805.It Sy channel Ar scheduler-channel-index 806The scheduling channel to which the scheduling class will be bound. 807.It Sy class Ar scheduler-class-index 808The scheduling class being programmed. 809.It Sy min-rate Ar minimum-rate 810The minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access. 811.It Sy max-rate Ar maximum-rate 812The maximum rate for a rate-limiting scheduling class hierarchy. 813.It Sy weight Ar round-robin-weight 814The weight to be used for a weighted-round-robin scheduling hierarchy. 815.It Sy pkt-size Ar average-packet-size 816The average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy. 817.Pp 818NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available, 819whether various modes are implemented, etc. 820Consult the adapter documentation for specific information on any limitations. 821.El 822.It Cm sched-queue Ar port queue class 823Bind the indicated port's NIC TX 824.Ar queue 825to the specified TX Scheduler 826.Ar class . 827If the TX 828.Ar queue 829is 830.Cm all, * 831or any negative value, the binding will apply to 832all of the TX queues associated with the 833.Ar interface . 834If the class is 835.Cm unbind, clear 836or any negative value, the TX queue(s) will be unbound from 837any current TX Scheduler Class binding. 838.It Cm stdio 839Switch to interactive mode. 840.It Cm tcb Ar tid 841Display contents of the hardware TCB (TCP Control Block) for the 842connection identfied by 843.Ar tid . 844.El 845.Sh FILES 846/sys/dev/cxgbe/t4_ioctl.h 847.Sh AUTHORS 848This manual page was written by 849.An Navdeep Parhar Aq np@FreeBSD.org . 850