From ed4db31e2c552b9ba530277b00e4f44733dcc545 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 29 Jul 2019 09:38:34 +0200 Subject: [PATCH] Cast to 8 bit for port --- p4src/netpfga_dummy.p4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p4src/netpfga_dummy.p4 b/p4src/netpfga_dummy.p4 index 5e68dac..26c1d97 100644 --- a/p4src/netpfga_dummy.p4 +++ b/p4src/netpfga_dummy.p4 @@ -17,7 +17,7 @@ action select_port_by_type() { */ - sume_metadata.dst_port = hdr.ethernet.ethertype >> 11; + sume_metadata.dst_port = (bit<8>) hdr.ethernet.ethertype >> 11; }