Test entries and pcaps for fabric.p4 with SPGW support
Change-Id: I66be4ad8a04b68b225f8061f06e2eb68e502b76c
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/.gitignore b/pipelines/fabric/src/test/p4/fabric-spgw/.gitignore
new file mode 100644
index 0000000..16efdec
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/.gitignore
@@ -0,0 +1,3 @@
+main.json
+main.p4info
+entries.txt
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/Makefile b/pipelines/fabric/src/test/p4/fabric-spgw/Makefile
new file mode 100644
index 0000000..71dc23c
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/Makefile
@@ -0,0 +1,5 @@
+all:
+ p4c-bm2-ss -o main.json \
+ -DWITH_SPGW -I ../../../main/resources/ \
+ --p4runtime-file main.p4info \
+ --p4runtime-format text ../../../main/resources/fabric.p4
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/downlink-post.pcap b/pipelines/fabric/src/test/p4/fabric-spgw/downlink-post.pcap
new file mode 100644
index 0000000..a3b76a7d
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/downlink-post.pcap
Binary files differ
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/downlink-pre.pcap b/pipelines/fabric/src/test/p4/fabric-spgw/downlink-pre.pcap
new file mode 100644
index 0000000..465ab03
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/downlink-pre.pcap
Binary files differ
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/entries.json b/pipelines/fabric/src/test/p4/fabric-spgw/entries.json
new file mode 100644
index 0000000..77baf91
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/entries.json
@@ -0,0 +1,105 @@
+{
+ "fabric-spgw": {
+ "addr": "localhost:5051",
+ "flows": [
+ {
+ "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.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.l3_routing",
+ "action_params": {
+ "port_num": 1,
+ "smac": "c2:42:59:2d:3a:84",
+ "dmac": "52:54:00:05:7b:59"
+ }
+ },
+ {
+ "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"
+ }
+ }
+ ]
+ }
+}
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/uplink-post.pcap b/pipelines/fabric/src/test/p4/fabric-spgw/uplink-post.pcap
new file mode 100644
index 0000000..c02e7c6
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/uplink-post.pcap
Binary files differ
diff --git a/pipelines/fabric/src/test/p4/fabric-spgw/uplink-pre.pcap b/pipelines/fabric/src/test/p4/fabric-spgw/uplink-pre.pcap
new file mode 100644
index 0000000..78064fa
--- /dev/null
+++ b/pipelines/fabric/src/test/p4/fabric-spgw/uplink-pre.pcap
Binary files differ