Skip to content

net: introduce and use route hint

Paolo Abeni netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest5 patches 7 repliesIn review
  2. v32 patches 13 repliesSuperseded
  3. v22 patches 6 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v12 patches5 repliesSuperseded

Changes in v4 from the cover letter

- move helpers to their own patches (Eric D.)
- enable hints for SUBTREE builds (David A.)
- re-enable hints for ipv4 forward (David A.)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5ipv6: add fib6_has_custom_rules() helperinclude/net/ip6_fib.h+9 -01 reply
2/5ipv6: keep track of routes using srcinclude/net/ip6_fib.h include/net/netns/ipv6.h net/ipv6/ip6_fib.c +1 more+40 -01 reply
3/5ipv6: introduce and uses route look hints for list input.net/ipv6/ip6_input.c+24 -21 reply
4/5ipv4: move fib4_has_custom_rules() helper to public headerinclude/net/ip_fib.h net/ipv4/fib_frontend.c+10 -101 reply
5/5ipv4: use dst hint for ipv4 list receiveinclude/net/route.h net/ipv4/ip_input.c net/ipv4/route.c+77 -41 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEdward CreeDavid Ahern
SeriesA-b
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH net-next v4 0/5] 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()

Paolo Abeni (5):
ipv6: add fib6_has_custom_rules() helper
ipv6: keep track of routes using src
ipv6: introduce and uses route look hints for list input.
ipv4: move fib4_has_custom_rules() helper to public header
ipv4: use dst hint for ipv4 list receive

 include/net/ip6_fib.h    | 39 +++++++++++++++++++++++++++++++++++++
 include/net/ip_fib.h     | 10 ++++++++++
 include/net/netns/ipv6.h |  3 +++
 include/net/route.h      |  4 ++++
 net/ipv4/fib_frontend.c  | 10 ----------
 net/ipv4/ip_input.c      | 35 +++++++++++++++++++++++++++++----
 net/ipv4/route.c         | 42 ++++++++++++++++++++++++++++++++++++++++
 net/ipv6/ip6_fib.c       |  4 ++++
 net/ipv6/ip6_input.c     | 26 +++++++++++++++++++++++--
 net/ipv6/route.c         |  3 +++
 10 files changed, 160 insertions(+), 16 deletions(-)
Signature · 1 line
2.21.0