From: Amir Noam <amir.noam@intel.com>
To: bonding-devel@lists.sourceforge.net, netdev@oss.sgi.com
Subject: [PATCH 2/10] [bonding 2.6] fix load balance problem with high UDP Tx stress
Date: Thu, 4 Sep 2003 20:44:07 +0300 [thread overview]
Message-ID: <200309042044.07510.amir.noam@intel.com> (raw)
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;
reply other threads:[~2003-09-04 17:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200309042044.07510.amir.noam@intel.com \
--to=amir.noam@intel.com \
--cc=bonding-devel@lists.sourceforge.net \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.