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
80020f5d
Commit
80020f5d
authored
Jun 12, 2003
by
Herbert Xu
Committed by
David S. Miller
Jun 12, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[IPSEC]: Kill object argument from flow_cache_flush.
parent
6383fad8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
include/net/flow.h
include/net/flow.h
+1
-1
net/core/flow.c
net/core/flow.c
+8
-8
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_policy.c
+1
-1
No files found.
include/net/flow.h
View file @
80020f5d
...
...
@@ -87,7 +87,7 @@ typedef void (*flow_resolve_t)(struct flowi *key, u16 family, u8 dir,
extern
void
*
flow_cache_lookup
(
struct
flowi
*
key
,
u16
family
,
u8
dir
,
flow_resolve_t
resolver
);
extern
void
flow_cache_flush
(
void
*
object
);
extern
void
flow_cache_flush
(
void
);
extern
atomic_t
flow_cache_genid
;
#endif
net/core/flow.c
View file @
80020f5d
...
...
@@ -54,7 +54,6 @@ static struct timer_list flow_hash_rnd_timer;
#define FLOW_HASH_RND_PERIOD (10 * 60 * HZ)
struct
flow_flush_info
{
void
*
object
;
atomic_t
cpuleft
;
struct
completion
completion
;
};
...
...
@@ -224,18 +223,20 @@ void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir,
static
void
flow_cache_flush_tasklet
(
unsigned
long
data
)
{
struct
flow_flush_info
*
info
=
(
void
*
)
data
;
void
*
object
=
info
->
object
;
int
i
;
int
cpu
;
cpu
=
smp_processor_id
();
for
(
i
=
0
;
i
<
flow_hash_size
;
i
++
)
{
struct
flow_cache_entry
*
fle
,
**
flp
;
struct
flow_cache_entry
*
fle
;
flp
=
&
flow_table
[(
cpu
<<
flow_hash_shift
)
+
i
];
for
(;
(
fle
=
*
flp
)
!=
NULL
;
flp
=
&
fle
->
next
)
{
if
(
fle
->
object
!=
object
)
fle
=
flow_table
[(
cpu
<<
flow_hash_shift
)
+
i
];
for
(;
fle
;
fle
=
fle
->
next
)
{
unsigned
genid
=
atomic_read
(
&
flow_cache_genid
);
if
(
!
fle
->
object
||
fle
->
genid
==
genid
)
continue
;
fle
->
object
=
NULL
;
atomic_dec
(
fle
->
object_ref
);
}
...
...
@@ -257,11 +258,10 @@ static void flow_cache_flush_per_cpu(void *data)
tasklet_schedule
(
tasklet
);
}
void
flow_cache_flush
(
void
*
object
)
void
flow_cache_flush
(
void
)
{
struct
flow_flush_info
info
;
info
.
object
=
object
;
atomic_set
(
&
info
.
cpuleft
,
num_online_cpus
());
init_completion
(
&
info
.
completion
);
...
...
net/xfrm/xfrm_policy.c
View file @
80020f5d
...
...
@@ -224,7 +224,7 @@ static void xfrm_policy_gc_kill(struct xfrm_policy *policy)
atomic_dec
(
&
policy
->
refcnt
);
if
(
atomic_read
(
&
policy
->
refcnt
)
>
1
)
flow_cache_flush
(
policy
);
flow_cache_flush
();
xfrm_pol_put
(
policy
);
}
...
...
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