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
9eeebb5b
Commit
9eeebb5b
authored
Oct 30, 2011
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'batman-adv/maint' of
git://git.open-mesh.org/linux-merge
parents
3ddb709a
93840ac4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
net/batman-adv/translation-table.c
net/batman-adv/translation-table.c
+16
-1
net/batman-adv/types.h
net/batman-adv/types.h
+2
-2
No files found.
net/batman-adv/translation-table.c
View file @
9eeebb5b
...
...
@@ -137,10 +137,22 @@ static void tt_local_entry_free_ref(struct tt_local_entry *tt_local_entry)
kfree_rcu
(
tt_local_entry
,
rcu
);
}
static
void
tt_global_entry_free_rcu
(
struct
rcu_head
*
rcu
)
{
struct
tt_global_entry
*
tt_global_entry
;
tt_global_entry
=
container_of
(
rcu
,
struct
tt_global_entry
,
rcu
);
if
(
tt_global_entry
->
orig_node
)
orig_node_free_ref
(
tt_global_entry
->
orig_node
);
kfree
(
tt_global_entry
);
}
static
void
tt_global_entry_free_ref
(
struct
tt_global_entry
*
tt_global_entry
)
{
if
(
atomic_dec_and_test
(
&
tt_global_entry
->
refcount
))
kfree_rcu
(
tt_global_entry
,
rcu
);
call_rcu
(
&
tt_global_entry
->
rcu
,
tt_global_entry_free_
rcu
);
}
static
void
tt_local_event
(
struct
bat_priv
*
bat_priv
,
const
uint8_t
*
addr
,
...
...
@@ -710,6 +722,9 @@ void tt_global_del_orig(struct bat_priv *bat_priv,
struct
hlist_head
*
head
;
spinlock_t
*
list_lock
;
/* protects write access to the hash lists */
if
(
!
hash
)
return
;
for
(
i
=
0
;
i
<
hash
->
size
;
i
++
)
{
head
=
&
hash
->
table
[
i
];
list_lock
=
&
hash
->
list_locks
[
i
];
...
...
net/batman-adv/types.h
View file @
9eeebb5b
...
...
@@ -224,22 +224,22 @@ struct socket_packet {
struct
tt_local_entry
{
uint8_t
addr
[
ETH_ALEN
];
struct
hlist_node
hash_entry
;
unsigned
long
last_seen
;
uint16_t
flags
;
atomic_t
refcount
;
struct
rcu_head
rcu
;
struct
hlist_node
hash_entry
;
};
struct
tt_global_entry
{
uint8_t
addr
[
ETH_ALEN
];
struct
hlist_node
hash_entry
;
/* entry in the global table */
struct
orig_node
*
orig_node
;
uint8_t
ttvn
;
uint16_t
flags
;
/* only TT_GLOBAL_ROAM is used */
unsigned
long
roam_at
;
/* time at which TT_GLOBAL_ROAM was set */
atomic_t
refcount
;
struct
rcu_head
rcu
;
struct
hlist_node
hash_entry
;
/* entry in the global table */
};
struct
tt_change_node
{
...
...
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