Hi,
one of our customers has the following questions on CPSW CBS support:
The customer has been going over the documentation for the Credit Based Shaper (CBS) and have a few questions...
First, it looks like the driver does not support the normal Linux interface for the CBS, tc-cbs, and has its own way of configuring this. Is there a reason why this does not use the standard interface?
It appears to use a combination of the sysfs interface and the mqprio qdisc's "min_rate" and "max_rate" parameters. It's unclear how exactly these map to the 802.1Qav shaper parameters?
The official interface, tc-cbs, has parameters which directly correspond to the expected parameters, but it's not at all clear how these can be realized with the existing interface.
In the section "3.2.3.6.3.3.2.3.1.1. Host port ingress Rate Limiting offload," the "/sys/class/net/eth0/queues/tx-7/tx_maxrate" sysfs value is set, but the section is described as "ingress rate limiting." This implies that it limits the receive rate, as a policer, but the parameter name is "tx_maxrate," which implies an egress rate limit. Is this an ingress or an egress rate limit? Experimentally, it appears to be an egress limit.
The following section, "3.2.3.6.3.3.2.3.1.2. Switch egress, Ethernet Port Transmit Rate Limiting offload," suggests that it is configuring an egress limit and sets values both through the sysfs interface and the "mqprio" interface. What is the relationship among these values?
- /sys/class/net/eth0/queues/tx-7/tx_maxrate
- bw_rlimit min_rate
- bw_rlimit max_rate
The document describes "min_rate" as the CIR and the "max_rate" as the EIR. Following the example, where min_rate matches tx_maxrate, the transmission rate is constrained to the min_rate. What does the max_rate do, if not allowing the sender to exceed the min_rate when bandwidth permits?
What are the constraints, as it's easy to enter an invalid config, but there's no feedback as to what the constraints actually are?
Finally, performing packet capture with these setting, the VLAN header always has the Priority Code Point (PCP) set to zero in the captured packets. This is expected for TC0, but not for TC6 and TC7, in the example. Can the hardware be configured to set the PCP to the correct value? This is a problem, as without the correct value, the switch can't provide guaranteed resources.
Regards,
--Gunter