diff options
| author | David S. Miller <davem@davemloft.net> | 2011-03-02 17:56:30 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2011-03-02 17:56:30 -0500 |
| commit | 5bfa787fb2c29cce0722500f90df29e049ff07fc (patch) | |
| tree | 21e90db4a0d480e9f9e9b931ee71657f2843a629 /include | |
| parent | b23dd4fe42b455af5c6e20966b7d6959fa8352ea (diff) | |
ipv4: ip_route_output_key() is better as an inline.
This avoid a stack frame at zero cost.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/route.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/route.h b/include/net/route.h index 088a1867348f..60daf745216a 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
| @@ -119,11 +119,15 @@ extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, | |||
| 119 | extern void rt_cache_flush(struct net *net, int how); | 119 | extern void rt_cache_flush(struct net *net, int how); |
| 120 | extern void rt_cache_flush_batch(struct net *net); | 120 | extern void rt_cache_flush_batch(struct net *net); |
| 121 | extern struct rtable *__ip_route_output_key(struct net *, const struct flowi *flp); | 121 | extern struct rtable *__ip_route_output_key(struct net *, const struct flowi *flp); |
| 122 | extern struct rtable *ip_route_output_key(struct net *, struct flowi *flp); | ||
| 123 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi *flp, | 122 | extern struct rtable *ip_route_output_flow(struct net *, struct flowi *flp, |
| 124 | struct sock *sk); | 123 | struct sock *sk); |
| 125 | extern struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig); | 124 | extern struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig); |
| 126 | 125 | ||
| 126 | static inline struct rtable *ip_route_output_key(struct net *net, struct flowi *flp) | ||
| 127 | { | ||
| 128 | return ip_route_output_flow(net, flp, NULL); | ||
| 129 | } | ||
| 130 | |||
| 127 | extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src, | 131 | extern int ip_route_input_common(struct sk_buff *skb, __be32 dst, __be32 src, |
| 128 | u8 tos, struct net_device *devin, bool noref); | 132 | u8 tos, struct net_device *devin, bool noref); |
| 129 | 133 | ||
