[openib-general] [PATCH] libmthca: fix max_inline_data calculation

Michael S. Tsirkin mst at mellanox.co.il
Mon Oct 31 01:20:36 PST 2005


Hello, Roland!
Please consider this patch.

Fix max_inline_data calculation: we add mthca_bind_seg when calculating
wqe size, so we should substract mthca_bind_seg as well.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: userspace/libmthca/src/qp.c
===================================================================
--- userspace.orig/libmthca/src/qp.c	2005-10-30 09:25:43.000000000 +0200
+++ userspace/libmthca/src/qp.c	2005-10-31 11:15:10.000000000 +0200
@@ -787,7 +787,8 @@ void mthca_return_cap(struct ibv_pd *pd,
 		break;
 
 	default:
-		cap->max_inline_data -= sizeof (struct mthca_raddr_seg);
+		/* bind seg is as big as atomic + raddr segs */
+		cap->max_inline_data -= sizeof (struct mthca_bind_seg);
 		break;
 	}
 

-- 
MST



More information about the general mailing list