Skip to content

Commit

Permalink
Merge branch 'mpls_multipath'
Browse files Browse the repository at this point in the history
Roopa Prabhu says:

====================
mpls: multipath support

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
====================

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Oct 23, 2015
2 parents 654c9c5 + 1c78efa commit e74f510
Show file tree
Hide file tree
Showing 3 changed files with 479 additions and 148 deletions.
2 changes: 1 addition & 1 deletion include/net/mpls_iptunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

struct mpls_iptunnel_encap {
u32 label[MAX_NEW_LABELS];
u32 labels;
u8 labels;
};

static inline struct mpls_iptunnel_encap *mpls_lwtunnel_encap(struct lwtunnel_state *lwtstate)
Expand Down
Loading

0 comments on commit e74f510

Please sign in to comment.