OSDN Git Service

mpls: flow-based multipath selection
authorRobert Shearman <rshearma@brocade.com>
Fri, 23 Oct 2015 13:03:28 +0000 (06:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Oct 2015 13:26:45 +0000 (06:26 -0700)
commit1c78efa8319cad2f10f421afa627745fb4d9b29f
treef02f84d72b3500b22eee0c684447a433088bcd24
parentf8efb73c97e2fa0abbe2e07c5c5df07800312643
mpls: flow-based multipath selection

Change the selection of a multipath route to use a flow-based
hash. This more suitable for traffic sensitive to reordering within a
flow (e.g. TCP, L2VPN) and whilst still allowing a good distribution
of traffic given enough flows.

Selection of the path for a multipath route is done using a hash of:
1. Label stack up to MAX_MP_SELECT_LABELS labels or up to and
   including entropy label, whichever is first.
2. 3-tuple of (L3 src, L3 dst, proto) from IPv4/IPv6 header in MPLS
   payload, if present.

Naturally, a 5-tuple hash using L4 information in addition would be
possible and be better in some scenarios, but there is a tradeoff
between looking deeper into the packet to achieve good distribution,
and packet forwarding performance, and I have erred on the side of the
latter as the default.

Signed-off-by: Robert Shearman <rshearma@brocade.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mpls/af_mpls.c