]> git.droids-corp.org - dpdk.git/commit
net/mlx5: fix delay drop bit set overflow
authorBing Zhao <bingz@nvidia.com>
Fri, 12 Nov 2021 14:38:42 +0000 (16:38 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Sun, 14 Nov 2021 15:26:49 +0000 (16:26 +0100)
commitce78c51833a847d4b93841231907f1a7f5cf7114
tree79491aaeb6b45717e10ed65924af3e8a4a986e47
parent60bc28051811eaab99e6b77d100566c1f4edc8dc
net/mlx5: fix delay drop bit set overflow

The attribute to record the global control of hairpin queues' delay
drop was defined as a bit-field with one bit, and the intention was
to reduce the memory overhead. In the meanwhile, the macro was
defined as an enumerated value 0x2.

No matter what value inputted via devarg, the lowest bit was always
zero and the higher bits would be ignored. For hairpin queues, the
delay drop attribute couldn't be enabled.

With the commit, the double logical negation is used to fix this.

Fixes: febcac7b46cd ("net/mlx5: support Rx queue delay drop")
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5.c