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
e959f4cc
Commit
e959f4cc
authored
Sep 23, 2004
by
David S. Miller
Committed by
David S. Miller
Sep 23, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Create neigh_lookup_nodev for decnet.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
81a49f62
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
23 deletions
+21
-23
include/net/dn_neigh.h
include/net/dn_neigh.h
+0
-1
include/net/neighbour.h
include/net/neighbour.h
+2
-0
net/core/neighbour.c
net/core/neighbour.c
+18
-0
net/decnet/dn_neigh.c
net/decnet/dn_neigh.c
+0
-21
net/decnet/dn_route.c
net/decnet/dn_route.c
+1
-1
No files found.
include/net/dn_neigh.h
View file @
e959f4cc
...
...
@@ -18,7 +18,6 @@ struct dn_neigh {
extern
void
dn_neigh_init
(
void
);
extern
void
dn_neigh_cleanup
(
void
);
extern
struct
neighbour
*
dn_neigh_lookup
(
struct
neigh_table
*
tbl
,
const
void
*
ptr
);
extern
int
dn_neigh_router_hello
(
struct
sk_buff
*
skb
);
extern
int
dn_neigh_endnode_hello
(
struct
sk_buff
*
skb
);
extern
void
dn_neigh_pointopoint_hello
(
struct
sk_buff
*
skb
);
...
...
include/net/neighbour.h
View file @
e959f4cc
...
...
@@ -189,6 +189,8 @@ extern int neigh_table_clear(struct neigh_table *tbl);
extern
struct
neighbour
*
neigh_lookup
(
struct
neigh_table
*
tbl
,
const
void
*
pkey
,
struct
net_device
*
dev
);
extern
struct
neighbour
*
neigh_lookup_nodev
(
struct
neigh_table
*
tbl
,
const
void
*
pkey
);
extern
struct
neighbour
*
neigh_create
(
struct
neigh_table
*
tbl
,
const
void
*
pkey
,
struct
net_device
*
dev
);
...
...
net/core/neighbour.c
View file @
e959f4cc
...
...
@@ -307,6 +307,23 @@ struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
return
n
;
}
struct
neighbour
*
neigh_lookup_nodev
(
struct
neigh_table
*
tbl
,
const
void
*
pkey
)
{
struct
neighbour
*
n
;
int
key_len
=
tbl
->
key_len
;
u32
hash_val
=
tbl
->
hash
(
pkey
,
NULL
)
&
NEIGH_HASHMASK
;
read_lock_bh
(
&
tbl
->
lock
);
for
(
n
=
tbl
->
hash_buckets
[
hash_val
];
n
;
n
=
n
->
next
)
{
if
(
!
memcmp
(
n
->
primary_key
,
pkey
,
key_len
))
{
neigh_hold
(
n
);
break
;
}
}
read_unlock_bh
(
&
tbl
->
lock
);
return
n
;
}
struct
neighbour
*
neigh_create
(
struct
neigh_table
*
tbl
,
const
void
*
pkey
,
struct
net_device
*
dev
)
{
...
...
@@ -2068,6 +2085,7 @@ EXPORT_SYMBOL(neigh_dump_info);
EXPORT_SYMBOL
(
neigh_event_ns
);
EXPORT_SYMBOL
(
neigh_ifdown
);
EXPORT_SYMBOL
(
neigh_lookup
);
EXPORT_SYMBOL
(
neigh_lookup_nodev
);
EXPORT_SYMBOL
(
neigh_parms_alloc
);
EXPORT_SYMBOL
(
neigh_parms_release
);
EXPORT_SYMBOL
(
neigh_rand_reach_time
);
...
...
net/decnet/dn_neigh.c
View file @
e959f4cc
...
...
@@ -359,27 +359,6 @@ static int dn_phase3_output(struct sk_buff *skb)
* basically does a neigh_lookup(), but without comparing the device
* field. This is required for the On-Ethernet cache
*/
struct
neighbour
*
dn_neigh_lookup
(
struct
neigh_table
*
tbl
,
const
void
*
ptr
)
{
struct
neighbour
*
neigh
;
u32
hash_val
;
hash_val
=
tbl
->
hash
(
ptr
,
NULL
);
read_lock_bh
(
&
tbl
->
lock
);
for
(
neigh
=
tbl
->
hash_buckets
[
hash_val
];
neigh
!=
NULL
;
neigh
=
neigh
->
next
)
{
if
(
memcmp
(
neigh
->
primary_key
,
ptr
,
tbl
->
key_len
)
==
0
)
{
atomic_inc
(
&
neigh
->
refcnt
);
read_unlock_bh
(
&
tbl
->
lock
);
return
neigh
;
}
}
read_unlock_bh
(
&
tbl
->
lock
);
return
NULL
;
}
/*
* Any traffic on a pointopoint link causes the timer to be reset
* for the entry in the neighbour table.
...
...
net/decnet/dn_route.c
View file @
e959f4cc
...
...
@@ -996,7 +996,7 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowi *old
* here
*/
if
(
!
try_hard
)
{
neigh
=
dn_neigh_lookup
(
&
dn_neigh_table
,
&
fl
.
fld_dst
);
neigh
=
neigh_lookup_nodev
(
&
dn_neigh_table
,
&
fl
.
fld_dst
);
if
(
neigh
)
{
if
((
oldflp
->
oif
&&
(
neigh
->
dev
->
ifindex
!=
oldflp
->
oif
))
||
...
...
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