From 25f80b1b76d10327434cf14b81b71ab0b197b172 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 6 Mar 2019 13:19:10 +0100 Subject: [PATCH] Try moving the cast to ingrees --- p4src/parsers.p4 | 1 - p4src/static-mapping.p4 | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/p4src/parsers.p4 b/p4src/parsers.p4 index b2c05e2..4988ede 100644 --- a/p4src/parsers.p4 +++ b/p4src/parsers.p4 @@ -37,7 +37,6 @@ parser MyParser(packet_in packet, state ipv6 { packet.extract(hdr.ipv6); meta.tcp_length = hdr.ipv6.payload_length; - meta.cast_length = (bit<32>) hdr.ipv6.payload_length; transition select(hdr.ipv6.next_header){ PROTO_TCP: tcp; diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index 2435351..36c67c5 100644 --- a/p4src/static-mapping.p4 +++ b/p4src/static-mapping.p4 @@ -63,6 +63,7 @@ control MyIngress(inout headers hdr, hdr.icmp6.type = ICMP6_ECHO_REPLY; meta.calc_icmp6_checksum = true; + meta.cast_length = (bit<32>) hdr.ipv6.payload_length; } /********************** Reply to NDP for US ***********************************/