@@ -36,6 +36,7 @@ uint32_t raw_packet_caps; /* Raw packet capabilities, u
struct ibv_tm_caps tm_caps; /* Tag matching capabilities */
struct ibv_cq_moderation_caps cq_mod_caps; /* CQ moderation max capabilities */
uint64_t max_dm_size; /* Max Device Memory size (in bytes) available for allocation */
+struct ibv_pci_atomic_caps atomic_caps; /* PCI atomic operations capabilities, use enum ibv_pci_atomic_op_size */
.in -8
};
@@ -107,6 +108,22 @@ struct ibv_cq_moderation_caps {
uint16_t max_cq_count;
uint16_t max_cq_period;
};
+
+enum ibv_pci_atomic_op_size {
+.in +8
+IBV_PCI_ATOMIC_OPERATION_4_BYTE_SIZE_SUP = 1 << 0,
+IBV_PCI_ATOMIC_OPERATION_8_BYTE_SIZE_SUP = 1 << 1,
+IBV_PCI_ATOMIC_OPERATION_16_BYTE_SIZE_SUP = 1 << 2,
+.in -8
+};
+
+struct ibv_pci_atomic_caps {
+.in +8
+uint16_t fetch_add; /* Supported sizes for an atomic fetch and add operation, use enum ibv_pci_atomic_op_size */
+uint16_t swap; /* Supported sizes for an atomic unconditional swap operation, use enum ibv_pci_atomic_op_size */
+uint16_t compare_swap; /* Supported sizes for an atomic compare and swap operation, use enum ibv_pci_atomic_op_size */
+.in -8
+};
.fi
Extended device capability flags (device_cap_flags_ex):
@@ -293,6 +293,22 @@ struct ibv_cq_moderation_caps {
uint16_t max_cq_period; /* in micro seconds */
};
+enum ibv_pci_atomic_op_size {
+ IBV_PCI_ATOMIC_OPERATION_4_BYTE_SIZE_SUP = 1 << 0,
+ IBV_PCI_ATOMIC_OPERATION_8_BYTE_SIZE_SUP = 1 << 1,
+ IBV_PCI_ATOMIC_OPERATION_16_BYTE_SIZE_SUP = 1 << 2,
+};
+
+/*
+ * Bitmask for supported operation sizes
+ * Use enum ibv_pci_atomic_op_size
+ */
+struct ibv_pci_atomic_caps {
+ uint16_t fetch_add;
+ uint16_t swap;
+ uint16_t compare_swap;
+};
+
struct ibv_device_attr_ex {
struct ibv_device_attr orig_attr;
uint32_t comp_mask;
@@ -308,6 +324,7 @@ struct ibv_device_attr_ex {
struct ibv_tm_caps tm_caps;
struct ibv_cq_moderation_caps cq_mod_caps;
uint64_t max_dm_size;
+ struct ibv_pci_atomic_caps pci_atomic_caps;
};
enum ibv_mtu {