]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4_core: Adjustments to Flow Steering activation logic for SR-IOV
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 6 Dec 2012 17:11:59 +0000 (17:11 +0000)
committerRoland Dreier <roland@purestorage.com>
Wed, 19 Dec 2012 19:47:14 +0000 (11:47 -0800)
commit0ee39201b103aec6f6709ff4e2bf3887614d89b9
tree3c9f72f0c193b220d2a10fca2d8e21eeb4ad0d81
parentee2b1f37e88e7604cb9f9878b20fd17939d3092b
mlx4_core: Adjustments to Flow Steering activation logic for SR-IOV

Separate flow steering capability detection from the decision to activate.

For the master (and for native), detect the flow steering capability
in mlx4_dev_cap, but activate the appropriate steering type in a new
function choose_flow_steering() based on detected data.

For VFs, activate flow steering based on what was actually activated
by the master, where that info is obtained via QUERY_HCA. This fixes
the current VF detection which is wrongly based on QUERY_DEV_CAP.

Also, for SR-IOV mode, if flow steering may be activated, do so only
if the max number of QPs per rule is sufficient to satisfy one
subscription per VF.  If not, fall back to B0 mode. This is needed to
serve registrations done by L2 network drivers such as mlx4_en and
IPoIB when the network stack attempts to join to multicast groups such
as all-hosts or the IPoIB broadcast group.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/net/ethernet/mellanox/mlx4/fw.c
drivers/net/ethernet/mellanox/mlx4/fw.h
drivers/net/ethernet/mellanox/mlx4/main.c