diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-18 03:40:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-18 03:40:17 -0400 |
commit | d3aaeb38c40e5a6c08dd31a1b64da65c4352be36 (patch) | |
tree | 1c17b41d11edc7a7b3477a294cba440f2a14796c /net/decnet/dn_route.c | |
parent | 69cce1d1404968f78b177a0314f5822d5afdbbfb (diff) |
net: Add ->neigh_lookup() operation to dst_ops
In the future dst entries will be neigh-less. In that environment we
need to have an easy transition point for current users of
dst->neighbour outside of the packet output fast path.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_route.c')
-rw-r--r-- | net/decnet/dn_route.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index 9bd45fcb3b8e..43450c100226 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -116,6 +116,7 @@ static void dn_dst_destroy(struct dst_entry *); | |||
116 | static struct dst_entry *dn_dst_negative_advice(struct dst_entry *); | 116 | static struct dst_entry *dn_dst_negative_advice(struct dst_entry *); |
117 | static void dn_dst_link_failure(struct sk_buff *); | 117 | static void dn_dst_link_failure(struct sk_buff *); |
118 | static void dn_dst_update_pmtu(struct dst_entry *dst, u32 mtu); | 118 | static void dn_dst_update_pmtu(struct dst_entry *dst, u32 mtu); |
119 | static struct neighbour *dn_dst_neigh_lookup(const struct dst_entry *dst, const void *daddr); | ||
119 | static int dn_route_input(struct sk_buff *); | 120 | static int dn_route_input(struct sk_buff *); |
120 | static void dn_run_flush(unsigned long dummy); | 121 | static void dn_run_flush(unsigned long dummy); |
121 | 122 | ||
@@ -139,6 +140,7 @@ static struct dst_ops dn_dst_ops = { | |||
139 | .negative_advice = dn_dst_negative_advice, | 140 | .negative_advice = dn_dst_negative_advice, |
140 | .link_failure = dn_dst_link_failure, | 141 | .link_failure = dn_dst_link_failure, |
141 | .update_pmtu = dn_dst_update_pmtu, | 142 | .update_pmtu = dn_dst_update_pmtu, |
143 | .neigh_lookup = dn_dst_neigh_lookup, | ||
142 | }; | 144 | }; |
143 | 145 | ||
144 | static void dn_dst_destroy(struct dst_entry *dst) | 146 | static void dn_dst_destroy(struct dst_entry *dst) |
@@ -827,6 +829,11 @@ static unsigned int dn_dst_default_mtu(const struct dst_entry *dst) | |||
827 | return dst->dev->mtu; | 829 | return dst->dev->mtu; |
828 | } | 830 | } |
829 | 831 | ||
832 | static struct neighbour *dn_dst_neigh_lookup(const struct dst_entry *dst, const void *daddr) | ||
833 | { | ||
834 | return __neigh_lookup_errno(&dn_neigh_table, daddr, dst->dev); | ||
835 | } | ||
836 | |||
830 | static int dn_rt_set_next_hop(struct dn_route *rt, struct dn_fib_res *res) | 837 | static int dn_rt_set_next_hop(struct dn_route *rt, struct dn_fib_res *res) |
831 | { | 838 | { |
832 | struct dn_fib_info *fi = res->fi; | 839 | struct dn_fib_info *fi = res->fi; |