]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net/mlx5e: Use memset to init skbs_frags array to zeros
authorTariq Toukan <tariqt@mellanox.com>
Sun, 25 Jun 2017 12:23:35 +0000 (15:23 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 3 Sep 2017 03:34:08 +0000 (06:34 +0300)
In RX data-path, use memset() instead of loop assignment
to init the whole skbs_frags array.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c

index aa5cc15908599c7f64ede6a65793cd4cab373f09..db372dcecbe0254de8d6aa8294060da4fa5d4c22 100644 (file)
@@ -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);