aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorJack Morgenstein <jackm@dev.mellanox.co.il>2012-08-03 04:40:41 -0400
committerRoland Dreier <roland@purestorage.com>2012-09-30 23:33:31 -0400
commite2c76824ca16a3e8443cc7b26abcb21af7c27b10 (patch)
tree41d39111862e2e6faecb9ab356198e985c9bfe7d /include/linux/mlx4
parent1ffeb2eb8be9936e9dc1f9af2d5f4c14d69a0d36 (diff)
mlx4_core: Add proxy and tunnel QPs to the reserved QP area
In addition, pass the proxy and tunnel QP numbers to slaves so the driver can perform special QP paravirtualization. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/device.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 07aa8232e631..d5c82b7216de 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -693,7 +693,18 @@ static inline int mlx4_is_master(struct mlx4_dev *dev)
693 693
694static inline int mlx4_is_qp_reserved(struct mlx4_dev *dev, u32 qpn) 694static inline int mlx4_is_qp_reserved(struct mlx4_dev *dev, u32 qpn)
695{ 695{
696 return (qpn < dev->caps.sqp_start + 8); 696 return (qpn < dev->caps.base_sqpn + 8 +
697 16 * MLX4_MFUNC_MAX * !!mlx4_is_master(dev));
698}
699
700static inline int mlx4_is_guest_proxy(struct mlx4_dev *dev, int slave, u32 qpn)
701{
702 int base = dev->caps.sqp_start + slave * 8;
703
704 if (qpn >= base && qpn < base + 8)
705 return 1;
706
707 return 0;
697} 708}
698 709
699static inline int mlx4_is_mfunc(struct mlx4_dev *dev) 710static inline int mlx4_is_mfunc(struct mlx4_dev *dev)