net: ipv4: refactor ip_route_input_noref
A later patch wants access to the fib result on an input route lookup with the rcu lock held. Refactor ip_route_input_noref pushing the logic between rcu_read_lock ... rcu_read_unlock into a new helper that takes the fib_result as an input arg. Signed-off-by: David Ahern <dsahern@gmail.com> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
3abd1ade67
commit
5510cdf7be
@@ -178,6 +178,9 @@ static inline struct rtable *ip_route_output_gre(struct net *net, struct flowi4
|
||||
|
||||
int ip_route_input_noref(struct sk_buff *skb, __be32 dst, __be32 src,
|
||||
u8 tos, struct net_device *devin);
|
||||
int ip_route_input_rcu(struct sk_buff *skb, __be32 dst, __be32 src,
|
||||
u8 tos, struct net_device *devin,
|
||||
struct fib_result *res);
|
||||
|
||||
static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src,
|
||||
u8 tos, struct net_device *devin)
|
||||
|
||||
Reference in New Issue
Block a user