commit 4dacd1a8270aa226bfff157af4519fa33c820253
Author: Olaf Kirch <[EMAIL PROTECTED]>
Date: Wed May 7 10:42:55 2008 +0200
Fix RDS congestion monitoring
The RDS congestion monitoring code tries to help applications deal with
remote congestion more efficiently. If enabled, an application that tried
to send to a congested port will receive a notification as soon as the
port becomes uncongested again. For efficiency reasons, the application
isn't given a complete 8K congestion bitmap, but a 64bit mask that
represents the ports having changed, with port N being represented by
(1 << (port % 64))
The macro used to translate port numbers to the mask bit shifted integer
1, not 1ULL, resulting in undefined behavior when (port % 64) >= 32
Signed-off-by: Olaf Kirch <[EMAIL PROTECTED]>
diff --git a/net/ib_rds.h b/net/ib_rds.h
index cea73fc..e098036 100644
--- a/net/ib_rds.h
+++ b/net/ib_rds.h
@@ -176,7 +176,7 @@ struct rds_info_tcp_socket {
*/
#define RDS_CONG_MONITOR_SIZE 64
#define RDS_CONG_MONITOR_BIT(port) (((unsigned int) port) %
RDS_CONG_MONITOR_SIZE)
-#define RDS_CONG_MONITOR_MASK(port) (1 << RDS_CONG_MONITOR_BIT(port))
+#define RDS_CONG_MONITOR_MASK(port) (1ULL << RDS_CONG_MONITOR_BIT(port))
/*
* RDMA related types
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
[EMAIL PROTECTED] | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
_______________________________________________
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