First stab at BNG support in fabric.p4
This implementation is derived from Deutsche Telekom contribution:
https://github.com/opencord/p4se
It supports basic upstream and downstream termination based on double
VLAN tags and PPPoE, including counters and downstream metering.
Change-Id: I940959f2338d7319654cf665f6cfe2de7200616b
diff --git a/pipelines/fabric/src/main/resources/fabric.p4 b/pipelines/fabric/src/main/resources/fabric.p4
index 8cb09b0..fede305 100644
--- a/pipelines/fabric/src/main/resources/fabric.p4
+++ b/pipelines/fabric/src/main/resources/fabric.p4
@@ -35,6 +35,10 @@
#include "include/spgw.p4"
#endif // WITH_SPGW
+#ifdef WITH_BNG
+#include "include/bng.p4"
+#endif // WITH_BNG
+
#ifdef WITH_INT
#include "include/int/int_main.p4"
#endif // WITH_INT
@@ -64,6 +68,9 @@
spgw_ingress.apply(hdr.gtpu_ipv4, hdr.gtpu_udp, hdr.gtpu,
hdr.ipv4, hdr.udp, fabric_metadata, standard_metadata);
#endif // WITH_SPGW
+#ifdef WITH_BNG
+ bng_ingress.apply(hdr, fabric_metadata, standard_metadata);
+#endif // WITH_BNG
if (fabric_metadata.skip_forwarding == _FALSE) {
forwarding.apply(hdr, fabric_metadata, standard_metadata);
}
@@ -97,6 +104,9 @@
spgw_egress.apply(hdr.ipv4, hdr.gtpu_ipv4, hdr.gtpu_udp, hdr.gtpu,
fabric_metadata, standard_metadata);
#endif // WITH_SPGW
+#ifdef WITH_BNG
+ bng_egress.apply(hdr, fabric_metadata, standard_metadata);
+#endif // WITH_BNG
#ifdef WITH_INT
process_int_main.apply(hdr, fabric_metadata, standard_metadata);
#endif