Support for different tofino systems (mavericks and montara)
The tofino driver will now register two pipeconf, one for each system.
The right one should be injected via netcfg.
Change-Id: I0fc3e8afa6fedef13d1ab7067811707748e8e916
diff --git a/tools/test/p4src/p4-14/Makefile b/tools/test/p4src/p4-14/Makefile
index ca73869..3779f9d 100644
--- a/tools/test/p4src/p4-14/Makefile
+++ b/tools/test/p4src/p4-14/Makefile
@@ -1,5 +1,9 @@
BMV2_CPU_PORT=255
+MAVERICKS_CPU_PORT=320
+MONTARA_CPU_PORT=192
+MAVERICKS_OPTIONS=-DCPU_PORT=$(MAVERICKS_CPU_PORT)
+MONTARA_OPTIONS=-DCPU_PORT=$(MONTARA_CPU_PORT)
BMV2_OPTIONS=-DDO_BMV2_BUILD -DCPU_PORT=$(BMV2_CPU_PORT)
all: bmv2
@@ -11,6 +15,18 @@
--p4runtime-file p4c-out/default.p4info --p4runtime-format text \
default.p4
+default-tofino: default.p4
+ p4c-tofino --verbose 2 --new_ctx_json -o p4c-out/tofino/default/mavericks $(MAVERICKS_OPTIONS) default.p4
+ p4c-tofino --verbose 2 --new_ctx_json -o p4c-out/tofino/default/montara $(MONTARA_OPTIONS) default.p4
+ cp p4c-out/default.json p4c-out/tofino/default/mavericks
+ cp p4c-out/default.json p4c-out/tofino/default/montara
+ cp p4c-out/default.p4info p4c-out/tofino/default/mavericks
+ cp p4c-out/default.p4info p4c-out/tofino/default/montara
+ sed -i -e 's/standard_metadata/ig_intr_md/g' p4c-out/tofino/default/mavericks/default.json
+ sed -i -e 's/standard_metadata/ig_intr_md/g' p4c-out/tofino/default/montara/default.json
+ sed -i -e 's/standard_metadata/ig_intr_md/g' p4c-out/tofino/default/mavericks/default.p4info
+ sed -i -e 's/standard_metadata/ig_intr_md/g' p4c-out/tofino/default/montara/default.p4info
+
empty-bmv2: empty.p4
p4c-bm2-ss --p4v 14 -o p4c-out/empty.json \
--p4runtime-file p4c-out/empty.p4info --p4runtime-format text \
@@ -28,4 +44,4 @@
clean:
rm -rf p4c-out/*.json
- rm -rf p4c-out/*.p4info
\ No newline at end of file
+ rm -rf p4c-out/*.p4info