Skip to content

Routing refinements.

David Miller netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3net: Make dst_alloc() take more explicit initializations.include/net/dst.h net/core/dst.c net/decnet/dn_route.c +3 more+44 -610 replies
2/3net: Use non-zero allocations in dst_alloc().net/core/dst.c net/decnet/dn_route.c net/ipv4/route.c +2 more+74 -350 replies
3/3ipv4: Use caller's on-stack flowi as-is in output route lookups.include/net/route.h net/ipv4/route.c+81 -790 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] Routing refinements.

Don't initialize dst entries multiple times during allocation and creation.

Use caller's flowi object in output route lookup paths.

These changes open the door to getting rid of several aspect of struct rtcache. For example, since the output route lookup updates the flow keys, there is no need to use things like rt->rt_src since the same information is present in the lookup flow key.

For example, connect() of stream sockets and sendmsg() of datagram sockets do something like:

	rt = ip_route_connect(... &fl ...);
	...
	something using rt->rt_src

When we can now replace rt->rt_src with fl.saddr

Eventually all instance specific aspects of struct rtable can be removed and we are left with a routing object that can exist as a single instance pointed to directly from the routing table nexthop slots.

The only part I don't have a clean vision on is the inetpeer and metrics. But I don't anticipate that being insurmountable.