[PATCH v2 net-next 1/3] ipv4: Lock-less per-packet multipath

2015-08-28 Thread pch
From: Peter Nørlund The current multipath attempted to be quasi random, but in most cases it behaved just like a round robin balancing. This patch refactors the algorithm to be exactly that and in doing so, avoids the spin lock. The new design paves the way for hash-based multipath, replacing th

[PATCH v2 net-next 2/3] ipv4: L3 and L4 hash-based multipath routing

2015-08-28 Thread pch
From: Peter Nørlund This patch adds L3 and L4 hash-based multipath routing, selectable on a per-route basis with the reintroduced RTA_MP_ALGO attribute. The default is now RT_MP_ALG_L3_HASH. Signed-off-by: Peter Nørlund --- include/net/ip_fib.h | 22 - include/uapi/li

[PATCH v2 net-next 3/3] ipv4: ICMP packet inspection for L3 multipath

2015-08-28 Thread pch
From: Peter Nørlund When doing L3 based multipath, ICMP packets are inspected to let them route over the same path as the flow they relate to, allowing anycast environments to work with ECMP. Signed-off-by: Peter Nørlund --- include/net/ip_fib.h | 2 +- include/net/route.h | 12 +

[PATCH v2 net-next 0/3] ipv4: Hash-based multipath routing

2015-08-28 Thread pch
When the routing cache was removed in 3.6, the IPv4 multipath algorithm changed from more or less being destination-based into being quasi-random per-packet scheduling. This increases the risk of out-of-order packets and makes it impossible to use multipath together with anycast services. This pat