mlx4: Fix tx ring affinity_mask creation
authorBenjamin Poirier <bpoirier@suse.de>
Tue, 28 Apr 2015 21:49:29 +0000 (14:49 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Apr 2015 19:16:57 +0000 (15:16 -0400)
commit42eab005a5dd5d7ea2b0328aecc4d6cc0c23c9c2
tree564af2328fd4eaa679cc6feb6a54ca016df37cde
parent0d699f28ee5d0641470a603ab5904e463cb1532a
mlx4: Fix tx ring affinity_mask creation

By default, the number of tx queues is limited by the number of online cpus
in mlx4_en_get_profile(). However, this limit no longer holds after the
ethtool .set_channels method has been called. In that situation, the driver
may access invalid bits of certain cpumask variables when queue_index >=
nr_cpu_ids.

Signed-off-by: Benjamin Poirier <bpoirier@suse.de>
Acked-by: Ido Shamay <idos@mellanox.com>
Fixes: d03a68f ("net/mlx4_en: Configure the XPS queue mapping on driver load")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c