Merge branch 'master' of gitlab.ethz.ch:nicosc/master-thesis

This commit is contained in:
Nico Schottelius 2019-07-24 22:34:44 +02:00
commit 0e49182647
4 changed files with 20511 additions and 12 deletions

View File

@ -3331,8 +3331,9 @@ https://en.wikipedia.org/wiki/IPv4_header_checksum
** Compile log
| 5.1. - 5.5 | failure due to variable renaming |
| 5.6 | subparser: compiled! |
| 5.7 | subcontrol: |
| 5.8 | nat64 actions/table: |
| 5.7 | subcontrol: [nsg] |
| 5.8 | nat64 actions/table: -- |
| 5.9 | nat64+headers [esprimo]: |
** TODO Benchmark/comparison
*** TODO Setup / Benchmark Jool
*** TODO Setup / Benchmark tayga
@ -6104,8 +6105,10 @@ nico@nsg-System:~/master-thesis/netpfga/minip4/simple_sume_switch/test/sim_switc
#+END_CENTER
*** DONE 2019-07-23: check: switch_calc compiles
CLOSED: [2019-07-23 Tue 08:59]
*** TODO Reset project to plain send-to-port1 code, no includes
*** TODO 2019-07-23: merge/migrate code into switch calc until it breaks
*** DONE Reset project to plain send-to-port1 code, no includes
CLOSED: [2019-07-24 Wed 12:21]
*** DONE 2019-07-23: merge/migrate code into switch calc until it breaks
CLOSED: [2019-07-24 Wed 12:21]
*** TODO 2019-07-23: install xilinx & co. to eth2.nico.ungleich.cloud -> 2nd compiler [MANUAL]
**** DONE Install SDNET via xsetup
CLOSED: [2019-07-23 Tue 11:03]
@ -6217,7 +6220,8 @@ sudo apt-get install -y libc6-dev-i386
sudo apt install -y libc6-dev
#+END_CENTER
*** 2019-07-23: compiling on ISG computer
*** DONE 2019-07-23: compiling on ISG computer
CLOSED: [2019-07-24 Wed 12:19]
**** DONE try1: "souce" files: / missing sumereg
CLOSED: [2019-07-23 Tue 12:14]
@ -6433,6 +6437,92 @@ release, use 'get_user_parameters' instead
messages that actually constitute ERROR messages, but are not
flagged as such nor do they cause the build process to abort.
*** TODO 2019-07-24: setup VM in DCL as third compiler [INSTALL MANUAL]
**** TODO install mate for getting xlibraries
**** Install sdnet
*** 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,
^^^^
minip4_solution.p4(35)
parser RealParser(
^^^^^^^^^^
error: LPM table size should be 2^n - 1
actions_nat64_generic.p4(169): error: could not not map table size size
size = 64;
^^^^
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;
^^^^^^^^^^^^^^^^^^^^^
error: LPM table size should be 2^n - 1
actions_arp.p4(55): error: could not not map table size size
size = 64;
^^^^
Makefile:34: recipe for target 'all' failed
make[1]: *** [all] Error 1
make[1]: Leaving directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/src'
Makefile:31: recipe for target 'frontend' failed
make: *** [frontend] Error 2
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

File diff suppressed because one or more lines are too long

View File

@ -74,6 +74,8 @@ control RealMain(
inout sume_metadata_t sume_metadata) {
#include "actions_nat64_generic.p4"
#include "actions_egress.p4"
action swap_eth_addresses() {
mac_addr_t temp = hdr.ethernet.dst_addr;
@ -120,6 +122,23 @@ control RealMain(
}
apply {
if(hdr.ipv6.isValid()) {
if(nat64.apply().hit) { /* generic / static nat64 done */
if(hdr.icmp6.isValid()) {
nat64_icmp6_generic();
if(hdr.icmp6.type == ICMP6_ECHO_REPLY) {
hdr.icmp.type = ICMP_ECHO_REPLY;
hdr.icmp.code = 0;
}
if(hdr.icmp6.type == ICMP6_ECHO_REQUEST) {
hdr.icmp.type = ICMP_ECHO_REQUEST;
hdr.icmp.code = 0;
}
}
}
}
lookup_table.apply();
}
}

View File

@ -4,12 +4,15 @@
#define SETTINGS_P4
#define THE_ANSWER_TO_LIFE_THE_UNIVERSE_AND_EVERYTHING 42 /* Important constant */
#define ROUTING_TABLE_SIZE 64 /* maximum routes per protocol */
#define ADDRESS_TABLE_SIZE 64 /* maximum number of addresses per protocol */
#define NDP_TABLE_SIZE 64 /* maximum number of multicast groups */
#define ICMP6_TABLE_SIZE 64 /* icmp6 handlers */
#define ICMP_TABLE_SIZE 64 /* icmp6 handlers */
#define NAT64_TABLE_SIZE 64 /* nat64 and nat46 entries */
#define TEST_TABLE_SIZE 64 /* nat64 and nat46 entries */
#define SIZE_FOR_EVERYTHING 63
#define ROUTING_TABLE_SIZE SIZE_FOR_EVERYTHING /* maximum routes per protocol */
#define ADDRESS_TABLE_SIZE SIZE_FOR_EVERYTHING /* maximum number of addresses per protocol */
#define NDP_TABLE_SIZE SIZE_FOR_EVERYTHING /* maximum number of multicast groups */
#define ICMP6_TABLE_SIZE SIZE_FOR_EVERYTHING /* icmp6 handlers */
#define ICMP_TABLE_SIZE SIZE_FOR_EVERYTHING /* icmp6 handlers */
#define NAT64_TABLE_SIZE SIZE_FOR_EVERYTHING /* nat64 and nat46 entries */
#define TEST_TABLE_SIZE SIZE_FOR_EVERYTHING /* nat64 and nat46 entries */
#endif