aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorArtemy Kovalyov <artemyko@mellanox.com>2017-01-02 11:37:48 +0200
committerDavid S. Miller <davem@davemloft.net>2017-01-02 15:51:20 -0500
commitaa8e08d2f523501c40b0e70f1c4ecacb97195931 (patch)
tree2e7e1a80aa9aaaf328e1b1c64821bc76e27a487d /include
parentIB/mlx5: Add ODP atomics support (diff)
downloadlinux-dev-aa8e08d2f523501c40b0e70f1c4ecacb97195931.tar.xz
linux-dev-aa8e08d2f523501c40b0e70f1c4ecacb97195931.zip
IB/mlx5: Improve MR check
Add "type" field to mlx5_core MKEY struct. Check whether page fault happens on MKEY corresponding to MR. Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx5/driver.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index b52d07491fe7..cfa49bca009c 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -394,11 +394,17 @@ struct mlx5_core_sig_ctx {
u32 sigerr_count;
};
+enum {
+ MLX5_MKEY_MR = 1,
+ MLX5_MKEY_MW,
+};
+
struct mlx5_core_mkey {
u64 iova;
u64 size;
u32 key;
u32 pd;
+ u32 type;
};
#define MLX5_24BIT_MASK ((1 << 24) - 1)