Before the yellow color policy was supported, the only supported profile of metering is RFC2697 and EIR is not part of the profile. When creating a meter with this profile, the EIR part was always zero. After the yellow color policy supported and RFC2698 & 4115 support was introduced, EIR is relevant and should be calculated. Usually the EIR could not be zero and the formula for calculating CIR mantissa & exponent could be reused. The EIR could be 0 and then only green and red colors will be supported from the specification. Both the mantissa and exponent parts should be set to 0. Currently, the formula wrongly sets non-zero values for the EIR=0 case. Setting the mantissa and the exponent parts to zeros when EIR is 0 will solve the issue. Fixes: 33a7493c8df8 ("net/mlx5: support meter for trTCM profiles") Signed-off-by: Bing Zhao <bingz@nvidia.com> Acked-by: Matan Azrad <matan@nvidia.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%