diff options
author | David S. Miller <davem@davemloft.net> | 2019-11-21 14:45:55 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-21 14:46:31 -0800 |
commit | 7d75c0cb22b71837b376b68fa240c01d4a955fa4 (patch) | |
tree | e034d97436dfa8b32deff124f3ab172648aef9e4 /include/net/route.h | |
parent | 2c44713ed96da04f5e25b0df4035074b844def04 (diff) | |
parent | 02b24941619fcce3d280311ac73b1e461552e9c8 (diff) | |
download | kernel_replicant_linux-7d75c0cb22b71837b376b68fa240c01d4a955fa4.tar.gz kernel_replicant_linux-7d75c0cb22b71837b376b68fa240c01d4a955fa4.tar.bz2 kernel_replicant_linux-7d75c0cb22b71837b376b68fa240c01d4a955fa4.zip |
Merge branch 'net-introduce-and-use-route-hint'
Paolo Abeni says:
====================
net: introduce and use route hint
This series leverages the listification infrastructure to avoid
unnecessary route lookup on ingress packets. In absence of custom rules,
packets with equal daddr will usually land on the same dst.
When processing packet bursts (lists) we can easily reference the previous
dst entry. When we hit the 'same destination' condition we can avoid the
route lookup, coping the already available dst.
Detailed performance numbers are available in the individual commit
messages.
v3 -> v4:
- move helpers to their own patches (Eric D.)
- enable hints for SUBTREE builds (David A.)
- re-enable hints for ipv4 forward (David A.)
v2 -> v3:
- use fib*_has_custom_rules() helpers (David A.)
- add ip*_extract_route_hint() helper (Edward C.)
- use prev skb as hint instead of copying data (Willem )
v1 -> v2:
- fix build issue with !CONFIG_IP*_MULTIPLE_TABLES
- fix potential race in ip6_list_rcv_finish()
====================
Acked-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/route.h')
-rw-r--r-- | include/net/route.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/route.h b/include/net/route.h index 6c516840380d..a9c60fc68e36 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -185,6 +185,10 @@ int ip_route_input_rcu(struct sk_buff *skb, __be32 dst, __be32 src, u8 tos, struct net_device *devin, struct fib_result *res); +int ip_route_use_hint(struct sk_buff *skb, __be32 dst, __be32 src, + u8 tos, struct net_device *devin, + const struct sk_buff *hint); + static inline int ip_route_input(struct sk_buff *skb, __be32 dst, __be32 src, u8 tos, struct net_device *devin) { |