]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net/mlx4: Fix uninitialized fields in rule when adding promiscuous mode to device...
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Sun, 27 Nov 2016 17:20:52 +0000 (19:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Nov 2016 20:33:46 +0000 (15:33 -0500)
In procedure mlx4_flow_steer_promisc_add(), several fields
were left uninitialized in the rule structure.
Correctly initialize these fields.

Fixes: 592e49dda812 ("net/mlx4: Implement promiscuous mode with device managed flow-steering")
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/mcg.c

index 94b891c118c135d3597d90ba3ec9a34d049458ee..1a670b68155550fe9f61fb2bc2c7a3688391249c 100644 (file)
@@ -1457,7 +1457,12 @@ EXPORT_SYMBOL_GPL(mlx4_multicast_detach);
 int mlx4_flow_steer_promisc_add(struct mlx4_dev *dev, u8 port,
                                u32 qpn, enum mlx4_net_trans_promisc_mode mode)
 {
-       struct mlx4_net_trans_rule rule;
+       struct mlx4_net_trans_rule rule = {
+               .queue_mode = MLX4_NET_TRANS_Q_FIFO,
+               .exclusive = 0,
+               .allow_loopback = 1,
+       };
+
        u64 *regid_p;
 
        switch (mode) {