diff --git a/p4src/minip4_solution.p4 b/p4src/minip4_solution.p4 index 3d30dfd..24f3552 100644 --- a/p4src/minip4_solution.p4 +++ b/p4src/minip4_solution.p4 @@ -71,7 +71,7 @@ control RealMain( dummy_table_for_netpfga.apply(); /* continue without tables */ - #include "netpfga_nat64_stupid_hardcoded.p4" + //#include "netpfga_nat64_stupid_hardcoded.p4" } } diff --git a/p4src/netpfga_dummy.p4 b/p4src/netpfga_dummy.p4 index 0bfac9e..b1a1ef8 100644 --- a/p4src/netpfga_dummy.p4 +++ b/p4src/netpfga_dummy.p4 @@ -2,8 +2,8 @@ #define DUMMY_NETPFGA action send_to_port1() { -// sume_metadata.dst_port = 1; - sume_metadata.dst_port = 16; + sume_metadata.dst_port = 1; +// sume_metadata.dst_port = 16; } action select_port_by_type() { @@ -14,7 +14,6 @@ action select_port_by_type() { 1 >>> 0x0806 >> 11 ARP 1 - */ sume_metadata.dst_port = (bit<8>) (hdr.ethernet.ethertype >> 11); @@ -23,12 +22,13 @@ action select_port_by_type() { table dummy_table_for_netpfga { key = { - hdr.ethernet.dst_addr: exact; + hdr.ethernet.ethertype: exact; } actions = { send_to_port1; select_port_by_type; + set_egress_port; } size = 64; default_action = select_port_by_type; //send_to_port1;