diff options
author | Matan Barak <matanb@mellanox.com> | 2014-07-31 04:01:29 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-08-01 18:11:13 -0400 |
commit | e630664c8383f300c4146d7613d61e5a8eb1f8e3 (patch) | |
tree | e3ec77b2c8b34bc022d0014622e4d392a33aed43 /include | |
parent | 7e6edb9b2e0bcfb2a588db390c44d120213c57ae (diff) |
mlx4_core: Add helper functions to support MR re-registration
Add few helper functions to support a mechanism of getting an MPT,
modifying it and updating the HCA with the modified object.
The code takes 2 paths, one for directly changing the MPT (and
sometimes its related MTTs) and another one which queries the MPT and
updates the HCA via fw command SW2HW_MPT. The first path is used in
native mode; the second path is slower and is used only in SRIOV.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mlx4/device.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 35b51e7af886..bac002167ace 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -262,6 +262,7 @@ enum { | |||
262 | MLX4_PERM_REMOTE_WRITE = 1 << 13, | 262 | MLX4_PERM_REMOTE_WRITE = 1 << 13, |
263 | MLX4_PERM_ATOMIC = 1 << 14, | 263 | MLX4_PERM_ATOMIC = 1 << 14, |
264 | MLX4_PERM_BIND_MW = 1 << 15, | 264 | MLX4_PERM_BIND_MW = 1 << 15, |
265 | MLX4_PERM_MASK = 0xFC00 | ||
265 | }; | 266 | }; |
266 | 267 | ||
267 | enum { | 268 | enum { |
@@ -1243,4 +1244,19 @@ int mlx4_vf_smi_enabled(struct mlx4_dev *dev, int slave, int port); | |||
1243 | int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); | 1244 | int mlx4_vf_get_enable_smi_admin(struct mlx4_dev *dev, int slave, int port); |
1244 | int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, | 1245 | int mlx4_vf_set_enable_smi_admin(struct mlx4_dev *dev, int slave, int port, |
1245 | int enable); | 1246 | int enable); |
1247 | int mlx4_mr_hw_get_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, | ||
1248 | struct mlx4_mpt_entry ***mpt_entry); | ||
1249 | int mlx4_mr_hw_write_mpt(struct mlx4_dev *dev, struct mlx4_mr *mmr, | ||
1250 | struct mlx4_mpt_entry **mpt_entry); | ||
1251 | int mlx4_mr_hw_change_pd(struct mlx4_dev *dev, struct mlx4_mpt_entry *mpt_entry, | ||
1252 | u32 pdn); | ||
1253 | int mlx4_mr_hw_change_access(struct mlx4_dev *dev, | ||
1254 | struct mlx4_mpt_entry *mpt_entry, | ||
1255 | u32 access); | ||
1256 | void mlx4_mr_hw_put_mpt(struct mlx4_dev *dev, | ||
1257 | struct mlx4_mpt_entry **mpt_entry); | ||
1258 | void mlx4_mr_rereg_mem_cleanup(struct mlx4_dev *dev, struct mlx4_mr *mr); | ||
1259 | int mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr, | ||
1260 | u64 iova, u64 size, int npages, | ||
1261 | int page_shift, struct mlx4_mpt_entry *mpt_entry); | ||
1246 | #endif /* MLX4_DEVICE_H */ | 1262 | #endif /* MLX4_DEVICE_H */ |