aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/mlx4_ib.h
diff options
context:
space:
mode:
authorAmir Vadai <amirv@mellanox.co.il>2012-08-03 08:40:47 +0000
committerRoland Dreier <roland@purestorage.com>2012-09-30 20:33:36 -0700
commit3cf69cc8dbebf15b99deb342ea422105ae9c2774 (patch)
tree44147d3daafc44b3ff4cd1a4b0fe75876535e09e /drivers/infiniband/hw/mlx4/mlx4_ib.h
parentIB/mlx4: Add multicast group (MCG) paravirtualization for SR-IOV (diff)
downloadlinux-dev-3cf69cc8dbebf15b99deb342ea422105ae9c2774.tar.xz
linux-dev-3cf69cc8dbebf15b99deb342ea422105ae9c2774.zip
IB/mlx4: Add CM paravirtualization
In CM para-virtualization: 1. Incoming requests are steered to the correct vHCA according to the embedded GID. 2. Communication IDs on outgoing requests are replaced by a globally unique ID, generated by the PPF, since there is no synchronization of ID generation between guests (and so these IDs are not guaranteed to be globally unique). The guest's comm ID is stored, and is returned to the response MAD when it arrives. Signed-off-by: Amir Vadai <amirv@mellanox.co.il> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/mlx4_ib.h')
-rw-r--r--drivers/infiniband/hw/mlx4/mlx4_ib.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
index 01ba9f1692b1..7476e2439f6b 100644
--- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
+++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
@@ -348,6 +348,12 @@ struct mlx4_ib_sriov {
* it may be called from interrupt context.*/
spinlock_t going_down_lock;
int is_going_down;
+
+ /* CM paravirtualization fields */
+ struct list_head cm_list;
+ spinlock_t id_map_lock;
+ struct rb_root sl_id_map;
+ struct idr pv_id_table;
};
struct mlx4_ib_iboe {
@@ -591,4 +597,13 @@ int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port,
u32 qkey, struct ib_ah_attr *attr, struct ib_mad *mad);
__be64 mlx4_ib_get_new_demux_tid(struct mlx4_ib_demux_ctx *ctx);
+int mlx4_ib_demux_cm_handler(struct ib_device *ibdev, int port, int *slave,
+ struct ib_mad *mad);
+
+int mlx4_ib_multiplex_cm_handler(struct ib_device *ibdev, int port, int slave_id,
+ struct ib_mad *mad);
+
+void mlx4_ib_cm_paravirt_init(struct mlx4_ib_dev *dev);
+void mlx4_ib_cm_paravirt_clean(struct mlx4_ib_dev *dev, int slave_id);
+
#endif /* MLX4_IB_H */