diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2016-11-27 19:20:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-28 15:33:46 -0500 |
commit | 44b911e77793d686b481608770d0c55c18055ba0 (patch) | |
tree | f2c496beb7a6d0ed0c59c77f2942c008cdf47528 /drivers/net/ethernet | |
parent | b4353708f5a1c084fd73f1b6fd243b142157b173 (diff) | |
download | lwn-44b911e77793d686b481608770d0c55c18055ba0.tar.gz lwn-44b911e77793d686b481608770d0c55c18055ba0.zip |
net/mlx4: Fix uninitialized fields in rule when adding promiscuous mode to device managed flow steering
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/mcg.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/mcg.c b/drivers/net/ethernet/mellanox/mlx4/mcg.c index 94b891c118c1..1a670b681555 100644 --- a/drivers/net/ethernet/mellanox/mlx4/mcg.c +++ b/drivers/net/ethernet/mellanox/mlx4/mcg.c @@ -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) { |