]> git.droids-corp.org - dpdk.git/commit
net/mlx5: fix committed bucket size
authorAlexander Kozyrev <akozyrev@nvidia.com>
Mon, 7 Feb 2022 13:28:40 +0000 (15:28 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Thu, 10 Feb 2022 08:44:32 +0000 (09:44 +0100)
commit21fdeab422e0edabc6b738f7a0c56dec7e9c374e
tree53e4d373265a1080e1773a140f511234def9749c
parent793f5f4a3454b2a35c5de50feb2bd3fd970d4dd6
net/mlx5: fix committed bucket size

Committed Bucket Size calculation tries to fit into 8-bit wide
mantissa field by setting 256 as a maximum value for it.
To compensate for this increase in the mantissa value the exponent
value has to be reduced by 8. But it gives a negative exponent
value for CBS less than 128. And negative exponent value is not
supported by the NIC. Adjust CSB calculation only for values
bigger than 128 to allow both small and big bucket sizes.

Fixes: 3bd26b23cefc ("net/mlx5: support meter profile operations")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_flow_meter.c