[openib-general] [PATCH 2/2] libibverbs-1.0: return sq_draining value in query_qp response

Jack Morgenstein jackm at dev.mellanox.co.il
Wed Oct 25 03:54:24 PDT 2006


Return the sq_draining value back to user space for query_qp instead
of the en_sqd_async notify value.  This last is valid only for
modify_qp. For query_qp (according to the IB Spec V1.2), the
draining status should returned.

Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>
---
Roland,
   Without this patch, sq_draining management can be done only
via the draining event.  Furthermore, the current situation
does not comply with the IB Spec.
Finally, the ABI structure change is only a name change -
no need to increment the ABI version.

Also, please enter this change for libibverbs 1.1 as well.

Index: 1.1/src/userspace/libibverbs-1.0/src/cmd.c
===================================================================
--- 1.1.orig/src/userspace/libibverbs-1.0/src/cmd.c	2006-08-06 10:27:11.000000000 +0300
+++ 1.1/src/userspace/libibverbs-1.0/src/cmd.c	2006-10-25 12:20:00.385513000 +0200
@@ -633,7 +633,7 @@ int ibv_cmd_query_qp(struct ibv_qp *qp, 
 	attr->cur_qp_state                  = resp.cur_qp_state;
 	attr->path_mtu                      = resp.path_mtu;
 	attr->path_mig_state                = resp.path_mig_state;
-	attr->en_sqd_async_notify           = resp.en_sqd_async_notify;
+	attr->sq_draining                   = resp.sq_draining;
 	attr->max_rd_atomic                 = resp.max_rd_atomic;
 	attr->max_dest_rd_atomic            = resp.max_dest_rd_atomic;
 	attr->min_rnr_timer                 = resp.min_rnr_timer;
Index: 1.1/src/userspace/libibverbs-1.0/include/infiniband/kern-abi.h
===================================================================
--- 1.1.orig/src/userspace/libibverbs-1.0/include/infiniband/kern-abi.h	2006-08-06 10:27:09.000000000 +0300
+++ 1.1/src/userspace/libibverbs-1.0/include/infiniband/kern-abi.h	2006-10-25 12:06:17.282533000 +0200
@@ -506,7 +506,7 @@ struct ibv_query_qp_resp {
 	__u8  cur_qp_state;
 	__u8  path_mtu;
 	__u8  path_mig_state;
-	__u8  en_sqd_async_notify;
+	__u8  sq_draining;
 	__u8  max_rd_atomic;
 	__u8  max_dest_rd_atomic;
 	__u8  min_rnr_timer;




More information about the general mailing list