Test case for fabric-spgw when using MPLS routing
Change-Id: Ia77d8da848935e424aadca65d1f9e60068285df3
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/downlink-post-mpls.pcap b/pipelines/fabric/src/test/p4/fabric-spgw/downlink-post-mpls.pcap
new file mode 100644
index 0000000..0f2d27b
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/downlink-post-mpls.pcap
Binary files differ
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/entries-mpls-dl.json b/pipelines/fabric/src/test/p4/fabric-spgw/entries-mpls-dl.json
new file mode 100644
index 0000000..6bc9bce
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/entries-mpls-dl.json
@@ -0,0 +1,130 @@
+{
+ "fabric-spgw": {
+ "addr": "localhost:50051",
+ "flows": [
+ {
+ "table_name": "filtering.ingress_port_vlan",
+ "match_fields": {
+ "standard_metadata.ingress_port": 1,
+ "hdr.vlan_tag.is_valid": 0,
+ "hdr.vlan_tag.vlan_id": [0, 0]
+ },
+ "action_name": "filtering.push_internal_vlan",
+ "action_params": {
+ "new_vlan_id": 4094
+ }
+ },
+ {
+ "table_name": "filtering.fwd_classifier",
+ "match_fields": {
+ "standard_metadata.ingress_port": 1,
+ "hdr.ethernet.dst_addr": "c2:42:59:2d:3a:84",
+ "fabric_metadata.original_ether_type": 2048
+ },
+ "action_name": "filtering.set_forwarding_type",
+ "action_params": {
+ "fwd_type": 2
+ }
+ },
+ {
+ "table_name": "forwarding.unicast_v4",
+ "match_fields": {
+ "hdr.ipv4.dst_addr": ["192.168.103.11", 32]
+ },
+ "action_name": "forwarding.set_next_id",
+ "action_params": {
+ "next_id": 1
+ }
+ },
+ {
+ "table_name": "next.simple",
+ "match_fields": {
+ "fabric_metadata.next_id": 1
+ },
+ "action_name": "next.l3_routing",
+ "action_params": {
+ "port_num": 2,
+ "smac": "3a:c1:e2:53:e1:50",
+ "dmac": "52:54:00:29:c9:b7"
+ }
+ },
+ {
+ "table_name": "filtering.ingress_port_vlan",
+ "match_fields": {
+ "standard_metadata.ingress_port": 2,
+ "hdr.vlan_tag.is_valid": 0,
+ "hdr.vlan_tag.vlan_id": [0, 0]
+ },
+ "action_name": "filtering.push_internal_vlan",
+ "action_params": {
+ "new_vlan_id": 20
+ }
+ },
+ {
+ "table_name": "filtering.fwd_classifier",
+ "match_fields": {
+ "standard_metadata.ingress_port": 2,
+ "hdr.ethernet.dst_addr": "3a:c1:e2:53:e1:50",
+ "fabric_metadata.original_ether_type": 2048
+ },
+ "action_name": "filtering.set_forwarding_type",
+ "action_params": {
+ "fwd_type": 2
+ }
+ },
+ {
+ "table_name": "forwarding.unicast_v4",
+ "match_fields": {
+ "hdr.ipv4.dst_addr": ["16.255.255.252", 32]
+ },
+ "action_name": "forwarding.set_next_id",
+ "action_params": {
+ "next_id": 2
+ }
+ },
+ {
+ "table_name": "next.simple",
+ "match_fields": {
+ "fabric_metadata.next_id": 2
+ },
+ "action_name": "next.mpls_routing_v4",
+ "action_params": {
+ "port_num": 1,
+ "smac": "c2:42:59:2d:3a:84",
+ "dmac": "52:54:00:05:7b:59",
+ "label": 204
+ }
+ },
+ {
+ "table_name": "spgw_ingress.ue_filter_table",
+ "match_fields": {
+ "ipv4.dst_addr": ["16.255.255.252", 32]
+ },
+ "action_name": "NoAction",
+ "action_params": {
+ }
+ },
+ {
+ "table_name": "spgw_ingress.s1u_filter_table",
+ "match_fields": {
+ "spgw_meta.s1u_sgw_addr": "192.168.102.13"
+ },
+ "action_name": "NoAction",
+ "action_params": {
+ }
+ },
+ {
+ "table_name": "spgw_ingress.dl_sess_lookup",
+ "match_fields": {
+ "ipv4.dst_addr": "16.255.255.252"
+ },
+ "action_name": "spgw_ingress.set_dl_sess_info",
+ "action_params": {
+ "teid": 1,
+ "s1u_enb_addr": "192.168.102.11",
+ "s1u_sgw_addr": "192.168.102.13"
+ }
+ }
+ ]
+ }
+}