* [PATCH 2/10] [bonding 2.6] fix load balance problem with high UDP Tx stress
@ 2003-09-04 17:44 Amir Noam
0 siblings, 0 replies; only message in thread
From: Amir Noam @ 2003-09-04 17:44 UTC (permalink / raw)
To: bonding-devel, netdev
diff -Nuarp a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
--- a/drivers/net/bonding/bond_alb.c Thu Sep 4 20:17:54 2003
+++ b/drivers/net/bonding/bond_alb.c Thu Sep 4 20:17:55 2003
@@ -17,6 +17,13 @@
*
* The full GNU General Public License is included in this distribution in the
* file called LICENSE.
+ *
+ *
+ * Changes:
+ *
+ * 2003/06/25 - Shmulik Hen <shmulik.hen at intel dot com>
+ * - Fixed signed/unsigned calculation errors that caused load sharing
+ * to collapse to one slave under very heavy UDP Tx stress.
*/
#include <linux/skbuff.h>
@@ -246,7 +253,7 @@ tlb_get_least_loaded_slave(struct bondin
{
struct slave *slave;
struct slave *least_loaded;
- u32 curr_gap, max_gap;
+ s64 curr_gap, max_gap;
/* Find the first enabled slave */
slave = bond_get_first_slave(bond);
@@ -262,15 +269,15 @@ tlb_get_least_loaded_slave(struct bondin
}
least_loaded = slave;
- max_gap = (slave->speed * 1000000) -
- (SLAVE_TLB_INFO(slave).load * 8);
+ max_gap = (s64)(slave->speed * 1000000) -
+ (s64)(SLAVE_TLB_INFO(slave).load * 8);
/* Find the slave with the largest gap */
slave = bond_get_next_slave(bond, slave);
while (slave) {
if (SLAVE_IS_OK(slave)) {
- curr_gap = (slave->speed * 1000000) -
- (SLAVE_TLB_INFO(slave).load * 8);
+ curr_gap = (s64)(slave->speed * 1000000) -
+ (s64)(SLAVE_TLB_INFO(slave).load * 8);
if (max_gap < curr_gap) {
least_loaded = slave;
max_gap = curr_gap;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-09-04 17:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-04 17:44 [PATCH 2/10] [bonding 2.6] fix load balance problem with high UDP Tx stress Amir Noam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).