diff mbox

[RFC,1/5] verbs: Expose tag matching capabilities

Message ID 1497249767-15353-2-git-send-email-artemyko@mellanox.com (mailing list archive)
State RFC
Headers show

Commit Message

Artemy Kovalyov June 12, 2017, 6:42 a.m. UTC
Expose tag matching capabilities and show them in ibv_devinfo.

* max_rndv_hdr_size - Max size of RNDV message
* max_num_tags - Max number of entries in tag matching list
* max_ops - Max number of outstanding list operations
* max_sge - Max number of SGE in a tag matching entry
* capability_flags - TM capabilities mask:
    - IBV_TM_CAP_RC - Support tag matching on RC transport

Change-Id: I6f15a6db209155be6406bb54c714796047979f68
Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
---
 libibverbs/verbs.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
diff mbox

Patch

diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
index b27dfd1..43fa386 100644
--- a/libibverbs/verbs.h
+++ b/libibverbs/verbs.h
@@ -259,6 +259,23 @@  enum ibv_raw_packet_caps {
 	IBV_RAW_PACKET_CAP_IP_CSUM		= 1 << 2,
 };
 
+enum ibv_tm_cap_flags {
+	IBV_TM_CAP_RC		    = 1 << 0
+};
+
+struct ibv_tm_caps {
+	/* Max size for RNDV message */
+	uint32_t max_rndv_hdr_size;
+	/* Max number of entries in tag matching list */
+	uint32_t max_num_tags;
+	/* TM capabilities mask - enumerated in ibv_tm_cap_flags */
+	uint32_t capability_flags;
+	/* Max number of outstanding list operations */
+	uint32_t max_ops;
+	/* Max number of SGE in a tag matching entry */
+	uint32_t max_sge;
+};
+
 struct ibv_device_attr_ex {
 	struct ibv_device_attr	orig_attr;
 	uint32_t		comp_mask;
@@ -271,6 +288,7 @@  struct ibv_device_attr_ex {
 	uint32_t		max_wq_type_rq;
 	struct ibv_packet_pacing_caps packet_pacing_caps;
 	uint32_t		raw_packet_caps; /* Use ibv_raw_packet_caps */
+	struct ibv_tm_caps	tm_caps;
 };
 
 enum ibv_mtu {