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
Kirill Smelkov
linux
Commits
550da6a8
Commit
550da6a8
authored
Sep 20, 2003
by
Amir Noam
Committed by
Stephen Hemminger
Sep 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] [bonding 2.6] fix assign_current_slave
parent
7527f000
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
17 deletions
+14
-17
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_main.c
+14
-17
No files found.
drivers/net/bonding/bond_main.c
View file @
550da6a8
...
@@ -590,19 +590,6 @@ static void change_active_interface(struct bonding *bond, struct slave *new);
...
@@ -590,19 +590,6 @@ static void change_active_interface(struct bonding *bond, struct slave *new);
static
void
reselect_active_interface
(
struct
bonding
*
bond
);
static
void
reselect_active_interface
(
struct
bonding
*
bond
);
static
struct
slave
*
find_best_interface
(
struct
bonding
*
bond
);
static
struct
slave
*
find_best_interface
(
struct
bonding
*
bond
);
/* Caller must hold bond->ptrlock for write */
static
inline
struct
slave
*
bond_assign_current_slave
(
struct
bonding
*
bond
,
struct
slave
*
newslave
)
{
if
((
bond_mode
==
BOND_MODE_TLB
)
||
(
bond_mode
==
BOND_MODE_ALB
))
{
bond_alb_assign_current_slave
(
bond
,
newslave
);
}
else
{
bond
->
current_slave
=
newslave
;
}
return
bond
->
current_slave
;
}
/* #define BONDING_DEBUG 1 */
/* #define BONDING_DEBUG 1 */
...
@@ -1640,8 +1627,13 @@ static int bond_enslave(struct net_device *master_dev,
...
@@ -1640,8 +1627,13 @@ static int bond_enslave(struct net_device *master_dev,
#endif
#endif
/* always active in trunk mode */
/* always active in trunk mode */
new_slave
->
state
=
BOND_STATE_ACTIVE
;
new_slave
->
state
=
BOND_STATE_ACTIVE
;
/* In trunking mode there is little meaning to current_slave
* anyway (it holds no special properties of the bond device),
* so we can change it without calling change_active_interface()
*/
if
(
bond
->
current_slave
==
NULL
)
if
(
bond
->
current_slave
==
NULL
)
bond
_assign_current_slave
(
bond
,
new_slave
)
;
bond
->
current_slave
=
new_slave
;
}
}
write_unlock_bh
(
&
bond
->
lock
);
write_unlock_bh
(
&
bond
->
lock
);
...
@@ -1894,7 +1886,12 @@ static void change_active_interface(struct bonding *bond, struct slave *new)
...
@@ -1894,7 +1886,12 @@ static void change_active_interface(struct bonding *bond, struct slave *new)
bond_mc_update
(
bond
,
new
,
old
);
bond_mc_update
(
bond
,
new
,
old
);
}
}
bond_assign_current_slave
(
bond
,
new
);
if
((
bond_mode
==
BOND_MODE_TLB
)
||
(
bond_mode
==
BOND_MODE_ALB
))
{
bond_alb_assign_current_slave
(
bond
,
new
);
}
else
{
bond
->
current_slave
=
new
;
}
}
}
/**
/**
...
@@ -2103,7 +2100,7 @@ static int bond_release_all(struct net_device *master)
...
@@ -2103,7 +2100,7 @@ static int bond_release_all(struct net_device *master)
}
}
old_current
=
bond
->
current_slave
;
old_current
=
bond
->
current_slave
;
bond_assign_current_slav
e
(
bond
,
NULL
);
change_active_interfac
e
(
bond
,
NULL
);
bond
->
current_arp_slave
=
NULL
;
bond
->
current_arp_slave
=
NULL
;
bond
->
primary_slave
=
NULL
;
bond
->
primary_slave
=
NULL
;
...
@@ -3154,7 +3151,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *dev)
...
@@ -3154,7 +3151,7 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *dev)
dev_queue_xmit
(
skb
);
dev_queue_xmit
(
skb
);
write_lock
(
&
bond
->
ptrlock
);
write_lock
(
&
bond
->
ptrlock
);
bond
_assign_current_slave
(
bond
,
slave
->
next
)
;
bond
->
current_slave
=
slave
->
next
;
write_unlock
(
&
bond
->
ptrlock
);
write_unlock
(
&
bond
->
ptrlock
);
read_unlock
(
&
bond
->
lock
);
read_unlock
(
&
bond
->
lock
);
...
...
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