Loading
HNS3: Solve the problem that the tc qdisc configuration in the hardware...
HNS3: Solve the problem that the tc qdisc configuration in the hardware registration cannot be cleared driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I99GLS CVE: NA ----------------------------------------------------------- Users can run the tc qdisc command to configure the number of used tc and the maximum rate of each tc. In the original software implementation logic, the software configures the maximum rate to the register based on the number of used tc. The software does not configure the rate for unused tc. For example, the user configures four used tc and the corresponding maximum rates through tc qdisc command. Then, the user configures two used tc and the corresponding maximum rates. At this time, the software configures only tc0 and tc1, not configure tc2 and tc3. The user's first configuration of tc2 and tc3 still remains in the register. Therefore, as long as the number of used tc by the user configuration is reduced, it will result in residual configuration in the register. Using tc qdisc command to delete the configuration, uninstalling the driver and loading it again essentially changes the number of used tc to 1, so the above problem also exists. This patch modifies the operation of only configuring the used tc register, and will configure all tc registers supported by the software. For used tc, configure user-specified parameters in registers; for unused tc, restore the initial configuration. Signed-off-by:Haiqing Fang <fanghaiqing@huawei.com>