]> git.karo-electronics.de Git - karo-tx-linux.git/commit
IB/mlx4: Initialize SR-IOV IB support for slaves in master context
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Fri, 3 Aug 2012 08:40:42 +0000 (08:40 +0000)
committerRoland Dreier <roland@purestorage.com>
Sun, 23 Sep 2012 16:17:41 +0000 (09:17 -0700)
commit01cababd0234a0c7f04512d236a2273cdc2c0dbe
tree0ee4051c0c47e18e29dc912f04293bbb2822edb8
parent91fb55130ca41cfee6cb95f6f3f180fad24d1529
IB/mlx4: Initialize SR-IOV IB support for slaves in master context

Allocate SR-IOV paravirtualization resources and MAD demuxing contexts
on the master.

This has two parts.  The first part is to initialize the structures to
contain the contexts.  This is done at master startup time in
mlx4_ib_init_sriov().

The second part is to actually create the tunneling resources required
on the master to support a slave.  This is performed the master
detects that a slave has started up (MLX4_DEV_EVENT_SLAVE_INIT event
generated when a slave initializes its comm channel).

For the master, there is no such startup event, so it creates its own
tunneling resources when it starts up.  In addition, the master also
creates the real special QPs.  The ib_core layer on the master causes
creation of proxy special QPs, since the master is also
paravirtualized at the ib_core layer.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/mad.c
drivers/infiniband/hw/mlx4/main.c
drivers/infiniband/hw/mlx4/mlx4_ib.h
drivers/net/ethernet/mellanox/mlx4/cmd.c
include/linux/mlx4/device.h
include/linux/mlx4/driver.h