diff options
author | Eli Cohen <eli@mellanox.co.il> | 2011-03-22 22:38:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-23 12:24:23 -0700 |
commit | c1b43dca137f2154845122417fba86d4bae67182 (patch) | |
tree | 36237582bfd5baf0e9a3ccea5377b949be289440 /include/linux/mlx4 | |
parent | 1679200f91da6a054b06954c9bd3eeed29b6731f (diff) | |
download | talos-op-linux-c1b43dca137f2154845122417fba86d4bae67182.tar.gz talos-op-linux-c1b43dca137f2154845122417fba86d4bae67182.zip |
mlx4: Add blue flame support for kernel consumers
Using blue flame can improve latency by allowing the HW to more efficiently
access the WQE. This patch presents two functions that are used to allocate or
release HW resources for using blue flame; the caller need to supply a struct
mlx4_bf object when allocating resources. Consumers that make use of this API
should post doorbells to the UAR object pointed by the initialized struct
mlx4_bf;
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r-- | include/linux/mlx4/device.h | 13 | ||||
-rw-r--r-- | include/linux/mlx4/qp.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 56fa5e1cd6d4..8985768e2c0d 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h @@ -351,6 +351,17 @@ struct mlx4_fmr { struct mlx4_uar { unsigned long pfn; int index; + struct list_head bf_list; + unsigned free_bf_bmap; + void __iomem *map; + void __iomem *bf_map; +}; + +struct mlx4_bf { + unsigned long offset; + int buf_size; + struct mlx4_uar *uar; + void __iomem *reg; }; struct mlx4_cq { @@ -478,6 +489,8 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn); int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar); void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar); +int mlx4_bf_alloc(struct mlx4_dev *dev, struct mlx4_bf *bf); +void mlx4_bf_free(struct mlx4_dev *dev, struct mlx4_bf *bf); int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift, struct mlx4_mtt *mtt); diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index 0eeb2a1a867c..9e9eb21056ca 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h @@ -303,6 +303,7 @@ struct mlx4_wqe_data_seg { enum { MLX4_INLINE_ALIGN = 64, + MLX4_INLINE_SEG = 1 << 31, }; struct mlx4_wqe_inline_seg { |