diff --git a/p4src/headers.p4 b/p4src/headers.p4 index 9d500f5..5382d10 100644 --- a/p4src/headers.p4 +++ b/p4src/headers.p4 @@ -8,7 +8,7 @@ typedef bit<48> mac_addr_t; typedef bit<32> ipv4_addr_t; typedef bit<128> ipv6_addr_t; -typedef bit<16> port_t; +typedef bit<9> port_t; typedef bit<16> mcast_t; typedef bit<8> task_t; @@ -112,8 +112,8 @@ header icmp_t { } header cpu_t { - port_t ingress_port; task_t task; + bit<16> ingress_port; bit<16> ethertype; } diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index 218e2bc..cb2ac64 100644 --- a/p4src/static-mapping.p4 +++ b/p4src/static-mapping.p4 @@ -229,11 +229,4 @@ MyDeparser() ) main; - /* set tcp header valid after modifying it -- keep this in mind*/ - // hdr.tcp.setValid(); - - - // hdr.cpu.srcAddr = hdr.ethernet.srcAddr; - // hdr.cpu.ingress_port = (bit<16>)meta.ingress_port; - // truncate((bit<32>)22); //ether+cpu header