[ofa-general] [PATCH] libibverbs: add userspace support for invalidate stag

mhagen at iol.unh.edu mhagen at iol.unh.edu
Thu May 17 07:59:40 PDT 2007


Modification to userspace verbs to provide support for the iWARP Verbs
SEND with INV and SEND with SE and INV.

Signed-off-by: Mikkel Hagen <mhagen at iol.unh.edu>

--- libibverbs/include/infiniband/verbs.h	2007-05-03 10:11:23.000000000 -0400
+++ libibverbs/include/infiniband/verbs.h	2007-05-03 10:12:32.000000000 -0400
@@ -492,7 +492,8 @@ enum ibv_send_flags {
 	IBV_SEND_FENCE		= 1 << 0,
 	IBV_SEND_SIGNALED	= 1 << 1,
 	IBV_SEND_SOLICITED	= 1 << 2,
-	IBV_SEND_INLINE		= 1 << 3
+	IBV_SEND_INLINE		= 1 << 3,
+	IBV_SEND_INVALIDATE	= 1 << 4
 };

 struct ibv_sge {
@@ -525,6 +526,9 @@ struct ibv_send_wr {
 			uint32_t	remote_qpn;
 			uint32_t	remote_qkey;
 		} ud;
+		struct {
+			uint32_t	rkey;
+		} invalidate;
 	} wr;
 };

--- libibverbs/include/infiniband/kern-abi.h	2007-05-03 10:36:13.000000000
-0400
+++ libibverbs/include/infiniband/kern-abi.h	2007-05-03 10:37:39.000000000
-0400
@@ -592,6 +592,10 @@ struct ibv_kern_send_wr {
 			__u32 remote_qkey;
 			__u32 reserved;
 		} ud;
+		struct {
+			__u32 rkey;
+			__u32 reserved;
+		} invalidate;
 	} wr;
 };

--- libibverbs/src/cmd.c	2007-05-02 05:00:25.000000000 -0400
+++ libibverbs/src/cmd.c	2007-05-04 15:19:36.000000000 -0400
@@ -857,6 +857,11 @@ int ibv_cmd_post_send(struct ibv_qp *ibq
 				tmp->wr.atomic.swap = i->wr.atomic.swap;
 				tmp->wr.atomic.rkey = i->wr.atomic.rkey;
 				break;
+			case IBV_WR_SEND:
+				if(tmp->send_flags & IBV_SEND_INVALIDATE) {
+					tmp->wr.invalidate.rkey =
+						i->wr.invalidate.rkey;
+				}
 			default:
 				break;
 			}



-- 
Mikkel Hagen
Project Assistant - Fibre Channel/SAS/SATA Consortiums
Research and Development Engineer - iWARP Consortium
FC/SAS/SATA:1-603-862-0701  iWARP:1-603-862-5083  Fax:1-603-862-4181
UNH-IOL
121 Technology Drive, Suite 2
Durham, NH 03824




More information about the general mailing list