MPLS Unifom mode

- support both pipe and uniform modes for all MPLS LSP
- all API programming for output-labels requires that the mode (and associated data) is specificed
   - API changes in MPLS, BIER and IP are involved
- new DPO [sub] types for MPLS labels to handle the two modes.

Change-Id: I87b76401e996f10dfbdbe4552ff6b19af958783c
Signed-off-by: Neale Ranns <nranns@cisco.com>
This commit is contained in:
Neale Ranns
2018-02-23 05:29:09 -08:00
committed by Damjan Marion
parent 8f931a47b0
commit 31ed744076
47 changed files with 2329 additions and 1018 deletions

View File

@ -2,7 +2,7 @@
from framework import VppTestCase, VppTestRunner
from vpp_udp_encap import *
from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable
from vpp_ip_route import VppIpRoute, VppRoutePath, VppIpTable, VppMplsLabel
from scapy.packet import Raw
from scapy.layers.l2 import Ether, ARP
@ -67,12 +67,12 @@ class TestUdpEncap(VppTestCase):
self.assertEqual(rx[UDP].dport, encap_obj.dst_port)
def validate_inner4(self, rx, tx, ttl=None):
self.assertEqual(rx.src, tx[IP].src)
self.assertEqual(rx.dst, tx[IP].dst)
self.assertEqual(rx[IP].src, tx[IP].src)
self.assertEqual(rx[IP].dst, tx[IP].dst)
if ttl:
self.assertEqual(rx.ttl, ttl)
self.assertEqual(rx[IP].ttl, ttl)
else:
self.assertEqual(rx.ttl, tx[IP].ttl)
self.assertEqual(rx[IP].ttl, tx[IP].ttl)
def validate_inner6(self, rx, tx):
self.assertEqual(rx.src, tx[IPv6].src)
@ -208,7 +208,7 @@ class TestUdpEncap(VppTestCase):
0xFFFFFFFF,
is_udp_encap=1,
next_hop_id=1,
labels=[66])])
labels=[VppMplsLabel(66)])])
route_4oMPLSo4.add_vpp_config()
p_4omo4 = (Ether(src=self.pg0.remote_mac,