Skip to contentSkip to conversation

mpls: multipath support

PATCH Superseded Roopa Prabhu 2 participants 3 messages Oct 23, 2015

Subsystems (2)

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

v5 cover mpls: multipath support

From: Roopa Prabhu <[email protected]>

This patch adds support for MPLS multipath routes.

Includes following changes to support multipath:
- splits struct mpls_route into 'struct mpls_route + struct mpls_nh'.

- struct mpls_nh represents a mpls nexthop label forwarding entry

- Adds support to parse/fill RTA_MULTIPATH netlink attribute for multipath routes similar to ipv4/v6 fib

- In the process of restructuring, this patch also consistently changes all labels to u8

$ip -f mpls route add 100 nexthop as 200 via inet 10.1.1.2 dev swp1 \
		nexthop as 700 via inet 10.1.1.6 dev swp2 \
		nexthop as 800 via inet 40.1.1.2 dev swp3

$ip -f mpls route show
100

	nexthop as to 200 via inet 10.1.1.2  dev swp1
	nexthop as to 700 via inet 10.1.1.6  dev swp2
	nexthop as to 800 via inet 40.1.1.2  dev swp3

Roopa Prabhu (1):
mpls: multipath support

Robert Shearman (1):
mpls: flow-based multipath selection

----
v2:
- Incorporate some feedback from Robert:
use dynamic allocation (list) instead of static allocation for nexthops
v3:
- Move back to arrays (same as v1), also suggested by Eric Biederman

v4:
- address a few comments from Eric Biederman
Plan to address the following pending comments in incremental patches after this infrastructure changes go in.
- Move VIA size to 16 bytes
- use ipv6 flow label in ecmp calculations
- dead route handling during multipath route selection (I had planned this in an incremental patch initially).

v5:
feedback from Eric Biederman
- Removed some dead code
feedback from Robert
- Moved dev_put into find_outdev to make it clear that we dont need a hold on the dev because we are under rtnl
- move the unused variable fix into the correct patch file

 include/net/mpls_iptunnel.h |   2 +-
 net/mpls/af_mpls.c          | 668 ++++++++++++++++++++++++++++++++++----------
 net/mpls/internal.h         |  57 +++-
 3 files changed, 572 insertions(+), 155 deletions(-)
Signature · 1 line
1.9.1
author
#1 lore raw
Quoted 25 lines · Roopa Prabhu

From: Roopa Prabhu <[email protected]>

This patch adds support for MPLS multipath routes.

Includes following changes to support multipath:
- splits struct mpls_route into 'struct mpls_route + struct mpls_nh'.

- struct mpls_nh represents a mpls nexthop label forwarding entry

- Adds support to parse/fill RTA_MULTIPATH netlink attribute for multipath routes similar to ipv4/v6 fib

- In the process of restructuring, this patch also consistently changes all labels to u8

$ip -f mpls route add 100 nexthop as 200 via inet 10.1.1.2 dev swp1 \
		nexthop as 700 via inet 10.1.1.6 dev swp2 \
		nexthop as 800 via inet 40.1.1.2 dev swp3

$ip -f mpls route show
100

	nexthop as to 200 via inet 10.1.1.2  dev swp1
	nexthop as to 700 via inet 10.1.1.6  dev swp2
	nexthop as to 800 via inet 40.1.1.2  dev swp3
Quoted 9 lines

Roopa Prabhu (1):
mpls: multipath support

Robert Shearman (1):
mpls: flow-based multipath selection

David, please ignore. I will re-spin the series. I see a checkpatch error

maintainer
#2 lore raw

From: roopa <[email protected]>
Date: Fri, 23 Oct 2015 05:14:32 -0700

Quoted 1 line

David, please ignore. I will re-spin the series. I see a checkpatch error

Ok.