]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commit559492425fcf5ae0f9eabc7d2d2feb7771d489dd
treebd1193e46b1504eef7eb07b116bdfce67b1ca4f2
parentbb5de68eba98d605cf0ed6068611a56a5968b6de
[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