Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9bafe2ad authored by Tariq Toukan's avatar Tariq Toukan Committed by Saeed Mahameed
Browse files

net/mlx5e: Use memset to init skbs_frags array to zeros



In RX data-path, use memset() instead of loop assignment
to init the whole skbs_frags array.

Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
parent b681c481
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -391,9 +391,9 @@ static int mlx5e_alloc_rx_umr_mpwqe(struct mlx5e_rq *rq,
			goto err_unmap;
		wi->umr.mtt[i] = cpu_to_be64(dma_info->addr | MLX5_EN_WR);
		page_ref_add(dma_info->page, pg_strides);
		wi->skbs_frags[i] = 0;
	}

	memset(wi->skbs_frags, 0, sizeof(*wi->skbs_frags) * MLX5_MPWRQ_PAGES_PER_WQE);
	wi->consumed_strides = 0;
	wqe->data.addr = cpu_to_be64(dma_offset);