Usage¶
In this section, it is assumed that Virtual Accelerator has been properly installed and configured. See Getting Started for more details.
Configuring the Fast Path QoS - Exception Rate Limitation¶
Adding the Fast Path QoS - Exception Rate Limitation rule¶
Synopsis
tc-erl-add <CIR> <CBS> <EIR> <EBS> [G|M|K]pps|bps
Parameters
- <CIR>
CIR. Expressed in:
multiples of bps
multiples of pps
- <CBS>
CBS. Expressed in:
bytes
packets
A committed depth of 0 disables a flow-based traffic conditioner rule.
- <EIR>
EIR. Expressed in the same unit as CIR.
- <EBS>
EBS. Expressed in the same unit as CBS.
[G|M|K]pps|bps
Unit and multiplier used for CIR, CBS, EIR and EBS.
pps means that values are expressed in terms of packets:
rates are multiples of pps (CIR and EIR)
burst sizes are in packets (CBS and EBS)
bps means that values are expressed in terms of bits.
rates are multiples of bps (CIR and EIR)
burst sizes are in bytes (CBS and EBS)
G, M and K multipliers apply to rates (CIR and EIR). They do not apply to burst sizes (CBS and EBS).
multipliers are powers of 1000 (K=1000, M=10002, G=10003)
Example
<fp-0> tc-erl-add 4000 512000 0 0 Kbps
Deleting the Fast Path QoS - Exception Rate Limitation rule¶
Synopsis
tc-erl-del
Example
<fp-0> tc-erl-del
Displaying the Fast Path QoS - Exception Rate Limitation rule¶
Synopsis
tc-erl
Example
<fp-0> tc-erl
tc-erl rule:
CIR = 4095996 bps
CBS = 512000
EIR = 0 bps
EBS = 0
Displaying the Fast Path QoS - Exception Rate Limitation statistics¶
Synopsis
tc-erl-stats
Example
<fp-0> tc-erl-stats
tc-erl statistics:
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
Resetting the Fast Path QoS - Exception Rate Limitation statistics¶
Synopsis
tc-erl-stats-reset
Example
<fp-0> tc-erl-stats-reset
Setting a Fast Path QoS - Exception Rate Limitation DSCP class¶
Synopsis
tc-erl-dscp-class-set <dscp_value> <dscp_class>
Parameters
- <dscp_value>
TOS value to be associated with a DSCP class.
Can be expressed in base 10 or 16, if preceded with ‘0x’.
- <dscp_class>
DSCP class of the value.
Example
<fp-0> tc-erl-dscp-class-set 0x20 3
<fp-0> tc-erl-dscp-class-set 34 3
Resetting a Fast Path QoS - Exception Rate Limitation DSCP class¶
Synopsis
tc-erl-dscp-class-reset [dscp_class]
Parameters
- [dscp_class]
Optional DSCP class to be reset.
If none is provided, all DSCP classes are reset.
Example
<fp-0> tc-erl-dscp-class-reset 3
Displaying a Fast Path QoS - Exception Rate Limitation DSCP class¶
Synopsis
tc-erl-dscp-class [dscp_class]
Parameters
- [dscp_class]
Optional DSCP class to be displayed.
If none is provided, all DSCP classes are displayed.
Example
<fp-0> tc-erl-dscp-class 3
<fp-0> tc-erl-dscp-class
Adding a Fast Path QoS - Exception Rate Limitation DSCP filter¶
Synopsis
tc-erl-dscp-cp-filter-add <if_name> <dscp_class>
Parameters
- <if_name>
Interface name, physical or virtual.
Each interface uses a filter slot, which are limited to
16
.- <dscp_class>
The DSCP class to be prioritized. Any packet having a DSCP value associated with this class and originating from this interface will be matched, marking this packet as high-priority.
The values
any
orall
can be used to match all packets originating from this interface.
Example
<fp-0> tc-erl-dscp-cp-filter-add eth0 3
<fp-0> tc-erl-dscp-cp-filter-add eth1 any
Deleting a Fast Path QoS - Exception Rate Limitation DSCP filter¶
Synopsis
tc-erl-dscp-cp-filter-del <if_name> <dscp_class>
Parameters
- <if_name>
Interface name, physical or virtual.
- <dscp_class>
The DSCP class currently matched.
The values
any
orall
can be used to completely remove the filter from this interface, freeing a slot for a new filter to be inserted eventually.
Example
<fp-0> tc-erl-dscp-cp-filter-del eth1 3
<fp-0> tc-erl-dscp-cp-filter-del eth0 all
Displaying a Fast Path QoS - Exception Rate Limitation DSCP filter¶
Synopsis
tc-erl-dscp-cp-filter [if_name]
Parameters
- [if_name]
Optional interface name, physical or virtual. If provided, only the CP filter associated with this interface is displayed.
Example
<fp-0> tc-erl-dscp-cp-filter eth1
<fp-0> tc-erl-dscp-cp-filter
Adding a Fast Path QoS - Exception Rate Limitation DSCP traffic conditioner rule¶
Synopsis
tc-erl-if-dscp-add <if_name> <dscp class> <CIR> <CBS> <EIR> <EBS> [G|M|K]pps|bps
Parameters
Each traffic conditioner rule uses a slot, which are limited to 16
.
- <if_name>
Interface name, physical or virtual.
- <dscp_class>
The DSCP class to be rate-limited. If set, only packets having DSCP value of this class will be matched by the associated traffic conditioner rule. If set, any packet having a DSCP value associated with this class and originating from this interface will be matched, and the traffic conditioner rule will be applied.
The values
any
orall
can be used to signify that any DSCP value (even0
) would match the traffic conditioner rule.Several traffic conditioner rules can be set for the same interface, if their associated DSCP classes are different. In some cases, when the specified DSCP class is
any
orall
, then the most specific rule applies first (the one with a specific DSCP class), then the catch-all rule will match (DSCP class isany
orall
).If a new rule is given for an (if_name, DSCP class) pair, the old one is updated with the new parameters.
- <CIR>
CIR. Expressed in:
multiples of bps
multiples of pps
- <CBS>
CBS. Expressed in:
bytes
packets
A committed depth of 0 disables a traffic conditioner rule.
- <EIR>
EIR. Expressed in the same unit as CIR.
- <EBS>
EBS. Expressed in the same unit as CBS.
[G|M|K]pps|bps
Unit and multiplier used for CIR, CBS, EIR and EBS.
pps means that values are expressed in terms of packets:
rates are multiples of pps (CIR and EIR)
burst sizes are in packets (CBS and EBS)
bps means that values are expressed in terms of bits.
rates are multiples of bps (CIR and EIR)
burst sizes are in bytes (CBS and EBS)
G, M and K multipliers apply to rates (CIR and EIR). They do not apply to burst sizes (CBS and EBS).
multipliers are powers of 1000 (K=1000, M=10002, G=10003)
Example
<fp-0> tc-erl-if-dscp-add eth0 any 152000 4000 0 0 Kbps
<fp-0> tc-erl-if-dscp-add eth1 3 152000 4000 0 0 Kbps
Deleting a Fast Path QoS - Exception Rate Limitation DSCP traffic conditioner rule¶
Synopsis
tc-erl-if-dscp-del <if_name> <dscp class> [<CIR> <CBS> <EIR> <EBS> [G|M|K]pps|bps]
Parameters
- <if_name>
Interface name, physical or virtual.
- <dscp_class>
The DSCP class of the rule to be deleted.
Specifying
any
orall
will only delete the traffic conditioner rule matchingany
orall
DSCP class. All other rules with a specific DSCP class are kept.
All other parameters are purely optional and are only accepted for ease-of-use.
Example
<fp-0> tc-erl-if-dscp-del eth0 any 152000 4000 0 0 Kbps
<fp-0> tc-erl-if-dscp-del eth1 3
Displaying a Fast Path QoS - Exception Rate Limitation DSCP traffic conditioner rule¶
Synopsis
tc-erl-if-dscp [<if_name> [dscp class]]
Parameters
- <if_name>
Interface name, physical or virtual.
If none provided, all DSCP traffic conditioner rules are displayed.
- [dscp_class]
The DSCP class of the rule to be displayed.
If none provided and
if_name
is given, all rules on this interface are shown.
Example
<fp-0> tc-erl-if-dscp
eth1-vrf0:
DSCP = 4
CIR = 24 Mpps
CBS = 5000
EIR = 0 pps
EBS = 0
eth2-vrf0:
DSCP = Any
CIR = 152 Mpps
CBS = 4000
EIR = 0 pps
EBS = 0
eth2-vrf0:
DSCP = 4
CIR = 152 Mpps
CBS = 4000
EIR = 0 pps
EBS = 0
<fp-0> tc-erl-if-dscp eth2
eth2-vrf0:
DSCP = Any
CIR = 152 Mpps
CBS = 4000
EIR = 0 pps
EBS = 0
eth2-vrf0:
DSCP = 4
CIR = 152 Mpps
CBS = 4000
EIR = 0 pps
EBS = 0
<fp-0> tc-erl-if-dscp eth2 any
eth2-vrf0:
DSCP = Any
CIR = 152 Mpps
CBS = 4000
EIR = 0 pps
EBS = 0
Displaying Fast Path QoS - Exception Rate Limitation DSCP traffic conditioner rule statistics¶
Synopsis
tc-erl-if-dscp-stats [<if_name> [dscp class]]
Parameters
- <if_name>
Interface name, physical or virtual.
If none provided, all DSCP traffic conditioner rule statistics are displayed.
- [dscp_class]
The DSCP class of the rule statistics to be displayed.
If none provided and
if_name
is given, all rule statistics on this interface are shown.
Example
<fp-0> tc-erl-if-dscp-stats
eth1-vrf0:
DSCP = 4
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
eth2-vrf0:
DSCP = Any
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
eth2-vrf0:
DSCP = 4
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
<fp-0> tc-erl-if-dscp-stats eth2
eth2-vrf0:
DSCP = Any
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
eth2-vrf0:
DSCP = 4
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
<fp-0> tc-erl-if-dscp-stats eth2 any
eth2-vrf0:
DSCP = Any
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
Resetting Fast Path QoS - Exception Rate Limitation DSCP traffic conditioner rule statistics¶
Synopsis
tc-erl-if-dscp-stats-reset [<if_name> <dscp class>]
Parameters
Either no parameters should be provided, or both if_name
and DSCP class.
- <if_name>
Interface name, physical or virtual.
If none provided, all DSCP traffic conditioner rule statistics are reset.
- <dscp_class>
The DSCP class of the rule whose statistics will be reset
Example
<fp-0> tc-erl-if-dscp-stats-reset
<fp-0> tc-erl-if-dscp-stats-reset eth2 any
Mapping an exception class to a generic class¶
Synopsis
This function will map an exception class to a generic class.
A traffic conditioner rule is configured for each generic class, which is applied to any exception mapped to this generic class.
Several exception classes can be mapped to the same generic class.
tc-erl-class-exc-map <exception class> <generic class>
Parameters
- <exception class>
The exception class to map. Acceptable values are any from:
FPTUN_EXC_SP_FUNC FPTUN_EXC_ETHER_DST FPTUN_EXC_IP_DST FPTUN_EXC_ICMP_NEEDED FPTUN_EXC_NDISC_NEEDED FPTUN_EXC_IKE_NEEDED FPTUN_EXC_FPC FPTUN_EXC_NF_FUNC FPTUN_EXC_TAP FPTUN_EXC_REPLAYWIN FPTUN_EXC_ECMP_NDISC_NEEDED FPTUN_EXC_VNB_TO_VNB FPTUN_EXC_SOCKET FPTUN_EXC_IP_PMTU
The
FPTUN_EXC_
prefix can be left out. The input is case-insensitive.icmp_needed
is strictly equivalent toFPTUN_EXC_ICMP_NEEDED
.
<generic class>
The generic class identifying number. Must be comprised within
1
and127
included.The generic class
0
is the default one, which corresponds to the global Fast Path QoS - Exception Rate Limitation traffic conditioner rule.
Example
<fp-0> tc-erl-class-exc-map FPTUN_EXC_ICMP_NEEDED 3
<fp-0> tc-erl-class-exc-map NDISC_NEEDED 3
<fp-0> tc-erl-class-exc-map tap 3
Unmapping an exception class from a generic class¶
Synopsis
This function resets the map from an exception class to a generic class.
Essentially, it will set the generic class of this exception to the
default
generic class, unbinding this exception class from the
traffic conditioner rule configured for its previous generic class.
tc-erl-class-exc-unmap <exception class>
Parameters
- <exception class>
The exception class to unmap. Acceptable values are any from:
FPTUN_EXC_SP_FUNC FPTUN_EXC_ETHER_DST FPTUN_EXC_IP_DST FPTUN_EXC_ICMP_NEEDED FPTUN_EXC_NDISC_NEEDED FPTUN_EXC_IKE_NEEDED FPTUN_EXC_FPC FPTUN_EXC_NF_FUNC FPTUN_EXC_TAP FPTUN_EXC_REPLAYWIN FPTUN_EXC_ECMP_NDISC_NEEDED FPTUN_EXC_VNB_TO_VNB FPTUN_EXC_SOCKET FPTUN_EXC_IP_PMTU
The
FPTUN_EXC_
prefix can be left out. The input is case-insensitive.icmp_needed
is strictly equivalent toFPTUN_EXC_ICMP_NEEDED
.
Example
<fp-0> tc-erl-class-exc-unmap FPTUN_EXC_ICMP_NEEDED
<fp-0> tc-erl-class-exc-unmap NDISC_NEEDED
<fp-0> tc-erl-class-exc-unmap tap
Displaying the exception to generic class map¶
Synopsis
This function will show the current configured mapping from exception classes to generic classes.
tc-erl-class-exc [exception class]
Parameters
- [exception class]
The optional exception class to display. If not set, all exception classes are shown.
Acceptable values are any from:
FPTUN_EXC_SP_FUNC FPTUN_EXC_ETHER_DST FPTUN_EXC_IP_DST FPTUN_EXC_ICMP_NEEDED FPTUN_EXC_NDISC_NEEDED FPTUN_EXC_IKE_NEEDED FPTUN_EXC_FPC FPTUN_EXC_NF_FUNC FPTUN_EXC_TAP FPTUN_EXC_REPLAYWIN FPTUN_EXC_ECMP_NDISC_NEEDED FPTUN_EXC_VNB_TO_VNB FPTUN_EXC_SOCKET FPTUN_EXC_IP_PMTU
The
FPTUN_EXC_
prefix can be left out. The input is case-insensitive.icmp_needed
is strictly equivalent toFPTUN_EXC_ICMP_NEEDED
.
Example
<fp-0> tc-erl-class-exc
Exception: Class:
FPTUN_EXC_ICMP_NEEDED : 003
FPTUN_EXC_NDISC_NEEDED: 003
FPTUN_EXC_TAP : 003
Configuring a classful traffic conditioner rule¶
Synopsis
Each generic classes can be configured with its own traffic conditioner rule.
This traffic conditioner rule will be applied to any packets matching this generic class, such as exceptions of a class mapped to this generic class.
tc-erl-class-set <generic class> <CIR> <CBS> <EIR> <EBS> [G|M|K]pps|bps
Parameters
- <generic class>
The generic class of the traffic conditioner rule.
- <CIR>
CIR. Expressed in:
multiples of bps
multiples of pps
- <CBS>
CBS. Expressed in:
bytes
packets
A committed depth of 0 disables a traffic conditioner rule.
- <EIR>
EIR. Expressed in the same unit as CIR.
- <EBS>
EBS. Expressed in the same unit as CBS.
[G|M|K]pps|bps
Unit and multiplier used for CIR, CBS, EIR and EBS.
pps means that values are expressed in terms of packets:
rates are multiples of pps (CIR and EIR)
burst sizes are in packets (CBS and EBS)
bps means that values are expressed in terms of bits.
rates are multiples of bps (CIR and EIR)
burst sizes are in bytes (CBS and EBS)
G, M and K multipliers apply to rates (CIR and EIR). They do not apply to burst sizes (CBS and EBS).
multipliers are powers of 1000 (K=1000, M=10002, G=10003)
Example
<fp-0> tc-erl-class-set 1 152000 4000 0 0 Kbps
<fp-0> tc-erl-class-set 2 152000 25600 0 0 Kbps
Disabling a classful traffic conditioner rule¶
Synopsis
A generic class traffic conditioner rule can be disabled, while the class mapping remains.
If so, the traffic will be conditioned by the global tc-erl traffic conditioner rule if it is configured, and won’t be rate-limited at all otherwise.
tc-erl-class-reset <generic class> [<CIR> <CBS> <EIR> <EBS> [G|M|K]pps|bps]
Parameters
- <generic class>
The generic class of the traffic conditioner rule to disable.
All other parameters are optional and will be discarded.
Example
<fp-0> tc-erl-class-reset 1 152000 4000 0 0 Kbps
<fp-0> tc-erl-class-reset 2
Displaying one or more Fast Path QoS - Exception Rate Limitation generic traffic conditioner rule¶
Synopsis
tc-erl-class [generic class]
Parameters
- <generic class>
The (Optional) generic class of the traffic conditioner rule to display. If not set, the traffic conditioner rule of all generic classes are shown.
Example
<fp-0> tc-erl-class
Class 001:
CIR = 152 Mbps
CBS = 4000
EIR = 0 bps
EBS = 0
Class 002:
CIR = 152 Mbps
CBS = 25600
EIR = 0 bps
EBS = 0
<fp-0> tc-erl-class 2
Class 002:
CIR = 152 Mbps
CBS = 25600
EIR = 0 bps
EBS = 0
Displaying the statistics of one or more classful traffic conditioner rule¶
Synopsis
tc-erl-class-stats [generic class]
Parameters
- <generic class>
The (Optional) generic class of the traffic conditioner rule statistics to display. If not set, the statistics of all generic classes traffic conditioner rules are shown.
Example
<fp-0> tc-erl-class-stats
Class 001:
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
Class 002:
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
<fp-0> tc-erl-class-stats 2
Class 002:
Green 0 packets 0 bytes
Yellow 0 packets 0 bytes
Red 0 packets 0 bytes
Resetting the statistics of one or more classful traffic conditioner rule¶
Synopsis
tc-erl-class-stats-reset [generic class]
Parameters
- <generic class>
The (Optional) generic class of the traffic conditioner rule statistics to reset. If not set, the statistics of all generic classes traffic conditioner rules are reset.
Example
<fp-0> tc-erl-class-stats-reset 2
<fp-0> tc-erl-class-stats-reset