Fix for bug 1311
https://bugs.openfabrics.org/show_bug.cgi?id=1311
Signed-off-by: Nicolas Morey-Chaisemartin
<[EMAIL PROTECTED]>
---
drivers/infiniband/ulp/sdp/sdp_bcopy.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/infiniband/ulp/sdp/sdp_bcopy.c b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
index 7dd0d06..671a2cc 100644
--- a/drivers/infiniband/ulp/sdp/sdp_bcopy.c
+++ b/drivers/infiniband/ulp/sdp/sdp_bcopy.c
@@ -604,7 +604,15 @@ int sdp_init_buffers(struct sdp_sock *ssk, u32 new_size)
int sdp_resize_buffers(struct sdp_sock *ssk, u32 new_size)
{
u32 curr_size = SDP_HEAD_SIZE + ssk->recv_frags * PAGE_SIZE;
+#if defined(__ia64__)
+ /* for huge PAGE_SIZE systems, aka IA64, limit buffers size
+[re-]negotiation to a known+working size that will not trigger a HW error/rc to
+be interpreted as a IB_WC_LOC_LEN_ERR */
+ u32 max_size = (SDP_HEAD_SIZE + SDP_MAX_SEND_SKB_FRAGS * PAGE_SIZE) <=
+32784 ? (SDP_HEAD_SIZE + SDP_MAX_SEND_SKB_FRAGS * PAGE_SIZE) : 32784 ;
+#else
u32 max_size = SDP_HEAD_SIZE + SDP_MAX_SEND_SKB_FRAGS * PAGE_SIZE;
+#endif
if (new_size > curr_size && new_size <= max_size &&
sdp_get_large_socket(ssk)) {
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general