aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
diff options
context:
space:
mode:
authorTariq Toukan <tariqt@nvidia.com>2021-04-22 18:34:57 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-05-27 11:54:36 -0700
commit2ef9c7c613cfed2bba64dab194a5649b9c1e6685 (patch)
tree8cb9b5af493641c45bdcf95426608f67d7c7cce1 /drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
parentnet/mlx5e: IPsec/rep_tc: Fix rep_tc_update_skb drops IPsec packet (diff)
downloadwireguard-linux-2ef9c7c613cfed2bba64dab194a5649b9c1e6685.tar.xz
wireguard-linux-2ef9c7c613cfed2bba64dab194a5649b9c1e6685.zip
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 <tariqt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_rx.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_rx.c2
1 files changed, 1 insertions, 1 deletions
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;
}