net/mlx5e: Tx, Zero-memset WQE info struct upon update
authorTariq Toukan <tariqt@mellanox.com>
Mon, 16 Sep 2019 14:19:12 +0000 (17:19 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 18 Oct 2019 19:11:51 +0000 (12:11 -0700)
Not all fields of WQE info are being written in the function,
having some leftovers from previous rounds.
Zero-memset it upon update.

Particularly, not nullifying the wi->resync_dump_frag field
will cause double free of the kTLS DUMPed frags.

Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h

index 87be9674790292beceddd8908e0d52d07a71c4e1..182d5c5664eb9ed1340929df3ca2c31504d657dd 100644 (file)
@@ -92,7 +92,7 @@ mlx5e_fill_sq_frag_edge(struct mlx5e_txqsq *sq, struct mlx5_wq_cyc *wq,
 
        /* fill sq frag edge with nops to avoid wqe wrapping two pages */
        for (; wi < edge_wi; wi++) {
-               wi->skb        = NULL;
+               memset(wi, 0, sizeof(*wi));
                wi->num_wqebbs = 1;
                mlx5e_post_nop(wq, sq->sqn, &sq->pc);
        }