netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/2] net: introduce and use route hint
@ 2019-11-19 14:38 Paolo Abeni
  2019-11-19 14:38 ` [PATCH net-next v3 1/2] ipv6: introduce and uses route look hints for list input Paolo Abeni
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Paolo Abeni @ 2019-11-19 14:38 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, Willem de Bruijn, Edward Cree, David Ahern

This series leverages the listification infrastructure to avoid
unnecessary route lookup on ingress packets. In absence of policy routing,
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. Figures are slightly better then previous iteration because
thanks to Willem's suggestion we additionally skip early demux when using
the route hint.

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 (2):
  ipv6: introduce and uses route look hints for list input
  ipv4: use dst hint for ipv4 list receive

 include/net/ip6_fib.h   |  9 +++++++++
 include/net/ip_fib.h    | 10 ++++++++++
 include/net/route.h     |  4 ++++
 net/ipv4/fib_frontend.c | 10 ----------
 net/ipv4/ip_input.c     | 35 +++++++++++++++++++++++++++++++----
 net/ipv4/route.c        | 37 +++++++++++++++++++++++++++++++++++++
 net/ipv6/ip6_input.c    | 26 ++++++++++++++++++++++++--
 7 files changed, 115 insertions(+), 16 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-11-20  8:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-19 14:38 [PATCH net-next v3 0/2] net: introduce and use route hint Paolo Abeni
2019-11-19 14:38 ` [PATCH net-next v3 1/2] ipv6: introduce and uses route look hints for list input Paolo Abeni
2019-11-19 15:39   ` David Ahern
2019-11-19 16:00     ` Paolo Abeni
2019-11-19 16:21       ` David Ahern
2019-11-19 17:34   ` Eric Dumazet
2019-11-19 17:40     ` Eric Dumazet
2019-11-19 17:40     ` David Ahern
2019-11-19 21:41     ` Paolo Abeni
2019-11-19 14:38 ` [PATCH net-next v3 2/2] ipv4: use dst hint for ipv4 list receive Paolo Abeni
2019-11-19 16:00   ` David Ahern
2019-11-19 16:20     ` Paolo Abeni
2019-11-19 17:33       ` Paolo Abeni
2019-11-19 17:45         ` David Ahern
2019-11-20  2:47 ` [PATCH net-next v3 0/2] net: introduce and use route hint David Miller
2019-11-20  8:08   ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).