aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/mlx4_ib.h
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2012-08-03 04:40:45 -0400
committerRoland Dreier <roland@purestorage.com>2012-09-30 23:33:34 -0400
commit0a9a01884d447c216eff75f8f274a0a3e82c7cee (patch)
treec25b38c66c4d26c71b82c65a558316eeb4419231 /drivers/infiniband/hw/mlx4/mlx4_ib.h
parent37bfc7c1e83f1589bcdc5918c7216422662644ee (diff)
mlx4: MAD_IFC paravirtualization
The MAD_IFC firmware command fulfills two functions. First, it is used in the QP0/QP1 MAD-handling flow to obtain information from the FW (for answering queries), and for setting variables in the HCA (MAD SET packets). For this, MAD_IFC should provide the FW (physical) view of the data. This is the view that OpenSM needs. We call this the "network view". In the second case, MAD_IFC is used by various verbs to obtain data regarding the local HCA (e.g., ib_query_device()). We call this the "host view". This data needs to be paravirtualized. MAD_IFC therefore needs a wrapper function, and also needs another flag indicating whether it should provide the network view (when it is called by ib_process_mad in special-qp packet handling), or the host view (when it is called while implementing a verb). There are currently 2 flag parameters in mlx4_MAD_IFC already: ignore_bkey and ignore_mkey. These two parameters are replaced by a single "mad_ifc_flags" parameter, with different bits set for each flag. A third flag is added: "network-view/host-view". 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.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h
index 137941d79870..ac71d56ffc7e 100644
--- a/drivers/infiniband/hw/mlx4/mlx4_ib.h
+++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h
@@ -176,6 +176,14 @@ enum mlx4_ib_qp_type {
176 MLX4_IB_QPT_PROXY_SMI | MLX4_IB_QPT_PROXY_GSI | MLX4_IB_QPT_TUN_SMI_OWNER | \ 176 MLX4_IB_QPT_PROXY_SMI | MLX4_IB_QPT_PROXY_GSI | MLX4_IB_QPT_TUN_SMI_OWNER | \
177 MLX4_IB_QPT_TUN_SMI | MLX4_IB_QPT_TUN_GSI) 177 MLX4_IB_QPT_TUN_SMI | MLX4_IB_QPT_TUN_GSI)
178 178
179enum mlx4_ib_mad_ifc_flags {
180 MLX4_MAD_IFC_IGNORE_MKEY = 1,
181 MLX4_MAD_IFC_IGNORE_BKEY = 2,
182 MLX4_MAD_IFC_IGNORE_KEYS = (MLX4_MAD_IFC_IGNORE_MKEY |
183 MLX4_MAD_IFC_IGNORE_BKEY),
184 MLX4_MAD_IFC_NET_VIEW = 4,
185};
186
179enum { 187enum {
180 MLX4_NUM_TUNNEL_BUFS = 256, 188 MLX4_NUM_TUNNEL_BUFS = 256,
181}; 189};
@@ -512,7 +520,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
512int mlx4_ib_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr, 520int mlx4_ib_post_recv(struct ib_qp *ibqp, struct ib_recv_wr *wr,
513 struct ib_recv_wr **bad_wr); 521 struct ib_recv_wr **bad_wr);
514 522
515int mlx4_MAD_IFC(struct mlx4_ib_dev *dev, int ignore_mkey, int ignore_bkey, 523int mlx4_MAD_IFC(struct mlx4_ib_dev *dev, int mad_ifc_flags,
516 int port, struct ib_wc *in_wc, struct ib_grh *in_grh, 524 int port, struct ib_wc *in_wc, struct ib_grh *in_grh,
517 void *in_mad, void *response_mad); 525 void *in_mad, void *response_mad);
518int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, 526int mlx4_ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
@@ -527,6 +535,10 @@ int mlx4_ib_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list, int npages,
527 u64 iova); 535 u64 iova);
528int mlx4_ib_unmap_fmr(struct list_head *fmr_list); 536int mlx4_ib_unmap_fmr(struct list_head *fmr_list);
529int mlx4_ib_fmr_dealloc(struct ib_fmr *fmr); 537int mlx4_ib_fmr_dealloc(struct ib_fmr *fmr);
538int __mlx4_ib_query_port(struct ib_device *ibdev, u8 port,
539 struct ib_port_attr *props, int netw_view);
540int __mlx4_ib_query_pkey(struct ib_device *ibdev, u8 port, u16 index,
541 u16 *pkey, int netw_view);
530 542
531int mlx4_ib_resolve_grh(struct mlx4_ib_dev *dev, const struct ib_ah_attr *ah_attr, 543int mlx4_ib_resolve_grh(struct mlx4_ib_dev *dev, const struct ib_ah_attr *ah_attr,
532 u8 *mac, int *is_mcast, u8 port); 544 u8 *mac, int *is_mcast, u8 port);