Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c90482ab
Commit
c90482ab
authored
Sep 11, 2003
by
Amir Noam
Committed by
Stephen Hemminger
Sep 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bonding 2.6] fix load balance problem with high UDP Tx stress
parent
e27e4d96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_alb.c
+12
-5
No files found.
drivers/net/bonding/bond_alb.c
View file @
c90482ab
...
@@ -17,6 +17,13 @@
...
@@ -17,6 +17,13 @@
*
*
* The full GNU General Public License is included in this distribution in the
* The full GNU General Public License is included in this distribution in the
* file called LICENSE.
* 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>
#include <linux/skbuff.h>
...
@@ -246,7 +253,7 @@ tlb_get_least_loaded_slave(struct bonding *bond)
...
@@ -246,7 +253,7 @@ tlb_get_least_loaded_slave(struct bonding *bond)
{
{
struct
slave
*
slave
;
struct
slave
*
slave
;
struct
slave
*
least_loaded
;
struct
slave
*
least_loaded
;
u32
curr_gap
,
max_gap
;
s64
curr_gap
,
max_gap
;
/* Find the first enabled slave */
/* Find the first enabled slave */
slave
=
bond_get_first_slave
(
bond
);
slave
=
bond_get_first_slave
(
bond
);
...
@@ -262,15 +269,15 @@ tlb_get_least_loaded_slave(struct bonding *bond)
...
@@ -262,15 +269,15 @@ tlb_get_least_loaded_slave(struct bonding *bond)
}
}
least_loaded
=
slave
;
least_loaded
=
slave
;
max_gap
=
(
slave
->
speed
*
1000000
)
-
max_gap
=
(
s
64
)(
s
lave
->
speed
*
1000000
)
-
(
SLAVE_TLB_INFO
(
slave
).
load
*
8
);
(
s64
)
(
SLAVE_TLB_INFO
(
slave
).
load
*
8
);
/* Find the slave with the largest gap */
/* Find the slave with the largest gap */
slave
=
bond_get_next_slave
(
bond
,
slave
);
slave
=
bond_get_next_slave
(
bond
,
slave
);
while
(
slave
)
{
while
(
slave
)
{
if
(
SLAVE_IS_OK
(
slave
))
{
if
(
SLAVE_IS_OK
(
slave
))
{
curr_gap
=
(
slave
->
speed
*
1000000
)
-
curr_gap
=
(
s
64
)(
s
lave
->
speed
*
1000000
)
-
(
SLAVE_TLB_INFO
(
slave
).
load
*
8
);
(
s64
)
(
SLAVE_TLB_INFO
(
slave
).
load
*
8
);
if
(
max_gap
<
curr_gap
)
{
if
(
max_gap
<
curr_gap
)
{
least_loaded
=
slave
;
least_loaded
=
slave
;
max_gap
=
curr_gap
;
max_gap
=
curr_gap
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment