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
367c8f00
Commit
367c8f00
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] embed stats struct inside bonding private struct
parent
45c72c85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
drivers/net/bonding/bond_main.c
drivers/net/bonding/bond_main.c
+4
-7
drivers/net/bonding/bonding.h
drivers/net/bonding/bonding.h
+1
-1
No files found.
drivers/net/bonding/bond_main.c
View file @
367c8f00
...
...
@@ -3295,10 +3295,10 @@ static int bond_xmit_activebackup(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
bond_get_stats
(
struct
net_device
*
dev
)
{
bonding_t
*
bond
=
dev
->
priv
;
struct
net_device_stats
*
stats
=
bond
->
stats
,
*
sstats
;
struct
net_device_stats
*
stats
=
&
(
bond
->
stats
)
,
*
sstats
;
slave_t
*
slave
;
memset
(
bond
->
stats
,
0
,
sizeof
(
struct
net_device_stats
));
memset
(
stats
,
0
,
sizeof
(
struct
net_device_stats
));
read_lock_bh
(
&
bond
->
lock
);
...
...
@@ -3493,9 +3493,7 @@ static int __init bond_init(struct net_device *dev)
/* initialize rwlocks */
rwlock_init
(
&
bond
->
lock
);
rwlock_init
(
&
bond
->
ptrlock
);
/* space is reserved for stats in alloc_netdev call. */
bond
->
stats
=
(
struct
net_device_stats
*
)(
bond
+
1
);
bond
->
next
=
bond
->
prev
=
(
slave_t
*
)
bond
;
bond
->
current_slave
=
NULL
;
bond
->
current_arp_slave
=
NULL
;
...
...
@@ -3868,8 +3866,7 @@ static int __init bonding_init(void)
snprintf
(
name
,
IFNAMSIZ
,
"bond%d"
,
no
);
dev
=
alloc_netdev
(
sizeof
(
bonding_t
)
+
sizeof
(
struct
net_device_stats
),
dev
=
alloc_netdev
(
sizeof
(
struct
bonding
),
name
,
ether_setup
);
if
(
!
dev
)
return
-
ENOMEM
;
...
...
drivers/net/bonding/bonding.h
View file @
367c8f00
...
...
@@ -99,7 +99,7 @@ typedef struct bonding {
rwlock_t
ptrlock
;
struct
timer_list
mii_timer
;
struct
timer_list
arp_timer
;
struct
net_device_stats
*
stats
;
struct
net_device_stats
stats
;
#ifdef CONFIG_PROC_FS
struct
proc_dir_entry
*
bond_proc_dir
;
struct
proc_dir_entry
*
bond_proc_info_file
;
...
...
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