diff --git a/usr.sbin/cxgbetool/cxgbetool.8 b/usr.sbin/cxgbetool/cxgbetool.8 --- a/usr.sbin/cxgbetool/cxgbetool.8 +++ b/usr.sbin/cxgbetool/cxgbetool.8 @@ -159,20 +159,20 @@ queue, or freelist manager. .Bl -tag -width ingress_cntxt_id -compact .It Ar ingress_cntxt_id -context id of an ingress queue -- the value listed in one of -.Va dev.t4nex.%d.fwq.cntxt_id Ns , -.Va dev.cxgbe.%d.rxq.%d.cntxt_id Ns , +context id of an ingress queue - the value listed in one of +.Va dev.t4nex.%d.fwq.cntxt_id , +.Va dev.cxgbe.%d.rxq.%d.cntxt_id , or -.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id Ns . +.Va dev.cxgbe.%d.ofld_rxq.%d.cntxt_id . .It Ar egress_cntxt_id -context id of an egress queue -- the value listed in one of -.Va dev.t4nex.%d.mgmtq.cntxt_id Ns , -.Va dev.cxgbe.%d.txq.%d.cntxt_id Ns , -.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id Ns , -.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id Ns , -.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id Ns , +context id of an egress queue - the value listed in one of +.Va dev.t4nex.%d.mgmtq.cntxt_id , +.Va dev.cxgbe.%d.txq.%d.cntxt_id , +.Va dev.cxgbe.%d.ctrlq.%d.cntxt_id , +.Va dev.cxgbe.%d.ofld_txq.%d.cntxt_id , +.Va dev.cxgbe.%d.rxq.%d.fl.cntxt_id , or -.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id Ns . +.Va dev.cxgbe.%d.ofld_rxq.%d.fl.cntxt_id . Note that freelists are egress queues too. .It Ar flm_cntxt_id context id of a freelist manager. @@ -190,7 +190,7 @@ A full list of match-criteria known to the chip is in the table below but not all can be used together and the firmware sets up the available parameters based on "filterMode" in the configuration file. -Every filter must conform to the filter mode -- multiple match criteria per +Every filter must conform to the filter mode - multiple match criteria per filter are allowed but only from among those in the current setting of the filter mode. The filter mode for hash filters is a subset of that for normal TCAM filters and @@ -205,152 +205,88 @@ Hash filters do not support masked matches. Also note that many of the items being matched are discrete numeric values rather than bit fields and should be masked with caution.) -.TS -center expand; -cb cb cbw(40m) -cb l l. -Criteria Usage Matches if ... -_ -ipv4 T{ -.Cm type ipv4 -T} T{ -incoming packet is an IPv4 datagram. -T} -_ -ipv6 T{ -.Cm type ipv6 -T} T{ -incoming packet is an IPv6 datagram. -T} -_ -sip T{ -.Cm sip Ar addr Ns Op / Ns Ar mask -T} T{ -bitwise and of the source address in an incoming IP datagram with +.Bl -column "Criteria" "Usage " "Matches if ..." +.It Sy Criteria Ta Sy Usage Ta Sy Matches if ... +.It ipv4 Ta Cm type ipv4 Ta incoming packet is an IPv4 datagram. +.It ipv6 Ta Cm type ipv6 Ta incoming packet is an IPv6 datagram. +.It sip Ta Cm sip Ar addr Ns Op / Ns Ar mask Ta bitwise and of the source +address in an incoming IP datagram with .Ar mask equals -.Ar addr Ns . +.Ar addr . .Ar addr can be an IPv4 or IPv6 address. -T} -_ -dip T{ -.Cm dip Ar addr Ns Op / Ns Ar mask -T} T{ -bitwise and of the destination address in an incoming IP datagram with +.It dip Ta Cm dip Ar addr Ns Op / Ns Ar mask Ta bitwise and of the destination +address in an incoming IP datagram with .Ar mask equals -.Ar addr Ns . +.Ar addr . .Ar addr can be an IPv4 or IPv6 address. -T} -_ -sport T{ -.Cm sport Ar port Ns Op : Ns Ar mask -T} T{ -bitwise and of the source port in an incoming TCP or UDP datagram with +.It sport Ta Cm sport Ar port Ns Op : Ns Ar mask Ta bitwise and of the source +port in an incoming TCP or UDP datagram with .Ar mask equals -.Ar port Ns . -T} -_ -dport T{ -.Cm dport Ar port Ns Op : Ns Ar mask -T} T{ -bitwise and of the destination port in an incoming TCP or UDP datagram with +.Ar port . +.It dport Ta Cm dport Ar port Ns Op : Ns Ar mask Ta bitwise and of the +destination port in an incoming TCP or UDP datagram with .Ar mask equals -.Ar port Ns . -T} -_ -fcoe T{ -.Cm fcoe Brq 0 | 1 -T} T{ -incoming frame is Fibre Channel over Ethernet(1) or not(0). -T} -_ -iport T{ -.Cm iport Ar val Ns Op : Ns Ar mask -T} T{ -bitwise and of the ingress port with +.Ar port . +.It fcoe Ta Cm fcoe Brq 0 | 1 Ta incoming frame is Fibre Channel over +Ethernet(1) or not(0). +.It iport Ta Cm iport Ar val Ns Op : Ns Ar mask Ta bitwise and of the ingress +port with .Ar mask equals -.Ar val Ns . +.Ar val . The ingress port is a 3 bit number that identifies the port on which a frame arrived. Physical ports are numbered 0-3 and 4-7 are internal loopback paths within the chip. Note that ingress port is not a bit field so it is not always possible to match an arbitrary subset of ingress ports with a single filter rule. -T} -_ -ovlan T{ -.Cm ovlan Ar tag Ns Op : Ns Ar mask -T} T{ -bitwise and of the 16-bit outer VLAN tag of an incoming frame with +.It ovlan Ta Cm ovlan Ar tag Ns Op : Ns Ar mask Ta bitwise and of the 16-bit +outer VLAN tag of an incoming frame with .Ar mask equals -.Ar tag Ns . -T} -_ -vlan T{ -.Cm vlan Ar tag Ns Op : Ns Ar mask -T} T{ -bitwise and of the 16-bit VLAN tag of an incoming QinQ frame with +.Ar tag . +.It vlan Ta Cm vlan Ar tag Ns Op : Ns Ar mask Ta bitwise and of the 16-bit VLAN +tag of an incoming QinQ frame with .Ar mask equals -.Ar tag Ns . +.Ar tag . The inner VLAN tag is used if the incoming frame is QinQ. -T} -_ -tos T{ -.Cm tos Ar val Ns Op : Ns Ar mask -T} T{ -bitwise and of the 8-bit IP Type of Service/IPv6 Traffic Class in an -incoming packet with +.It tos Ta Cm tos Ar val Ns Op : Ns Ar mask Ta bitwise and of the 8-bit IP Type +of Service/IPv6 Traffic Class in an incoming packet with .Ar mask equals -.Ar val Ns . -T} -_ -proto T{ -.Cm proto Ar ipproto Ns Op : Ns Ar mask -T} T{ -bitwise and of the 8-bit IP protocol in an incoming packet with +.Ar val . +.It proto Ta Cm proto Ar ipproto Ns Op : Ns Ar mask Ta bitwise and of the 8-bit +IP protocol in an incoming packet with .Ar mask equals -.Ar ipproto Ns . -T} -_ -ethtype T{ -.Cm ethtype Ar type Ns Op : Ns Ar mask -T} T{ -bitwise and of the 16-bit Ethernet type field of an incoming frame with +.Ar ipproto . +.It ethtype Ta Cm ethtype Ar type Ns Op : Ns Ar mask Ta bitwise and of the +16-bit Ethernet type field of an incoming frame with .Ar mask equals -.Ar type Ns . -T} -_ -macidx T{ -.Cm macidx Ar idx Ns Op : Ns Ar mask -T} T{ -bitwise and of the MAC Address Match Index of an incoming frame with +.Ar type . +.It macidx Ta Cm macidx Ar idx Ns Op : Ns Ar mask Ta bitwise and of the MAC +Address Match Index of an incoming frame with .Ar mask equals -.Ar idx Ns . +.Ar idx . The MAC Address Match Index refers to an entry in the MPS TCAM or in the -MPS hash. See +MPS hash. +See .Cm matchtype for more information. -T} -_ -matchtype T{ -.Cm matchtype Ar type Ns Op : Ns Ar mask -T} T{ -bitwise and of the Match Type of an incoming frame with +.It matchtype Ta Cm matchtype Ar type Ns Op : Ns Ar mask Ta bitwise and of the +Match Type of an incoming frame with .Ar mask equals -.Ar idx Ns . +.Ar idx . Match Type is one of the following: .Bl -tag -width "n" -compact .It 0 @@ -386,16 +322,12 @@ .It 6 destination MAC in incoming frame is a broadcast address. .It 7 -Not documented. Do not use. +Not documented. +Do not use. +.El +.It frag Ta Cm frag Brq 0 | 1 Ta incoming frame is part of a fragmented IP +datagram(1) or not(0). .El -T} -_ -frag T{ -.Cm frag Brq 0 | 1 -T} T{ -incoming frame is part of a fragmented IP datagram(1) or not(0). -T} -.TE .Pp .Bl -item -compact .It @@ -430,21 +362,22 @@ Hashfilters require an exact value for the 5-tuple (sip, dip, sport, dport, proto) and for any other match-criteria listed in "hashfilter mode". Possible filter actions are -.Cm drop Ns , -.Cm pass Ns , or -.Cm switch Ns . +.Cm drop , +.Cm pass , +or +.Cm switch . .Pp -.Bl -tag -width nat_dport -offset indent -compact Operational parameters that can be used with all filters: +.Bl -tag -width nat_dport -offset indent -compact .It Cm hitcnts Count filter hits: 0 or 1 (default). .It Cm prio Filter has priority over active and server regions of TCAM: 0 (default) or 1. .El .Pp -.Bl -tag -width nat_dport -offset indent -compact Operational parameters that can be used with filters with -.Cm action pass Ns : +.Cm action pass : +.Bl -tag -width nat_dport -offset indent -compact .It Cm queue Context id of an ingress queue to which to deliver the packet. The context id is available in @@ -460,9 +393,9 @@ 0 (default) or 1 .El .Pp -.Bl -tag -width nat_dport -offset indent -compact Operational parameters that can be used with filters with -.Cm action switch Ns : +.Cm action switch : +.Bl -tag -width nat_dport -offset indent -compact .It Cm eport Egress port number on which to send the packet matching the filter. 0 to dev...nports - 1. @@ -485,7 +418,8 @@ .Cm + Ns Ar tag inserts the given tag into the frame. .It Cm nat -Specify the desired NAT mode. Valid NAT modes values are: +Specify the desired NAT mode. +Valid NAT modes values are: .Bl -tag -width dip-dp-sip -compact .It Cm dip Perform NAT on destination IP. @@ -546,12 +480,12 @@ Display .Ar len bytes of data of the card's memory starting at -.Ar addr Ns . +.Ar addr . The card's memory map is available in -.Va dev.t4nex.%d.misc.meminfo Ns . +.Va dev.t4nex.%d.misc.meminfo . .It Cm policy Ar cop.txt Install the Connection Offload Policy (COP) in -.Ar cop.txt Ns . +.Ar cop.txt . A COP offers fine-grained control over which connections get offloaded and with what parameters. Set @@ -592,7 +526,8 @@ Connection was requested by a peer. .It Sy L Listen called on a socket. -Disabling offload in such a rule will prevent a hardware listener from being started. +Disabling offload in such a rule will prevent a hardware listener from being +started. .It Sy D Don't care. Matches all of the above. @@ -645,7 +580,9 @@ Use the specified congestion control algorithm. .Ar algo must be one of -.Cm reno Ns , Cm tahoe Ns , Cm newreno Ns , or Cm highspeed Ns . +.Cm reno , tahoe , newreno , +or +.Cm highspeed . .It Cm class Ar sc Bind the connection to the specified tx scheduling class. Valid range is 0 to 14 (for T4) and 0 to 15 (T5 onwards). @@ -653,17 +590,17 @@ Use the specified offload rx queue. .Ar qnum should be -.Cm random Ns , Cm roundrobin Ns , +.Cm random , roundrobin , or a number between 0 and nofldrxq for the ifnet. .It Cm txq Ar qnum Use the specified offload tx queue. .Ar qnum should be -.Cm random Ns , Cm roundrobin Ns , +.Cm random , roundrobin , or a number between 0 and nofldtxq for the ifnet. .It Cm bind Ar qnum Shorthand for -.Cm rxq Ar qnum Cm txq Ar qnum Ns . +.Cm rxq Ar qnum Cm txq Ar qnum . Use when nofldrxq is the same as nofldtxq. .It Cm mss Ar val Set the advertised TCP MSS in the SYN for this connection to @@ -671,12 +608,11 @@ (in bytes). The hardware MTU table must already have an entry that is suitable for the MSS. .El -.Pp .It Example of a COP. Note that hardware listener for port 22 will be IPv4 only because the rule -before it will prevent any IPv6 servers other than the first two. Also note -that outgoing connections to 192.168/16 are the only outgoing connections that -will get offloaded. +before it will prevent any IPv6 servers other than the first two. +Also note that outgoing connections to 192.168/16 are the only outgoing +connections that will get offloaded. .Bd -literal [L] port 80 => offload [L] port 443 => offload @@ -704,14 +640,15 @@ .Ar register-block can be .Cm sge pci dbg mc ma edc0 edc1 cim tp ulp_rx ulp_tx pmrx pmtx mps cplsw -.Cm smb i2c mi uart pmu sf pl le ncsi xgmac Ns . +.Cm smb i2c mi uart pmu sf pl le ncsi xgmac . .It Cm sched-class config Op Ar param Ar value Configure optional feature capabilities for the TX scheduler. .Bl -ohang -offset indent .It Sy type Ar scheduler-type Use packet for the packet scheduler. .It Sy minmax Ar value -A non-zero value will enable "minmax" mode; a zero value will disable "minmax" mode. +A non-zero value will enable "minmax" mode; a zero value will disable "minmax" +mode. .Pp NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available @@ -741,10 +678,12 @@ .Pp .Bl -tag -width "class" -compact -offset indent .It Sy class -All of the "flows" bound to the scheduling class will be held to aggregate scheduling constraints. +All of the "flows" bound to the scheduling class will be held to aggregate +scheduling constraints. .Pp .It Sy flow -Each of the "flows" bound to the scheduling class will be held to the scheduling constraints. +Each of the "flows" bound to the scheduling class will be held to the scheduling +constraints. .El .Pp E.g. if the scheduling class has a TX bandwidth of 10Mb/s, in @@ -752,7 +691,8 @@ mode, all of the "flows" bound to the class would be limited to an aggregate bandwidth of 10Mb/s; but in .Cm flow -mode, each of the "flows" bound to the scheduling class would be limited to 10Mb/s. +mode, each of the "flows" bound to the scheduling class would be limited to +10Mb/s. .It Sy rate-unit Ar scheduler-rate-unit The units of the scheduler rate constraints: .Pp @@ -778,15 +718,18 @@ .It Sy class Ar scheduler-class-index The scheduling class being programmed. .It Sy min-rate Ar minimum-rate -The minimum guaranteed rate to which a rate-limiting scheduling class hierarchy will have access. +The minimum guaranteed rate to which a rate-limiting scheduling class hierarchy +will have access. .It Sy max-rate Ar maximum-rate The maximum rate for a rate-limiting scheduling class hierarchy. .It Sy weight Ar round-robin-weight The weight to be used for a weighted-round-robin scheduling hierarchy. .It Sy pkt-size Ar average-packet-size -The average packet size will be used to compute scheduler constraints for a rate-limited scheduler class hierarchy. +The average packet size will be used to compute scheduler constraints for a +rate-limited scheduler class hierarchy. .Pp -NOTE: Many (most) of the parameters and constraints are adapter-specific - for instance the number of channels and classes which are available, +NOTE: Many (most) of the parameters and constraints are adapter-specific - for +instance the number of channels and classes which are available, whether various modes are implemented, etc. Consult the adapter documentation for specific information on any limitations. .El @@ -794,14 +737,14 @@ Bind the indicated port's NIC TX .Ar queue to the specified TX Scheduler -.Ar class. +.Ar class . If the TX .Ar queue is .Cm all, * or any negative value, the binding will apply to all of the TX queues associated with the -.Ar interface. +.Ar interface . If the class is .Cm unbind, clear or any negative value, the TX queue(s) will be unbound from @@ -811,7 +754,7 @@ .It Cm tcb Ar tid Display contents of the hardware TCB (TCP Control Block) for the connection identfied by -.Ar tid Ns . +.Ar tid . .El .Sh FILES /sys/dev/cxgbe/t4_ioctl.h