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