From: Tariq Toukan Date: Thu, 22 Apr 2021 15:34:57 +0000 (+0300) Subject: net/mlx5e: RX, Remove unnecessary check in RX CQE compression handling X-Git-Tag: Ubuntu-5.15.0-12.12~2372^2~445^2~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=2ef9c7c613cfed2bba64dab194a5649b9c1e6685;p=mirror_ubuntu-jammy-kernel.git net/mlx5e: RX, Remove unnecessary check in RX CQE compression handling There are two reasons for exiting mlx5e_decompress_cqes_cont(): 1. The compression session is completed (cqd.left == 0). 2. The budget is exhausted (work_done == budget). If after calling mlx5e_decompress_cqes_cont() we have cqd.left > 0, it necessarily implies that budget is exhausted. The first part of the complex condition is covered by the second, hence we remove it here. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index 5346271974f5..e88429356018 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -1560,7 +1560,7 @@ int mlx5e_poll_rx_cq(struct mlx5e_cq *cq, int budget) if (rq->cqd.left) { work_done += mlx5e_decompress_cqes_cont(rq, cqwq, 0, budget); - if (rq->cqd.left || work_done >= budget) + if (work_done >= budget) goto out; }