From 9e6bb893ac23126f6e657f4e6dd0937e8823d353 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 24 Jul 2019 22:27:36 +0200 Subject: [PATCH] [netpfga] remove ARP support Due to minip4_solution.p4(35) parser RealParser( ^^^^^^^^^^ error: table match_types are not the same actions_arp.p4(35): error: could not map table key(s) KeyElement hdr.arp.dst_ipv4_addr: lpm; ^^^^^^^^^^^^^^^^^^^^^ Makefile:34: recipe for target 'all' failed make[1]: *** [all] Error 1 caused by table v4_arp { key = { hdr.ethernet.dst_addr: exact; hdr.arp.opcode: exact; hdr.arp.dst_ipv4_addr: lpm; } --- doc/plan.org | 55 +++++++++++++++++++++++++++++++++++++++- p4src/minip4_solution.p4 | 6 +---- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/doc/plan.org b/doc/plan.org index ce232fa..9d8d95b 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -6441,7 +6441,8 @@ release, use 'get_user_parameters' instead **** TODO install mate for getting xlibraries **** Install sdnet -*** TODO 2019-07-24: add features to netpfga: LPM tables cannot be 64 +*** DONE 2019-07-24: add features to netpfga: LPM tables cannot be 64 + CLOSED: [2019-07-24 Wed 13:23] #+BEGIN_CENTER minip4_solution.p4(38): [--Wwarn=uninitialized_out_param] warning: out parameter meta may be uninitialized when RealParser terminates out metadata meta, @@ -6470,6 +6471,58 @@ nico@nsg-System:~/master-thesis/netpfga/log$ #+END_CENTER +*** TODO 2019-07-24: table match types are not the same error + - Missing feature in + https://cs344-stanford.github.io/documentation/p4c-sdnet-missing-features.pdf + - disabling arp for the moment + + +#+BEGIN_CENTER +make[1]: Entering directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/src' +p4c-sdnet -o minip4.sdnet --sdnet_info .sdnet_switch_info.dat minip4_solution.p4 +actions_egress.p4(52): warning: Table v6_networks is not used; removing +table v6_networks { + ^^^^^^^^^^^ +actions_egress.p4(69): warning: Table v4_networks is not used; removing +table v4_networks { + ^^^^^^^^^^^ +actions_nat64_generic.p4(174): warning: Table nat46 is not used; removing + table nat46 { + ^^^^^ +minip4_solution.p4(38): [--Wwarn=uninitialized_out_param] warning: out parameter meta may be uninitialized when RealParser terminates + out metadata meta, + ^^^^ +minip4_solution.p4(35) +parser RealParser( + ^^^^^^^^^^ +error: table match_types are not the same +actions_arp.p4(35): error: could not map table key(s) KeyElement + hdr.arp.dst_ipv4_addr: lpm; + ^^^^^^^^^^^^^^^^^^^^^ +Makefile:34: recipe for target 'all' failed +make[1]: *** [all] Error 1 +ΓΌ +#+END_CENTER + +ARP disabled: + +#+BEGIN_CENTER + table v4_arp { + key = { + hdr.ethernet.dst_addr: exact; + hdr.arp.opcode: exact; + hdr.arp.dst_ipv4_addr: lpm; + } + actions = { + controller_debug_table_id; + arp_reply; + NoAction; + } + size = ICMP6_TABLE_SIZE; + default_action = controller_debug_table_id(TABLE_ARP); + } + +#+END_CENTER ** The NetPFGA saga Problems encountered: - The logfile for a compile run is 10k+ lines diff --git a/p4src/minip4_solution.p4 b/p4src/minip4_solution.p4 index c220bf8..bd46653 100644 --- a/p4src/minip4_solution.p4 +++ b/p4src/minip4_solution.p4 @@ -75,7 +75,7 @@ control RealMain( #include "actions_nat64_generic.p4" #include "actions_egress.p4" - #include "actions_arp.p4" + action swap_eth_addresses() { mac_addr_t temp = hdr.ethernet.dst_addr; @@ -137,10 +137,6 @@ control RealMain( } } - } else if(hdr.arp.isValid()) { - if(v4_arp.apply().hit) { - v4_arp_egress.apply(); - } } lookup_table.apply();