[PATCH] IPoIB: fix static rate calculation
authorRoland Dreier <roland@topspin.com>
Sat, 16 Apr 2005 22:26:06 +0000 (15:26 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 16 Apr 2005 22:26:06 +0000 (15:26 -0700)
commite6ded99cbbbfef2cef537d717ad61d2f77f4dfd6
tree44ef73e8f9ac7bdfc71ff3286e6b2715aafbbd9d
parent62241eb497721be7640e5d9330e60f4a88a4db46
[PATCH] IPoIB: fix static rate calculation

Correct and simplify calculation of static rate.  We need to round up the
quotient of (local_rate - path_rate) / path_rate.  To round up we add
(path_rate - 1) to the numerator, so the quotient simplifies to (local_rate -
1) / path_rate.

No idea how I came up with the old formula.

Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/infiniband/ulp/ipoib/ipoib_main.c
drivers/infiniband/ulp/ipoib/ipoib_multicast.c