summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEran Ben Elisha <eranbe@mellanox.com>2015-12-14 15:34:10 +0100
committerDoug Ledford <dledford@redhat.com>2015-12-24 06:17:31 +0100
commitda7525d2a9ae9d9d9af754441befcf2560f6cac3 (patch)
tree280a3004346f467430561a45831ee9d2abad9282 /include
parentnet/mlx5_core: Add setting ATOMIC endian mode (diff)
downloadlinux-da7525d2a9ae9d9d9af754441befcf2560f6cac3.tar.xz
linux-da7525d2a9ae9d9d9af754441befcf2560f6cac3.zip
IB/mlx5: Advertise atomic capabilities in query device
In order to ensure IB spec atomic correctness in atomic operations, if HW is configured to host endianness, advertise IB_ATOMIC_HCA. if not, advertise IB_ATOMIC_NONE. Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com> Reviewed-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx5/driver.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 7b9c976b42d9..53c57724c8dd 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -115,6 +115,11 @@ enum {
MLX5_REG_HOST_ENDIANNESS = 0x7004,
};
+enum {
+ MLX5_ATOMIC_OPS_CMP_SWAP = 1 << 0,
+ MLX5_ATOMIC_OPS_FETCH_ADD = 1 << 1,
+};
+
enum mlx5_page_fault_resume_flags {
MLX5_PAGE_FAULT_RESUME_REQUESTOR = 1 << 0,
MLX5_PAGE_FAULT_RESUME_WRITE = 1 << 1,