From d68be5010d54187f83d80a99cf9438893fa27a68 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 23 Jul 2019 15:00:26 +0200 Subject: [PATCH 1/2] [netpfga] add generic deparser, took Trying to fix late stage compile error --- p4src/minip4_solution.p4 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/p4src/minip4_solution.p4 b/p4src/minip4_solution.p4 index 0888d80..f2a2168 100644 --- a/p4src/minip4_solution.p4 +++ b/p4src/minip4_solution.p4 @@ -144,9 +144,13 @@ control TopDeparser(packet_out packet, // inout sume_metadata_t sume_metadata) { - apply { - packet.emit(hdr.ethernet); - } + // apply { + // packet.emit(hdr.ethernet); + // } + + #include "parsers.p4" + + } /******************************************************************************** From f44386b6b8216c29d55d500a45c83a74360e728d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 23 Jul 2019 15:02:27 +0200 Subject: [PATCH 2/2] Include the right DEparser --- p4src/deparser.p4 | 1 - p4src/minip4_solution.p4 | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/p4src/deparser.p4 b/p4src/deparser.p4 index 397e52f..8b3fc1d 100644 --- a/p4src/deparser.p4 +++ b/p4src/deparser.p4 @@ -1,7 +1,6 @@ /* -*- P4_16 -*- */ #ifndef DEPARSERS_P4 #define DEPARSERS_P4 - apply { /* always */ packet.emit(hdr.ethernet); diff --git a/p4src/minip4_solution.p4 b/p4src/minip4_solution.p4 index f2a2168..91ce02e 100644 --- a/p4src/minip4_solution.p4 +++ b/p4src/minip4_solution.p4 @@ -148,7 +148,7 @@ control TopDeparser(packet_out packet, // packet.emit(hdr.ethernet); // } - #include "parsers.p4" + #include "deparser.p4" }