[PATCH rdma-core 1/2] verbs: Expose IBV_PORT_GRH_REQUIRED port capability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Alex Rosenbaum <alexr@xxxxxxxxxxxx>

RDMA applications require an indication they are operating in an
environment which is based on GID addressing, such as SR-IOV IB
Virtualization. In this mode, all sent traffic must include a GRH.

This patch exposes a new port capability flag: IBV_PORT_GRH_REQUIRED.
When this port capability flag is set, the applications must
create all AH with GRH configured. Meaning calling ibv_create_ah() and
ibv_modify_qp() with 'struct ibv_ah_attr { is_global = 1 }'

Signed-off-by: Alex Rosenbaum <alexr@xxxxxxxxxxxx>
Signed-off-by: Artemy Kovalyov <artemyko@xxxxxxxxxxxx>
Signed-off-by: Yishai Hadas <yishaih@xxxxxxxxxxxx>
---
 libibverbs/man/ibv_create_ah.3 | 4 ++++
 libibverbs/man/ibv_modify_qp.3 | 5 +++++
 libibverbs/verbs.h             | 3 ++-
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/libibverbs/man/ibv_create_ah.3 b/libibverbs/man/ibv_create_ah.3
index 0ca2198..b645ea3 100644
--- a/libibverbs/man/ibv_create_ah.3
+++ b/libibverbs/man/ibv_create_ah.3
@@ -53,6 +53,10 @@ destroys the AH
 .SH "RETURN VALUE"
 .B ibv_create_ah()
 returns a pointer to the created AH, or NULL if the request fails.
+.SH "NOTES"
+If port cap flag IBV_PORT_GRH_REQUIRED is set then
+.B ibv_create_ah()
+must be created with definition of 'struct ibv_ah_attr { .is_global = 1; .grh = {...}; }'.
 .PP
 .B ibv_destroy_ah()
 returns 0 on success, or the value of errno on failure (which indicates the failure reason).
diff --git a/libibverbs/man/ibv_modify_qp.3 b/libibverbs/man/ibv_modify_qp.3
index 487aa94..33b4a48 100644
--- a/libibverbs/man/ibv_modify_qp.3
+++ b/libibverbs/man/ibv_modify_qp.3
@@ -172,6 +172,11 @@ Init \fB          IBV_QP_STATE, IBV_QP_PORT\fR
 RTR  \fB          IBV_QP_STATE\fR
 RTS  \fB          IBV_QP_STATE\fR
 .fi
+.PP
+If port cap flag IBV_PORT_GRH_REQUIRED is set then
+ah_attr and alt_ah_attr
+must be passed with definition of 'struct ibv_ah_attr { .is_global = 1; .grh = {...}; }'.
+.PP
 .SH "SEE ALSO"
 .BR ibv_create_qp (3),
 .BR ibv_destroy_qp (3),
diff --git a/libibverbs/verbs.h b/libibverbs/verbs.h
index eb57824..ddeeace 100644
--- a/libibverbs/verbs.h
+++ b/libibverbs/verbs.h
@@ -356,7 +356,8 @@ enum ibv_port_cap_flags {
 	IBV_PORT_BOOT_MGMT_SUP			= 1 << 23,
 	IBV_PORT_LINK_LATENCY_SUP		= 1 << 24,
 	IBV_PORT_CLIENT_REG_SUP			= 1 << 25,
-	IBV_PORT_IP_BASED_GIDS			= 1 << 26
+	IBV_PORT_IP_BASED_GIDS			= 1 << 26,
+	IBV_PORT_GRH_REQUIRED			= 1 << 27,
 };
 
 struct ibv_port_attr {
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux