]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4_en: Disable RFS when running in SRIOV mode
authorAmir Vadai <amirv@mellanox.com>
Thu, 7 Mar 2013 03:46:57 +0000 (03:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Mar 2013 20:52:04 +0000 (15:52 -0500)
commit58b7203f718fb7275e7cbf11e67315247ebdb48a
treeaea8161b5ec5c7f9ffa6aa6e001f5a3f5ac32603
parent60bc6b594bdcf1f2ba2de227b9be5940f17e46c8
net/mlx4_en: Disable RFS when running in SRIOV mode

Commit be4a91a0 "mlx4_en: fix allocation of CPU affinity reverse-map" fixed
a bug when mlx4_dev->caps.comp_pool is larger from the device rx rings, but
introduced a regression.

When the mlx4_core is activating its "legacy mode" (e.g when running in SRIOV
mode) w.r.t to EQs/IRQs usage, comp_pool becomes zero and we're crashing on
divide by zero alloc_cpu_rmap.

Fix that by enabling RFS only when running in non-legacy mode.

Reported-by: Yan Burman <yanb@mellanox.com>
Cc: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c