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
8586007c
Commit
8586007c
authored
Jan 10, 2004
by
Shmulik Hen
Committed by
Jeff Garzik
Jan 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] bonding cleanup 2.6 - fix indentations.
parent
bc74d636
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
42 deletions
+42
-42
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_alb.c
+7
-7
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_main.c
+35
-35
No files found.
drivers/net/bonding/bond_alb.c
View file @
8586007c
...
...
@@ -907,8 +907,8 @@ static void alb_swap_mac_addr(struct bonding *bond, struct slave *slave1, struct
if
(
bond
->
alb_info
.
rlb_enabled
&&
slaves_state_differ
)
{
/* A disabled slave was assigned an active mac addr */
rlb_teach_disabled_mac_on_primary
(
bond
,
disabled_slave
->
dev
->
dev_addr
);
rlb_teach_disabled_mac_on_primary
(
bond
,
disabled_slave
->
dev
->
dev_addr
);
}
}
...
...
@@ -942,8 +942,8 @@ static void alb_change_hw_addr_on_detach(struct bonding *bond, struct slave *sla
if
(
perm_curr_diff
&&
perm_bond_diff
)
{
bond_for_each_slave
(
bond
,
tmp_slave
,
i
)
{
if
(
!
memcmp
(
slave
->
perm_hwaddr
,
tmp_slave
->
dev
->
dev_addr
,
ETH_ALEN
))
{
tmp_slave
->
dev
->
dev_addr
,
ETH_ALEN
))
{
found
=
1
;
break
;
}
...
...
@@ -1247,8 +1247,8 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
skb
->
dev
=
tx_slave
->
dev
;
if
(
tx_slave
!=
bond
->
curr_active_slave
)
{
memcpy
(
eth_data
->
h_source
,
tx_slave
->
dev
->
dev_addr
,
ETH_ALEN
);
tx_slave
->
dev
->
dev_addr
,
ETH_ALEN
);
}
dev_queue_xmit
(
skb
);
}
else
{
...
...
@@ -1495,7 +1495,7 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
/* find slave that is holding the bond's mac address */
bond_for_each_slave
(
bond
,
swap_slave
,
i
)
{
if
(
!
memcmp
(
swap_slave
->
dev
->
dev_addr
,
bond
->
dev
->
dev_addr
,
ETH_ALEN
))
{
bond
->
dev
->
dev_addr
,
ETH_ALEN
))
{
found
=
1
;
break
;
}
...
...
drivers/net/bonding/bond_main.c
View file @
8586007c
...
...
@@ -736,20 +736,20 @@ static int bond_update_speed_duplex(struct slave *slave)
}
switch
(
slave
->
speed
)
{
case
SPEED_10
:
case
SPEED_100
:
case
SPEED_1000
:
break
;
default:
goto
err_out
;
case
SPEED_10
:
case
SPEED_100
:
case
SPEED_1000
:
break
;
default:
goto
err_out
;
}
switch
(
slave
->
duplex
)
{
case
DUPLEX_FULL
:
case
DUPLEX_HALF
:
break
;
default:
goto
err_out
;
case
DUPLEX_FULL
:
case
DUPLEX_HALF
:
break
;
default:
goto
err_out
;
}
return
0
;
...
...
@@ -814,8 +814,8 @@ static int bond_check_dev_link(struct net_device *slave_dev, int reporting)
/* try SIOCETHTOOL ioctl, some drivers cache ETHTOOL_GLINK */
/* for a period of time so we attempt to get link status */
/* from it last if the above MII ioctls fail... */
etool
.
cmd
=
ETHTOOL_GLINK
;
ifr
.
ifr_data
=
(
char
*
)
&
etool
;
etool
.
cmd
=
ETHTOOL_GLINK
;
ifr
.
ifr_data
=
(
char
*
)
&
etool
;
if
(
IOCTL
(
slave_dev
,
&
ifr
,
SIOCETHTOOL
)
==
0
)
{
if
(
etool
.
data
==
1
)
{
return
BMSR_LSTATUS
;
...
...
@@ -1053,7 +1053,7 @@ static int bond_mc_list_copy(struct dev_mc_list *mc_list, struct bonding *bond,
{
struct
dev_mc_list
*
dmi
,
*
new_dmi
;
for
(
dmi
=
mc_list
;
dmi
;
dmi
=
dmi
->
next
)
{
for
(
dmi
=
mc_list
;
dmi
;
dmi
=
dmi
->
next
)
{
new_dmi
=
kmalloc
(
sizeof
(
struct
dev_mc_list
),
gpf_flag
);
if
(
!
new_dmi
)
{
...
...
@@ -1145,20 +1145,20 @@ static void bond_set_multicast_list(struct net_device *bond_dev)
/*
* Do promisc before checking multicast_mode
*/
if
(
(
bond_dev
->
flags
&
IFF_PROMISC
)
&&
!
(
bond
->
flags
&
IFF_PROMISC
)
)
{
if
(
(
bond_dev
->
flags
&
IFF_PROMISC
)
&&
!
(
bond
->
flags
&
IFF_PROMISC
)
)
{
bond_set_promiscuity
(
bond
,
1
);
}
if
(
!
(
bond_dev
->
flags
&
IFF_PROMISC
)
&&
(
bond
->
flags
&
IFF_PROMISC
)
)
{
if
(
!
(
bond_dev
->
flags
&
IFF_PROMISC
)
&&
(
bond
->
flags
&
IFF_PROMISC
)
)
{
bond_set_promiscuity
(
bond
,
-
1
);
}
/* set allmulti flag to slaves */
if
(
(
bond_dev
->
flags
&
IFF_ALLMULTI
)
&&
!
(
bond
->
flags
&
IFF_ALLMULTI
)
)
{
if
(
(
bond_dev
->
flags
&
IFF_ALLMULTI
)
&&
!
(
bond
->
flags
&
IFF_ALLMULTI
)
)
{
bond_set_allmulti
(
bond
,
1
);
}
if
(
!
(
bond_dev
->
flags
&
IFF_ALLMULTI
)
&&
(
bond
->
flags
&
IFF_ALLMULTI
)
)
{
if
(
!
(
bond_dev
->
flags
&
IFF_ALLMULTI
)
&&
(
bond
->
flags
&
IFF_ALLMULTI
)
)
{
bond_set_allmulti
(
bond
,
-
1
);
}
...
...
@@ -1324,13 +1324,13 @@ static int bond_enslave(struct net_device *bond_dev, struct net_device *slave_de
* The application already set the master's
* mac address to that of the first slave
*/
memcpy
(
addr
.
sa_data
,
bond_dev
->
dev_addr
,
bond_dev
->
addr_len
);
addr
.
sa_family
=
slave_dev
->
type
;
res
=
slave_dev
->
set_mac_address
(
slave_dev
,
&
addr
);
if
(
res
)
{
dprintk
(
"Error %d calling set_mac_address
\n
"
,
res
);
goto
err_free
;
}
memcpy
(
addr
.
sa_data
,
bond_dev
->
dev_addr
,
bond_dev
->
addr_len
);
addr
.
sa_family
=
slave_dev
->
type
;
res
=
slave_dev
->
set_mac_address
(
slave_dev
,
&
addr
);
if
(
res
)
{
dprintk
(
"Error %d calling set_mac_address
\n
"
,
res
);
goto
err_free
;
}
/* open the slave since the application closed it */
res
=
dev_open
(
slave_dev
);
...
...
@@ -2274,7 +2274,7 @@ static void bond_mii_monitor(struct net_device *bond_dev)
default:
/* Should not happen */
printk
(
KERN_ERR
"bonding: Error: %s Illegal value (link=%d)
\n
"
,
slave
->
dev
->
name
,
slave
->
link
);
slave
->
dev
->
name
,
slave
->
link
);
goto
out
;
}
/* end of switch (slave->link) */
...
...
@@ -2350,8 +2350,8 @@ static void bond_loadbalance_arp_mon(struct net_device *bond_dev)
* so it can wait
*/
bond_for_each_slave
(
bond
,
slave
,
i
)
{
if
(
slave
->
link
!=
BOND_LINK_UP
)
{
if
(((
jiffies
-
slave
->
dev
->
trans_start
)
<=
delta_in_ticks
)
&&
if
(
slave
->
link
!=
BOND_LINK_UP
)
{
if
(((
jiffies
-
slave
->
dev
->
trans_start
)
<=
delta_in_ticks
)
&&
((
jiffies
-
slave
->
dev
->
last_rx
)
<=
delta_in_ticks
))
{
slave
->
link
=
BOND_LINK_UP
;
...
...
@@ -2476,7 +2476,7 @@ static void bond_activebackup_arp_mon(struct net_device *bond_dev)
* so it can wait
*/
bond_for_each_slave
(
bond
,
slave
,
i
)
{
if
(
slave
->
link
!=
BOND_LINK_UP
)
{
if
(
slave
->
link
!=
BOND_LINK_UP
)
{
if
((
jiffies
-
slave
->
dev
->
last_rx
)
<=
delta_in_ticks
)
{
slave
->
link
=
BOND_LINK_UP
;
...
...
@@ -3367,7 +3367,7 @@ static int bond_info_open(struct inode *inode, struct file *file)
}
static
struct
file_operations
bond_info_fops
=
{
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
open
=
bond_info_open
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
...
...
@@ -3875,7 +3875,7 @@ static inline int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl)
if
((
isdigit
(
*
mode_arg
)
&&
tbl
[
i
].
mode
==
simple_strtol
(
mode_arg
,
NULL
,
0
))
||
(
strncmp
(
mode_arg
,
tbl
[
i
].
modename
,
strlen
(
tbl
[
i
].
modename
))
==
0
))
{
strlen
(
tbl
[
i
].
modename
))
==
0
))
{
return
tbl
[
i
].
mode
;
}
}
...
...
@@ -4044,9 +4044,9 @@ static int bond_check_params(void)
arp_interval
=
BOND_LINK_ARP_INTERV
;
}
for
(
arp_ip_count
=
0
;
(
arp_ip_count
<
MAX_ARP_IP_TARGETS
)
&&
arp_ip_target
[
arp_ip_count
];
arp_ip_count
++
)
{
for
(
arp_ip_count
=
0
;
(
arp_ip_count
<
MAX_ARP_IP_TARGETS
)
&&
arp_ip_target
[
arp_ip_count
];
arp_ip_count
++
)
{
/* not complete check, but should be good enough to
catch mistakes */
if
(
!
isdigit
(
arp_ip_target
[
arp_ip_count
][
0
]))
{
...
...
@@ -4059,7 +4059,7 @@ static int bond_check_params(void)
u32
ip
=
in_aton
(
arp_ip_target
[
arp_ip_count
]);
arp_target
[
arp_ip_count
]
=
ip
;
}
}
}
if
(
arp_interval
&&
!
arp_ip_count
)
{
/* don't allow arping if no arp_ip_target given... */
...
...
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