Skip to content

RFC Cache PMTU/redirects in inetpeer

David Miller netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5inetpeer: Abstract address representation further.include/net/inetpeer.h net/ipv4/inetpeer.c net/ipv4/tcp_ipv4.c +1 more+15 -110 replies
2/5inetpeer: Add redirect and PMTU discovery cached info.include/net/inetpeer.h net/ipv4/inetpeer.c+13 -70 replies
3/5inet: Create a mechanism for upward inetpeer propagation into routes.include/net/ip6_fib.h include/net/route.h net/ipv4/route.c +1 more+36 -30 replies
4/5ipv4: Cache learned PMTU information in inetpeer.net/ipv4/route.c+86 -1740 replies
5/5ipv4: Cache learned redirect information in inetpeer.net/ipv4/route.c+42 -940 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/5] Cache PMTU/redirects in inetpeer

This is what I've been working on for the past several days.

Right now if the routing cache is turned off (by setting rt_cache_rebuild_count to "0") several things stop working.

We never make use of any PMTU or redirect information we learn via ICMP packets. This is because when the routing cache is off, we can't "find" the existing cached routes that match the ICMP because we don't add them to the hash table.

This functionality loss is also a blocker for eliminating the routing cache entirely.

Solve this by remembering this state in the inetpeer entries.

PMTU information now self-expires. It gets validated when cached routes are sanity checked via dst_ops->check(). At expiration, the original RTAX_MTU metric value is restored. So we don't have to invalidate the entire cached route just because it's PMTU learned value has expired.

Similarly, we store redirect information in inetpeer too. Except that currently my patches don't remember the "original" gateway the route had, so we have to kill the route off when we get a dst_ops->negative_advice() call on a redirected route.

Avoid this is easy to fix and I might do that soon.

These patches implement the PMTU/redirect bits in ipv4 only at the moment, but I do have ipv6 patches I'm in the process of finishing up. I just wanted people to see this as soon as possible so that I can start getting feedback.

And hey if people can test this stuff out that'd be awesome! If you've used these changes in an environment where you did hit PMTU and redirects, please do let me know.