diff --git a/doc/Background.tex b/doc/Background.tex index 6b0eb22..9c8a2b4 100644 --- a/doc/Background.tex +++ b/doc/Background.tex @@ -105,11 +105,20 @@ the two protocols for this thesis are: % ---------------------------------------------------------------------- \section{\label{background:arpndp}ARP and NDP, ICMP ICMP6- FIXME} Required for finding host. -ARP who has +ARP \cite{rfc826} who has NDP similar -- add traces here being able to answer to error messages MTU / pmtu + +Also add: IPv6 is closed / no arp +ICMP6 \cite{rfc4443} +%\LaTeX{} + +DNS64 \cite{rfc6174} + +IPv6 only network experiences \cite{rfc6586} +Solicited-node multicast address\cite{wikipedia:_solic}. % ---------------------------------------------------------------------- \section{\label{background:transition}IPv6 Translation Mechanisms} While in this thesis the focus was in NAT64 as a translation mechanism, @@ -175,6 +184,74 @@ While protocol dependent translation has the highest amount of information to choose from for translation, complex parsers or even cryptographic methods are required for it. That reduces the opportunities of protocol dependent translation +% ---------------------------------------------------------------------- +\subsection{\label{background:transition:prefixnat}Prefix based NAT - + FIXME} +Explain how it works in general +**** RFC6052 + - Defining well known prefix 64:ff9b::/96 + - Defining embedding depending on prefix: /32../104 in 8 bit + steps + - Longer than /96: suffix support + + + - v4 to v6 / vice versa + +\begin{verbatim} + +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + |PL| 0-------------32--40--48--56--64--72--80--88--96--104---------| + +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + |32| prefix |v4(32) | u | suffix | + +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + |40| prefix |v4(24) | u |(8)| suffix | + +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + |48| prefix |v4(16) | u | (16) | suffix | + +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + |56| prefix |(8)| u | v4(24) | suffix | + +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + |64| prefix | u | v4(32) | suffix | + +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + |96| prefix | v4(32) | + +--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ + + +***** DONE Case IPv6 initiator + CLOSED: [2019-08-13 Tue 10:59] + - Mapping whole IPv4 Internet in /96 prefix + - Session information for mapping reply + - Timeout handling in controller +****** TODO IPv6 udp -> IPv4 + - Got 4-5 tuple ([proto], src ip, src port, dst ip, dst port) + - Does not / never signal end + - Needs timeout for cleaning up +****** TODO IPv6 tcp -> IPv4 + - Similar to udp + - react on FIN/RST (?) -- could be an addition +****** TODO IPv6 icmp6 -> IPv4 + - usual protocol specific changes + - Session?? + - src ip, dst ip, code ? +***** TODO Case IPv4 initiator + - Needs upper level protol + + +****** Controller Logic + - controller selects "outgoing" IPv4 address range => base for sessions + - IPv4 addresses can be "random" (in our test case), but need + to be unique + - switch does not need to know about the "range", only about + sessions + - on session create, controller selects "random" ip (ring?) + - on session create, controller selects "random port" (next in range?) + - on session create controller adds choice into 2 tables: + incoming, outgoing + + +>>> ipaddress.IPv6Network("2001:db8:100::/96")[int(ipaddress.IPv4Address("10.0.0.1"))] +IPv6Address('2001:db8:100::a00:1') +\end{verbatim} +from RFC6052 + % ---------------------------------------------------------------------- \section{\label{background:checksums}Protocol Checksums} One challenge for translating IPv6-IPv4 are checksums of higher level diff --git a/doc/Conclusion.tex b/doc/Conclusion.tex index b47d550..abbeeab 100644 --- a/doc/Conclusion.tex +++ b/doc/Conclusion.tex @@ -68,9 +68,114 @@ or missing features (\cite{schottelius:github745}, Hitting expression bug +retrieving information from tables +\begin{verbatim} +Key and mask for matching destination is in table. We need this + information in the action. However this information is not exposed, so + we need to specify another parameter with the same information as in + the key(s). + + Log from slack: (2019-03-14) + + nico [1:55 PM] + If I use LPM for matching, can I easily get the network address from P4 or do I have to use a bitmask myself? In the latter case it is not exactly clear how to get the mask from the table + + Nate Foster [1:58 PM] + You want to retrieve the address in the packet? In a table? + And do you want to do the retrieving from the data plane or the control plane? (edited) + + nico [2:00 PM] + If I have a match in a table that matches on LPM, it can be any IP address in a network + For calculating the NAT64/NAT46 translation, I will need the base address, i.e. network address to do subtractions/additions + So it is fully data plane, what I would like to do + I'll commit sample code to show the use case more clearly + https://gitlab.ethz.ch/nicosc/master-thesis/blob/master/p4src/static-mapping.p4#L73 + GitLab + p4src/static-mapping.p4 · master · nicosc / master-thesis + gitlab.ethz.ch + So the action nat64_static() is used in the table v6_networks. + In v6_networks I use a match on `hdr.ipv6.dst_addr: lpm;` + What I would like to be able is to get the network address ; I can do that manually, if I have the mask + I can also re-inject this parameter by another action argument, but I'd assume that I can somewhere read this out from the table / match + + Nate Foster [2:15 PM] + To make sure I understand, in the data plane, you want to retrieve the address in the lpm pattern? (edited) + + nico [2:16 PM] + I want to retrieve the key + + Nate Foster [2:16 PM] + Wait. The value `hdr.ipv6.dst_addr` is the thing used in the match. + So you have that. + What you don’t have is the IPv6 address and mask put into the table by the control plane. + I assume you want the latter, right? + + nico [2:17 PM] + For example, if my matching key is 2001:db8::/32 and the real address is 2001:db8::f00, then I would like to retrieve 2001:db8:: and 32 from the table + exactly :slightly_smiling_face: + I can "fix" this by adding another argument, but it feels somewhat wrong to do that + Because the table already knows this information + + Nate Foster [2:26 PM] + I can’t think of a way other than the action parameter hack. + + nico [2:26 PM] + Oh, ok + Is it because the information is "lost in hardware"? + + Nate Foster [2:31 PM] + No you’re right that most implementations have the value in memory. And one can imagine a different table API that allowed one to retrieve it in the data plane. + But unless I am missing something obvious, P4 hides it… + +\end{verbatim} + +no meta information +\begin{verbatim} +Is there any meta information for "from which table was the action +called" available? My use case is having a debug action that sends +packets to the controller and I use it as a default_action in various +tables; however know I don't know anymore from which table the action +was called. Is there any kind of meta information which table called +me available? + +I could work around this by using if(! .. .hit) { my_action(table_id) +}, but it would not work with using default_action = ... + +\end{verbatim} + +type definitions separate + Code sharing (controller, switch) +\begin{verbatim} +*** DONE Synchronisation with the controller + - Double data type definition -> might differ + - TYPE_CPU for ethernet + - Port ingress offset (9 vs. 16 bit) + +\end{verbatim} + + +No switch in actions, No conditional execution in actions + + +P4os - reusable code + +\begin{verbatim} +Not addressed so far: how to create re-usable code fragments that can +be plugged in easily. There could be a hypothetical "P4OS" that +manages code fragments. This might include, but not limited to +downloading (signed?) source code, managing dependencies similar to +Linux package management, handling updates, etc. + +\end{verbatim} + +idomatic problem: Security issue: not checking checksums before + +% ---------------------------------------------------------------------- \section{\label{conclusion:netpfga}NetFGPA - all HERE} personal note here +tested various kernels for table debugging + MTU limitations: 1500 according to a private mail from Salvator Galea cambridge / uk @@ -132,11 +237,271 @@ hours for finding right output ports packet size / annotation +Needed to debug internal parsing errors +3x rebooting to get card working with bitstream + +Variable renaming breaks the compile process + +\begin{verbatim} +It seems I was really mistaken for the last weeks +If I am not totally mistaken, the following is happening with the netpfga: +I was testing sending and receiving packets on the same computer; so I sent a packet on nfX and expected an answer on nf0, which is how I wanted to verify that the card works +So I ran tcpdump on nf0, send a packet with ping6 and scapy on nf{0,1,2,3} (edited) +I have never seen the switch emitting ANY packet back with tcpdump +Now with the card connected to another host, sending neighbor solicitation, I see duplicated packets on the other host - so it seems that it might have worked all the time, just that tcpdump on nfX on the host which contains the card does not show the packets + +\end{verbatim} + +debugging generated tcl code to debug impl1 error + +Cable problems: +\begin{verbatim} +[ 488.265148] ixgbe 0000:02:00.0: failed to initialize because an unsupported SFP+ module type was detected. +[ 488.265157] ixgbe 0000:02:00.0: Reload the driver after installing a supported module. +[ 488.265605] ixgbe 0000:02:00.0: removed PHC on enp2s0f0 + +\end{verbatim} + +function syntax not supported, using defines instead + +4-6 MB logfiles for a compile process. + +confusing messages +\begin{verbatim} +WARNING: command 'get_user_parameter' will be removed in the 2015.3 +release, use 'get_user_parameters' instead + +\end{verbatim} + +critical non critical errors +\begin{verbatim} + + +CRITICAL WARNING: [BD 41-737] Cannot set the parameter TRANSLATION_MODE on /axi_interconnect_0. It is read-only. +\end{verbatim} + +\begin{verbatim} + - step9 (sume simulation, the longest step) in the process calls + "config_writes.py" + - config_writes.py fails with a syntax error, as it is incomplete + python code + - config_writes.py and config_writes.sh are generated by + gen_config_writes.py + - gen_config_writes.py reads config_writes.txt + - config_writes.txt is created in step 5 (sdnet simulation) + - step 5 consists of running xsc, xelab and xsim + - xsim (re-)generates config_writes.txt according to a watch ls -l + on the file: ${XILINX_VIVADO}/bin/xsim --runall + SimpleSumeSwitch_tb#work.glbl + - it seems (by grep -r) that ./Testbench/SimpleSumeSwitch_tb.sv is + responsible for writing config_writes.txt + - It seems that the "task" "SV_write_control" inside that file is + responsible for writing the content, which in turn uses + axi4_lite_master_write_request_control + + +\end{verbatim} + +\begin{verbatim} + - Cannot easily run P4 on notebook - changes to the system very + invasive + - Varous compiler bugs/limitations + - Very very deep rabbithole problems + - Hanging/sleeping issue -- unclear whether it does something or + not + - Open impl_1 error with unclear reason + - logfiles referenced that don't exist +Run output will be captured here: /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.runs/synth/runme.log +nico@nsg-System:~/master-thesis/netpfga/log$ ls -alh /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.runs/synth/runme.log +ls: cannot access '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.runs/synth/runme.log': No such file or directory + - even "short" compile runs taking 30m+ + +control_sub_m02_data_fifo_0_synth_1: /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.runs/control_sub_m02_data_fifo_0_synth_1/runme.log +nico@nsg-System:~/master-thesis/netpfga/minip4/testdata$ less /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.runs/control_sub_m02_data_fifo_0_synth_1/runme.log +/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.runs/control_sub_m02_data_fifo_0_synth_1/runme.log: No such file or directory + + - Wrong warnings: using 2018.2, getting warnings about things + removed in 2015.3 +WARNING: command 'get_user_parameter' will be removed in the 2015.3 +release, use 'get_user_parameters' instead + + - A script/makefile generates a python script that generates a shell + script and later then a python script. If there is a mistake in + generating the first python script (syntax ok, but content is + not correct) then a much later stage of the compile process will + fail due to a syntax error in the third generated + script. However that syntax error is not fatal in the build + process and thus can only be seen with careful analysis of the + logfile, which is around 700 KiB or 10k lines per compile + process and contains 328 lines matching "error" and + "warning". + + Most of the error and warning messages seem to be non-critical + (even if saying they are). Then there are a variety of INFO + messages that actually constitute ERROR messages, but are not + flagged as such nor do they cause the build process to abort. + +\end{verbatim} + +LPM tables don't work + +match type exact - table must be at least 64 in size + + +multiple reboots sometimes required for flashing + + +Damaged, enlarged packets + +\begin{verbatim} +** The NetPFGA saga +Problems encountered: +- The logfile for a compile run is 10k+ lines +- Many logged errors can actually be ignored (?) like: + +ERROR: [VRFC 10-1491] unexpected EOF [/home/nico/master-thesis/netpfga/minip4/nf_sume_sdnet_ip/SimpleSumeSwitch/S_CONTROLLERs.HDL/S_CONTROLLER_SimpleSumeSwitch.vp:37] +ERROR: [VRFC 10-426] cannot find port tuple_out_sume_metadata_DATA on this module [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/wrapper/nf_sume_sdnet.v:219] +ERROR: [VRFC 10-426] cannot find port tuple_out_sume_metadata_VALID on this module [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/wrapper/nf_sume_sdnet.v:218] +ERROR: [VRFC 10-426] cannot find port tuple_in_sume_metadata_DATA on this module [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/wrapper/nf_sume_sdnet.v:185] +ERROR: [VRFC 10-426] cannot find port tuple_in_sume_metadata_VALID on this module [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/wrapper/nf_sume_sdnet.v:184] +ERROR: [VRFC 10-2063] Module not found while processing module instance [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/Simp +leSumeSwitch/SimpleSumeSwitch.v:332] +ERROR: [VRFC 10-2063] Module not found while processing module instance [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/ +SimpleSumeSwitch/SimpleSumeSwitch.v:343] +ERROR: [VRFC 10-2063] Module not found while processing module instance [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_i +p/SimpleSumeSwitch/SimpleSumeSwitch.v:354] +ERROR: [VRFC 10-2063] Module not found while processing module instance [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/SimpleSumeSwitc +h/SimpleSumeSwitch.v:436] +ERROR: [VRFC 10-2063] Module not found while processing module instance [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/SimpleSumeS +witch/SimpleSumeSwitch.v:474] +ERROR: [VRFC 10-2063] Module not found while processing module instance [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_s +ume_sdnet_ip/SimpleSumeSwitch/SimpleSumeSwitch.v:502] +ERROR: [VRFC 10-2063] Module not found while processing module instance [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/SimpleS +umeSwitch/SimpleSumeSwitch.v:533] +ERROR: [VRFC 10-2063] Module not found while processing module instance [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/SimpleSumeS +witch/SimpleSumeSwitch.v:561] + +# launch_simulation -simset sim_1 -mode behavioral +INFO: [Vivado 12-5698] Checking validity of IPs in the design for the 'XSim' simulator... +CRITICAL WARNING: [BD 41-1356] Address block is not mapped into . Please use Address Editor to either map or exclude it. +CRITICAL WARNING: [BD 41-1356] Address block is not mapped into . Please use Address Editor to either map or exclude it. + +WARNING: [VRFC 10-756] identifier state is used before its declaration [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/axis_sim_record_ip0/hdl/axis_sim_record.v:93] +WARNING: [VRFC 10-756] identifier ready_count is used before its declaration [/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/axis_sim_record_ip0/hdl/axis_sim_record.v:94] + + + +INFO: [#UNDEF] Sorry, too many errors.. +ERROR: [XSIM 43-3322] Static elaboration of top level Verilog design unit(s) in library work failed. +INFO: [USF-XSim-69] 'elaborate' step finished in '1' seconds +INFO: [USF-XSim-99] Step results log file:'/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.sim/sim_1/behav/xsim/elaborate.log' +ERROR: [USF-XSim-62] 'elaborate' step failed with error(s). Please check the Tcl console output or '/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.sim/sim_1/behav/xsim/elaborate.log' file for more information. + +nico@nsg-System:~/master-thesis$ find . -name elaborate.log +nico@nsg-System:~/master-thesis$ find ~ -name elaborate.log +nico@nsg-System:~/master-thesis$ + +- Scripts that "fail" (generate wrong data) do exit 0 -> + There is no easy / reliable error detection +- Writing tables resulted in ioctl errors +- Hardware test: unclear if first board was/is broken or not, + BUT: second board in different computer allows writing tables +- Many scripts depend on each other in later stages, without clear + dependencies +- There is basically no documentation for someone who "just wants to + compile from P4 to netpfga" or A LOT of documentation (if vivado, + vhld, sdnet documentation is counted) +- Very high complexity in toolchain, scripts that are generated ++ cd /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/sim_switch_default ++ make +rm -f config_writes.py* +rm -f *.pyc + +nico@nsg-System:~$ cat /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/testdata/config_writes.py + +from NFTest import * + +NUM_WRITES = 4 + +def config_tables(): + nftest_regwrite(0x44020050, 0x22222208) + nftest_regwrite(0x44020054, 0x00000822) + nftest_regwrite(0x44020080, 0x00000201) + nftest_regwrite(0x44020040, 0x00000001) +nico@nsg-System:~$ cat /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/testdata/config_writes.sh +#!/bin/bash + +${SUME_SDNET}/sw/sume/rwaxi -a 0x44020050 -w 0x22222208 +${SUME_SDNET}/sw/sume/rwaxi -a 0x44020054 -w 0x00000822 +${SUME_SDNET}/sw/sume/rwaxi -a 0x44020080 -w 0x00000201 +${SUME_SDNET}/sw/sume/rwaxi -a 0x44020040 -w 0x00000001 +nico@nsg-System:~$ + + +- Misleading errors like +ERROR: [USF-XSim-62] 'elaborate' step failed with error(s). Please check the Tcl console output or '/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.sim/sim_1/behav/xsim/elaborate.log' file for more information. +nico@nsg-System:~/master-thesis/netpfga$ ls /home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.sim/sim_1/behav/xsim/elaborate.log +ls: cannot access '/home/nico/master-thesis/netpfga/minip4/simple_sume_switch/hw/project/simple_sume_switch.sim/sim_1/behav/xsim/elaborate.log': No such file or directory + +- not using raise() and hiding source of errors (_hexify) + +- sometimes flashing fails: + +#+BEGIN_CENTER +nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/bitfiles$ sudo bash -c ". $HOME/master-thesis/netpfga/bashinit && $(pwd -P)/program_switch.sh" +++ which vivado ++ xilinx_tool_path=/opt/Xilinx/Vivado/2018.2/bin/vivado ++ bitimage=minip4.bit ++ configWrites=config_writes.sh ++ '[' -z minip4.bit ']' ++ '[' -z config_writes.sh ']' ++ '[' /opt/Xilinx/Vivado/2018.2/bin/vivado == '' ']' ++ rmmod sume_riffa ++ xsct /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl -tclargs minip4.bit +rlwrap: warning: your $TERM is 'screen' but rlwrap couldn't find it in the terminfo database. Expect some problems. +RUN loading image file. +minip4.bit +100% 19MB 1.7MB/s 00:11 +fpga configuration failed. DONE PIN is not HIGH + invoked from within +"::tcf::eval -progress ::xsdb::print_progress {::tcf::cache_enter tcfchan#0 {tcf_cache_eval {process_tcf_actions_cache_client ::tcfclient#0::arg}}}" + (procedure "::tcf::cache_eval_with_progress" line 2) + invoked from within +"::tcf::cache_eval_with_progress [dict get $arg chan] [list process_tcf_actions_cache_client $argvar] $progress" + (procedure "process_tcf_actions" line 1) + invoked from within +"process_tcf_actions $arg ::xsdb::print_progress" + (procedure "fpga" line 430) + invoked from within +"fpga -f $bitimage" + (file "/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/run_xsct.tcl" line 33) + ++ bash /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/tools/pci_rescan_run.sh +Check programming FPGA or Reboot machine ! ++ rmmod sume_riffa +rmmod: ERROR: Module sume_riffa is not currently loaded ++ modprobe sume_riffa ++ ifconfig nf0 up +nf0: ERROR while getting interface flags: No such device ++ ifconfig nf1 up +nf1: ERROR while getting interface flags: No such device ++ ifconfig nf2 up +nf2: ERROR while getting interface flags: No such device ++ ifconfig nf3 up +nf3: ERROR while getting interface flags: No such device ++ bash config_writes.sh +nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/bitfiles$ + +#+END_CENTER + +\end{verbatim} \section{\label{conclusion:realworld}Real world applications} Can be deployed using the netpfga. Or Barefoot or Arista. + + \section{\label{conclusion:outlook}Outlook} %** Outlook.tex: What needs to be done further, what is planed @@ -159,6 +524,14 @@ support these schemes to be compatible to other implementations. No fragmentation No address / mac learning +**** No DNS64 + has already been solved in a different domain - could even do + transparent / in network modification + **** Incomplete NDP + Very limited option support + + No resolution of hardware addresses + \section{\label{conclusion:closing}Closing words (NAME?)} While the port to NetPFGA was significantly more effort then expected, the learnings of the different layers were very much appreciated / liked diff --git a/doc/Design.tex b/doc/Design.tex index e2eac05..cee6b2c 100644 --- a/doc/Design.tex +++ b/doc/Design.tex @@ -5,7 +5,7 @@ Description of the theory/software/hardware that you designed. In this chapter we describe the architecture of our solution. % ---------------------------------------------------------------------- -\section{\label{Design:General}General} +\section{\label{Design:General}General - FIXME} The high level design can be seen in figure \ref{fig:switchdesign}: a P4 capable switch is running our code to provide NAT64 functionality. The P4 switch cannot manage its tables on it own and @@ -26,6 +26,40 @@ translation method or as an in network NAT64 translation (compare figures \ref{fig:v6v4innetwork} and \ref{fig:v6v4standard}). The controller is implemented in python, the NAT64 solution is implemented in P4. + +Describe network layouts +\begin{verbatim} + - IPv6 subnet 2001:db8::/32 + - IPv6 hosts are in 2001:db8:6::/64 + - IPv6 default router (::/0) is 2001:db8:6::42/64 + - IPv4 mapped Internet "NAT64 prefix" 2001:db8:4444::/96 (should + go into a table) + - IPv4 hosts are in 10.0.4.0/24 + - IPv6 in IPv4 mapped hosts are in 10.0.6.0/24 + - IPv4 default router = 10.0.0.42 + +\end{verbatim} + +Describe testing methods +\begin{verbatim} + def test_v4_udp_to_v6(self): + print('mx h3 "echo V4-OK | socat - UDP:10.1.1.1:2342"') + print('mx h1 "echo V6-OK | socat - UDP-LISTEN:2342"') + + return + +p4@ubuntu:~$ mx h1 "echo V6-OK | socat - UDP6-LISTEN:2342" +p4@ubuntu:~/master-thesis/bin$ mx h3 "echo V4-OK | socat - UDP:10.1.1.1:2342" + +while true; do mx h3 "echo V4-OK | socat - TCP-LISTEN:2343"; sleep 2; +done + +while true; do mx h1 "echo V6-OK | socat - +TCP6:[2001:db8:1::a00:1]:2343"; sleep 2; done + + mx h1 "echo V6-OK | socat - TCP6:[2001:db8:1::a00:1]:2343" + +\end{verbatim} % ---------------------------------------------------------------------- \section{\label{Design:BMV2}BMV2} Development of the thesis took place on a software emulated switch diff --git a/doc/Results.tex b/doc/Results.tex index 624261b..5646366 100644 --- a/doc/Results.tex +++ b/doc/Results.tex @@ -8,6 +8,7 @@ Parser for all protocols (udp,tcp,icmp,icmp6) BMV2: more feature rich, but software only solution NetFPGA: capabale of line speed Nat64, focused port on nat64 +Both support EAMT as defined by RFC7757 \cite{rfc7757}. \section{\label{Results:BMV2}BMV2} @@ -36,6 +37,87 @@ Stateful : no automatic removal \section{\label{Results:NetPFGA}NetFPGA} + +Trace files +\begin{verbatim} + create mode 100644 pcap/tcp-udp-delta-2019-07-17-1555-h1.pcap + create mode 100644 pcap/tcp-udp-delta-2019-07-17-1555-h3.pcap + create mode 100644 pcap/tcp-udp-delta-2019-07-17-1557-h1.pcap + create mode 100644 pcap/tcp-udp-delta-2019-07-17-1558-h3.pcap + + +\end{verbatim} + +\begin{verbatim} +*** DONE 2019-07-21: Proof of v6->v4 working delta based + CLOSED: [2019-07-21 Sun 12:30] +#+BEGIN_CENTER + pcap/tcp-udp-delta-from-v6-2019-07-21-0853-h1.pcap | Bin 0 -> 4252 bytes + pcap/tcp-udp-delta-from-v6-2019-07-21-0853-h3.pcap | Bin 0 -> 2544 bytes +#+END_CENTER + +\end{verbatim} + +\begin{verbatim} +**** DONE Testing v4->v6 tcp: ok (version 10.0) + CLOSED: [2019-08-04 Sun 09:15] +#+BEGIN_CENTER +nico@ESPRIMO-P956:~/master-thesis/bin$ ./socat-connect-tcp-v4 ++ echo from-v4-ok ++ socat - TCP:10.0.0.66:2345 +TCPv6-ok +nico@ESPRIMO-P956:~/master-thesis/bin$ ./socat-listen-tcp-v6 +from-v4-ok + +#+END_CENTER + +trace: +netfpga-nat64-2019-08-04-0907-enp2s0f0.pcap +netfpga-nat64-2019-08-04-0907-enp2s0f1.pcap + +**** DONE Testing v4->v6 udp: ok (version 10.1) +trace: + create mode 100644 pcap/netfpga-nat64-udp-2019-08-04-0913-enp2s0f0.pcap + create mode 100644 pcap/netfpga-nat64-udp-2019-08-04-0913-enp2s0f1.pcap + +\end{verbatim} + +\begin{verbatim} +*** DONE 2019-08-04: version 10.1/10.2: new maxpacketregion: v4->v6 works + CLOSED: [2019-08-04 Sun 19:42] +#+BEGIN_CENTER +nico@ESPRIMO-P956:~/master-thesis/bin$ ./init_ipv4_esprimo.sh +nico@ESPRIMO-P956:~/master-thesis/bin$ ./set_ipv4_neighbor.sh + +#+END_CENTER + +Test 20 first: + +- Does't work -> missed to add table entries +- Does work after setting table entries +- 300 works +- 1450 works +- 1500 does not work + +Proof: + + create mode 100644 pcap/netfpga-10.2-maxpacket-2019-08-04-1931-enp2s0f0.pcap + create mode 100644 pcap/netfpga-10.2-maxpacket-2019-08-04-1931-enp2s0f1.pcap + +\end{verbatim} + +\begin{verbatim} +*** DONE 2019-08-04: test v6 -> v4: works for 1420 + CLOSED: [2019-08-04 Sun 20:30] + +Proof: +#+BEGIN_CENTER + create mode 100644 pcap/netfpga-10.2-fromv6tov4-2019-08-04-1943-enp2s0f0.pcap + create mode 100644 pcap/netfpga-10.2-fromv6tov4-2019-08-04-1943-enp2s0f1.pcap + + +\end{verbatim} + General result: limited NAT64 is working, however No Payload @@ -49,6 +131,19 @@ General result: limited NAT64 is working, however \section{\label{results:softwarenat64}NAT64 in Software} Tayga, Jool +tayga: Single threaded +fork: + +\begin{verbatim} +| What? | Description | State in P4 | References | +|---------------------+------------------------------------------+-------------------+---------------------------------------------------------------------------------| + +| Jool EAMT | Mapping with tables, multiple entries | Supported | https://www.jool.mx/en/eamt.html, https://www.jool.mx/en/run-eam.html, RFC 7757 | +| Jool SIIT | Mapping IPv6 to range of IPv4, one entry | Supported by EAMT | | + +\end{verbatim} + + \section{\label{results:features}Feature comparison} speed - sessions - eamt diff --git a/doc/Thesis.pdf b/doc/Thesis.pdf index a5f6610..c173f72 100644 Binary files a/doc/Thesis.pdf and b/doc/Thesis.pdf differ diff --git a/doc/appendix.tex b/doc/appendix.tex index b0ff702..69a0e55 100644 --- a/doc/appendix.tex +++ b/doc/appendix.tex @@ -1641,6 +1641,7 @@ cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-swit [15:31] rainbow:P4-NetFPGA% \end{verbatim} +Most often occured error: \begin{verbatim} # open_run impl_1 ERROR: [Common 17-69] Command failed: Run 'impl_1' has not been launched. Unable to open @@ -1668,6 +1669,660 @@ ERROR: [Common 17-39] 'connect_bd_intf_net' failed due to earlier errors. \end{verbatim} +\begin{verbatim} + +### set NF_10G_INTERFACE3_BASEADDR $M07_BASEADDR +### set NF_10G_INTERFACE3_HIGHADDR $M07_HIGHADDR +### set NF_10G_INTERFACE3_SIZEADDR $M07_SIZEADDR +### set NF_RIFFA_DMA_BASEADDR $M08_BASEADDR +### set NF_RIFFA_DMA_HIGHADDR $M08_HIGHADDR +### set NF_RIFFA_DMA_SIZEADDR $M08_SIZEADDR +Wrote : +# create_ip -name nf_sume_sdnet -vendor NetFPGA -library NetFPGA -module_name nf_sume_sdnet_ip +ERROR: [Coretcl 2-1134] No IP matching VLNV 'NetFPGA:NetFPGA:nf_sume_sdnet:*' was found. Please check your repository configuration. +INFO: [Common 17-206] Exiting Vivado at Sat May 25 11:52:01 2019... + +\end{verbatim} +\begin{verbatim} +# set_property compxlib.xsim_compiled_library_dir {} [current_project] [0/1819] +# set_property top_lib xil_defaultlib [get_filesets sim_1] +# update_compile_order -fileset sim_1 +update_compile_order: Time (s): cpu = 00:00:17 ; elapsed = 00:00:09 . Memory (MB): peak = 2003.578 ; gain = 8.004 ; free physical = 27661 ; free virtual = 33990 +loading libsume.. +Traceback (most recent call last): + File "/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/sim_switch_default/run.py", line 42, in + import config_writes + File "/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/sim_switch_default/config_writes.py", line 7 + + ^ +IndentationError: expected an indented block + while executing +"exec python $::env(NF_DESIGN_DIR)/test/${test_name}/run.py" + invoked from within +"set output [exec python $::env(NF_DESIGN_DIR)/test/${test_name}/run.py]" + (file "/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/tcl/simple_sume_switch_sim.tcl" line 177) +INFO: [Common 17-206] Exiting Vivado at Sat May 25 13:45:13 2019... +make: *** [Makefile:121: sim] Error 1 +\end{verbatim} + +\begin{verbatim} +[SW] CAM_EnableDevice() - done +[2420698] INFO: finished packet stimulus file +[2735572] ERROR: tuple mismatch for packet 1 +expected < tuple_out_digest_data, tuple_out_sume_metadata > = < 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000001010000 > +actual < tuple_out_digest_data, tuple_out_sume_metadata > = < 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000010000 > +$finish called at time : 2735572 ps : File +"/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/nf_sume_sdnet_ip/SimpleSumeSwitch/Testbench/Check.v" +Line 120 +\end{verbatim} + +\begin{verbatim} +[14:54] rainbow:bitfiles% cd $NF_DESIGN_DIR/bitfiles/ && sudo bash ./program_switch.sh +./program_switch.sh: line 34: /tools/program_switch.sh: No such file or directory +[14:56] rainbow:bitfiles% ls +config_writes.sh minip4.bit program_switch.sh README +[14:56] rainbow:bitfiles% +\end{verbatim} + +\begin{verbatim} +root@rainbow:~/master-thesis/netpfga/minip4/sw/hw_test_tool# python switch_calc_tester.py +SIOCSIFADDR: No such device +eth1: ERROR while getting interface flags: No such device +SIOCSIFNETMASK: No such device +tcpdump: eth1: No such device exists +(SIOCGIFHWADDR: No such device) +The HW testing tool for the switch_calc design + type help to see all commands +testing> +\end{verbatim} + +\begin{verbatim} +>> table_cam_add_entry lookup_table send_to_port1 ff:ff:ff:ff:ff:ff => +CAM_Init_ValidateContext() - done +WROTE 0x44020050 = 0xffffffff +WROTE 0x44020054 = 0xffff +WROTE 0x44020080 = 0x0003 +python: ioctl: Unknown error 512 +[20:27] rainbow:CLI% + +\end{verbatim} + +\begin{verbatim} +[7:05] rainbow:netpfga% bash build-load-drivers.sh ++ cd /home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0 ++ make all +make -C /lib/modules/5.0.0-16-generic/build M=/home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0 modules +make[1]: Entering directory '/usr/src/linux-headers-5.0.0-16-generic' + Building modules, stage 2. + MODPOST 1 modules +make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-16-generic' ++ sudo make install +make -C /lib/modules/5.0.0-16-generic/build M=/home/nico/projects/P4-NetFPGA/lib/sw/std/driver/sume_riffa_v1_0_0 modules +make[1]: Entering directory '/usr/src/linux-headers-5.0.0-16-generic' + Building modules, stage 2. + MODPOST 1 modules +make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-16-generic' +install -o root -g root -m 0755 -d /lib/modules/5.0.0-16-generic/extra/sume_riffa/ +install -o root -g root -m 0755 sume_riffa.ko /lib/modules/5.0.0-16-generic/extra/sume_riffa/ +depmod -a 5.0.0-16-generic ++ sudo modprobe sume_riffa +modprobe: ERROR: could not insert 'sume_riffa': Exec format error +[7:06] rainbow:netpfga% + +\end{verbatim} + +\begin{verbatim} +java traceback when trying to install sdnet +#+BEGIN_CENTER +Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Window must not be zero + at java.desktop/sun.awt.X11.XAtom.checkWindow(Unknown Source) + at java.desktop/sun.awt.X11.XAtom.getAtomData(Unknown Source) + at java.desktop/sun.awt.X11.XToolkit.getWorkArea(Unknown Source) + at java.desktop/sun.awt.X11.XToolkit.getInsets(Unknown Source) + at java.desktop/sun.awt.X11.XToolkit.getScreenInsets(Unknown Source) + at java.desktop/java.awt.Window.init(Unknown Source) + at java.desktop/java.awt.Window.(Unknown Source) + at java.desktop/java.awt.Window.(Unknown Source) + at java.desktop/java.awt.Dialog.(Unknown Source) + at java.desktop/java.awt.Dialog.(Unknown Source) + at java.desktop/javax.swing.JDialog.(Unknown Source) + at java.desktop/javax.swing.JOptionPane.createDialog(Unknown Source) + at java.desktop/javax.swing.JOptionPane.createDialog(Unknown Source) + at j.a.c(Unknown Source) + at j.a.a(Unknown Source) + at j.a.a(Unknown Source) + at j.a.c(Unknown Source) + at com.xilinx.installer.gui.panel.destination.b.a(Unknown Source) + at com.xilinx.installer.gui.panel.destination.DestinationPanel.z(Unknown Source) + at com.xilinx.installer.gui.E.a(Unknown Source) + at com.xilinx.installer.gui.InstallerGUI.l(Unknown Source) + at com.xilinx.installer.gui.i.actionPerformed(Unknown Source) + at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source) + at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) + at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) + at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source) + at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) + at java.desktop/java.awt.Component.processMouseEvent(Unknown Source) + at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source) + at java.desktop/java.awt.Component.processEvent(Unknown Source) + at java.desktop/java.awt.Container.processEvent(Unknown Source) + at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source) + at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) + at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) + at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) + at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) + at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) + at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source) + at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source) + at java.desktop/java.awt.Component.dispatchEvent(Unknown Source) + at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source) + at java.desktop/java.awt.EventQueue.access$500(Unknown Source) + at java.desktop/java.awt.EventQueue$3.run(Unknown Source) + at java.desktop/java.awt.EventQueue$3.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) + at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) + at java.desktop/java.awt.EventQueue$4.run(Unknown Source) + at java.desktop/java.awt.EventQueue$4.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Native Method) + at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) + at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source) + at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) + at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) + at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) + at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) + at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source) + at java.desktop/java.awt.EventDispatchThread.run(Unknown Source) + + +#+END_CENTER + +Reason was a hidden window. + +\end{verbatim} + +Testing the card +\begin{verbatim} +--------------------------------------------- +[ddr3B]: Running Auto Test +--------------------------------------------- +Traceback (most recent call last): + File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 16765, in + lambda event: event.callable(*event.args, **event.kw) ) + File "sw/host/script/NfSumeTest.py", line 848, in UpdateProgress + self.progressDlg.Update(self.curProgress, str(localLine)) + File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 16710, in __getattr__ + raise PyDeadObjectError(self.attrStr % self._name) +wx._core.PyDeadObjectError: The C++ part of the NfSumeProgress object has been deleted, attribute access no longer allowed. +Exception in thread Thread-18: +Traceback (most recent call last): + File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner + self.run() + File "sw/host/script/NfSumeTest.py", line 947, in run + self.target(*self.data) + File "sw/host/script/NfSumeTest.py", line 355, in StartAutoTest + self.TestInterface(testName) + File "sw/host/script/NfSumeTest.py", line 465, in TestInterface + self.ProgramFpga('../../../bitfiles/' + self.nfSumeTestConfiguration[testName]['bitstream']) + File "sw/host/script/NfSumeTest.py", line 586, in ProgramFpga + self.getFpgaIndex() + File "sw/host/script/NfSumeTest.py", line 574, in getFpgaIndex + p = Popen(['djtgcfg', 'init', '-d', 'NetSUME'], stdout=PIPE, bufsize = 1) + File "/usr/lib/python2.7/subprocess.py", line 711, in __init__ + errread, errwrite) + File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child + raise child_exception +OSError: [Errno 2] No such file or directory + +\end{verbatim} + +\begin{verbatim} +--------------------------------------------- +[pcie]: Running Auto Test +--------------------------------------------- +Traceback (most recent call last): + File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 16765, in + lambda event: event.callable(*event.args, **event.kw) ) + File "sw/host/script/NfSumeTest.py", line 848, in UpdateProgress + self.progressDlg.Update(self.curProgress, str(localLine)) + File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 16710, in __getattr__ + raise PyDeadObjectError(self.attrStr % self._name) +wx._core.PyDeadObjectError: The C++ part of the NfSumeProgress object has been deleted, attribute access no longer allowed. +Exception in thread Thread-21: +Traceback (most recent call last): + File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner + self.run() + File "sw/host/script/NfSumeTest.py", line 947, in run + self.target(*self.data) + File "sw/host/script/NfSumeTest.py", line 466, in TestInterface + self.serialCon.readlines() + File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 495, in read + raise SerialException('device reports readiness to read but returned no data (device disconnected or multiple access on port?)') +SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?) + + +\end{verbatim} + +Another generated file problem: +\begin{verbatim} +nico@nsg-System:~/master-thesis/netpfga$ grep -i error $P4_PROJECT_DIR/nf_sume_sdnet_ip/SimpleSumeSwitch/LOG +ERROR: [VRFC 10-1491] unexpected EOF [/home/nico/master-thesis/netpfga/minip4/nf_sume_sdnet_ip/SimpleSumeSwitch/S_CONTROLLERs.HDL/S_CONTROLLER_SimpleSumeSwitch.vp:37] +INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_0_ErrorCheck +INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_1_ErrorCheck +INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_2_ErrorCheck +INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_3_ErrorCheck +INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_4_ErrorCheck +INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_5_ErrorCheck +INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_6_ErrorCheck + +\end{verbatim} + +function syntax not supported +\begin{verbatim} +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 +headers.p4(246):syntax error, unexpected IDENTIFIER, expecting ( +bit<16> ones_complement_sum + ^^^^^^^^^^^^^^^^^^^ +error: 1 errors encountered, aborting compilation +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$ + + +\end{verbatim} + +\begin{verbatim} +nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/sim_switch_default$ cd $NF_DESIGN_DIR/test/sim_switch_default && make 2>&1 | tee ~/master-thesis/netpfga/log/step8-$(date +%F-%H%M%S) +rm -f config_writes.py* +rm -f *.pyc +cp /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/testdata/config_writes.py ./ +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/testdata/config_writes.py': No such file or directory +Makefile:36: recipe for target 'all' failed +make: *** [all] Error 1 + +\end{verbatim} + +\begin{verbatim} +Finished scanning sources +INFO: [IP_Flow 19-234] Refreshing IP repositories +INFO: [IP_Flow 19-1700] Loaded user IP repository '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/ip_repo'. +INFO: [IP_Flow 19-2313] Loaded Vivado IP repository '/opt/Xilinx/Vivado/2018.2/data/ip'. +WARNING: [IP_Flow 19-3664] IP 'bd_7ad4_xpcs_0' generated file not found '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/.Xil/Vivado-26302-nsg-System/coregen/bd_7ad4_xpcs_0_1/elaborate/configure_gt.tcl'. Please regenerate to continue. +WARNING: [IP_Flow 19-3664] IP 'bd_a1aa_xpcs_0' generated file not found '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/.Xil/Vivado-26302-nsg-System/coregen/bd_a1aa_xpcs_0_2/elaborate/configure_gt.tcl'. Please regenerate to continue. +open_project: Time (s): cpu = 00:00:05 ; elapsed = 00:00:05 . Memory (MB): peak = 1365.715 ; gain = 188.977 ; free physical = 9396 ; free virtual = 15104 +# puts "\nOpening $design Implementation design\n" + +\end{verbatim} + +\begin{verbatim} +WARNING: [Synth 8-689] width (12) of port connection 'control_S_AXI_ARADDR' does not match port width (8) of module 'SimpleSumeSwitch' [/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/wrapper/nf_sume_sdnet.v:199] +ERROR: [Synth 8-448] named port connection 'tuple_out_sume_metadata_VALID' does not exist for instance 'SimpleSumeSwitch_inst' of module 'SimpleSumeSwitch' [/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/wrapper/nf_sume_sdnet.v:218] +ERROR: [Synth 8-448] named port connection 'tuple_out_sume_metadata_DATA' does not exist for instance 'SimpleSumeSwitch_inst' of module 'SimpleSumeSwitch' [/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/wrapper/nf_sume_sdnet.v:219] +ERROR: [Synth 8-6156] failed synthesizing module 'nf_sume_sdnet' [/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/nf_sume_sdnet_ip/wrapper/nf_sume_sdnet.v:44] +ERROR: [Synth 8-6156] failed synthesizing module 'nf_sume_sdnet_ip' [/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/project/simple_sume_switch.srcs/sources_1/ip/nf_sume_sdnet_ip/synth/nf_sume_sdnet_ip.v:57] +ERROR: [Synth 8-6156] failed synthesizing module 'nf_datapath' [/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/hdl/nf_datapath.v:44] +ERROR: [Synth 8-6156] failed synthesizing module 'top' [/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/hdl/top.v:43] +\end{verbatim} + +Missing ``souce'' files: +\begin{verbatim} +cc -c -fPIC /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/sw/API/CAM.c -I/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/sw/API +cc -std=c99 -Wall -Werror -fPIC -c libcam.c -I/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/sw/sume -I/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/sw/API +cc -L/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/sw/sume -shared -o libcam.so libcam.o CAM.o -lsumereg +/usr/bin/ld: cannot find -lsumereg +collect2: error: ld returned 1 exit status +Makefile:52: recipe for target 'libcam' failed +make[1]: *** [libcam] Error 1 +make[1]: Leaving directory '/home/nico/master-thesis/netpfga/minip4/sw/CLI' +ERROR: could not compile libcam souce files + + +\end{verbatim} + +Generated files not found: +\begin{verbatim} +make: Leaving directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test' +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/hw/Makefile': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_0_log.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_0_stim.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_0_expected.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_1_log.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_1_stim.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_1_expected.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_2_log.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_2_stim.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_2_expected.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_3_log.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_3_stim.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/nf_interface_3_expected.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/dma_0_log.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/dma_0_expected.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/Makefile': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/reg_stim.log': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/reg_expect.axi': No such file or directory +cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/reg_stim.axi': No such file or directory +NetFPGA environment: + Root dir: /home/nico/projects/P4-NetFPGA + Project name: simple_sume_switch + Project dir: /tmp/nico/test/simple_sume_switch + Work dir: /tmp/nico +512 +=== Work directory is /tmp/nico/test/simple_sume_switch +=== Setting up test in /tmp/nico/test/simple_sume_switch/sim_switch_default +=== Running test /tmp/nico/test/simple_sume_switch/sim_switch_default ... using cmd ['/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/sim_switch_default/run.py', '--sim', 'xsim'] ++ date +Die Jul 23 13:34:54 CEST 2019 ++ [ = no ] ++ cd /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch ++ make +make: *** No targets specified and no makefile found. Stop. + +\end{verbatim} + +Renaming variables breaks the compile process +\begin{verbatim} + @Xilinx_MaxPacketRegion(1024) + control TopDeparser( +- packet_out b, +- in Parsed_packet p, ++ packet_out packet, ++ in Parsed_packet hdr, + in user_metadata_t user_metadata, + inout digest_data_t digest_data, + inout sume_metadata_t sume_metadata) { + + apply { +- b.emit(p.ethernet); ++ packet.emit(hdr.ethernet); + } ++ ++ + } +\end{verbatim} + +LPM size must be != 64 + +\begin{verbatim} +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{verbatim} + +LIMIT table match types are not the same error +\begin{verbatim} +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 + + 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{verbatim} + +Implicit error saying that LPM tables don't work: + +\begin{verbatim} +s/sume-sdnet-switch/projects/minip4/nf_sume_sdnet_ip/SimpleSumeSwitch/realmain_lookup_table_0_t.HDL/xpm_memory.sv +[SW] LPM_Init() - start +[SW] LPM_Init() - done +[SW] LPM_LoadDataset() - start +[SW] LPM_LoadDataset() failed with error code = 12 +FATAL_ERROR: Vivado Simulator kernel has encounted an exception from DPI C function: LPM_VerifyDataset(). Please correct. +Time: 2016466 ps Iteration: 0 Process: /SimpleSumeSwitch_tb/LPM_VerifyDataset + File: /home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/nf_sume_sdnet_ip/SimpleSumeSwitch/Testbench/SimpleSumeSwitch_tb.sv +\end{verbatim} + +\begin{verbatim} +minip4_solution.p4(35) +parser RealParser( + ^^^^^^^^^^ +actions_nat64_generic.p4(173): error: table size too small for match_type(EM): 63 < 64 + size = 63; + ^^ +actions_nat64_generic.p4(173): error: could not not map table size size + size = 63; + ^^^^ + +\end{verbatim} + +Unsupported default parameters +\begin{verbatim} +actions_egress.p4(89): error: data-plane arguments in default_actions are currently unsupported: realmain_controller_debug_table_id_0 + default_action = controller_debug_table_id(TABLE_V4_NETWORKS); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +terminate called after throwing an instance of 'Util::CompilerBug' + what(): In file: /wrk/hdscratch/staff/mohan/p4c_sdnet/build/p4c/extensions/sdnet/translate/core/lookupEngine.cpp:137 +Compiler Bug: actions_egress.p4(89): unhandled expression realmain_controller_debug_table_id/realmain_controller_debug_table_id_0(5); + default_action = controller_debug_table_id(TABLE_V4_NETWORKS); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +\end{verbatim} + +Compiler Bug / ifstatement +\begin{verbatim} +minip4_solution.p4(39) +parser RealParser( + ^^^^^^^^^^ +terminate called after throwing an instance of 'Util::CompilerBug' + what(): In file: /wrk/hdscratch/staff/mohan/p4c_sdnet/build/p4c/extensions/sdnet/writers/pxWriter.h:20 +Compiler Bug: unhandled node: (471564) + +Makefile:34: recipe for target 'all' failed +make[1]: *** [all] Error 134 +make[1]: Leaving directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/src' +Makefile:31: recipe for target 'frontend' failed + +\end{verbatim} + +Applying table ``twice'' in different branches is impossible (another +compiler bug) + +\begin{verbatim} + +make -C src/ +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 +minip4_solution.p4(19): [--Wwarn=uninitialized_out_param] warning: out parameter meta may be uninitialized when RealParser terminates + out metadata meta, + ^^^^ +minip4_solution.p4(16) +parser RealParser( + ^^^^^^^^^^ +terminate called after throwing an instance of 'Util::CompilerBug' + what(): In file: /wrk/hdscratch/staff/mohan/p4c_sdnet/build/p4c/extensions/sdnet/translate/core/tupleEngine.cpp:324 +Compiler Bug: overwrite + +Makefile:34: recipe for target 'all' failed + + +\end{verbatim} + +Adding entries requires setting all parameters +\begin{verbatim} +>> table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434178 => 1 +ERROR: not enough fields provided to complete _hexify() + +\end{verbatim} + +Broken code that cannot convret long to int: +\begin{verbatim} +>> table_cam_delete_entry realmain_v6_networks_0 42540766411362381960998550477184434179 +ERROR: failed to convert 42540766411362381960998550477184434179 of type to an integer +nico@nsg-System:~/master-thesis/netpfga/minip4/sw/CLI$ + +\end{verbatim} + +% ---------------------------------------------------------------------- +\section{P4 error messages} + +\begin{verbatim} +Warning: you requested the nanomsg event logger, but bmv2 was compiled without -DBMELOG, and the event logger cannot be activated +Calling target program-options parser +[14:01:44.334] [bmv2] [D] [thread 23356] Set default default entry for table 'MyIngress.icmp6': MyIngress.controller_debug_table_id - 2, +[14:01:44.341] [bmv2] [D] [thread 23356] Set default default entry for table 'MyIngress.nat64': MyIngress.controller_debug_table_id - 1, +[14:01:44.344] [bmv2] [D] [thread 23356] Set default default entry for table 'tbl_act': act - +[14:01:44.345] [bmv2] [D] [thread 23356] Set default default entry for table 'tbl_act_0': act_0 - +[14:01:44.345] [bmv2] [D] [thread 23356] Set default default entry for table 'tbl_nat64_icmp6_generic': MyIngress.nat64_icmp6_generic - +[14:01:44.345] [bmv2] [D] [thread 23356] Set default default entry for table 'tbl_act_1': act_1 - +[14:01:44.345] [bmv2] [D] [thread 23356] Set default default entry for table 'tbl_act_2': act_2 - +[14:01:44.345] [bmv2] [D] [thread 23356] Set default default entry for table 'MyIngress.v4_networks': MyIngress.controller_debug_table_id - 5, +[14:01:44.345] [bmv2] [D] [thread 23356] Set default default entry for table 'MyIngress.v6_networks': MyIngress.controller_debug_table_id - 3, +[14:01:44.346] [bmv2] [D] [thread 23356] Set default default entry for table 'tbl_act_3': act_3 - +Invalid entry type 'expression' in field list +bad json: +{ + "type" : "expression", + "value" : { + "type" : "expression", + "value" : { + "left" : null, + "op" : "d2b", + "right" : { + "type" : "field", + "value" : [ "scalars", "metadata.chk_icmp6_na_ns" ] + } + } + } +} + +\end{verbatim} + +\begin{verbatim} +../p4src/static-mapping.p4(121): error: MyIngress.nat64, Multiple LPM keys in table + table nat64 { + ^^^^^ +Compilation Error + + table nat64 { + key = { + hdr.ipv6.src_addr: lpm; + hdr.ipv6.dst_addr: lpm; + } + actions = { + controller_debug; + nat64_static; + NoAction; + } + size = NAT64_TABLE_SIZE; + default_action = controller_debug; + } + +\end{verbatim} + +\begin{verbatim} +../p4src/static-mapping.p4(60): error: SwitchStatement: switch statements not allowed in actions + switch(hdr.icmp6.type) { + ^^^^^^ +\end{verbatim} + +No if in actions: + +\begin{verbatim} +../p4src/static-mapping.p4(57): error: MethodCallStatement: Conditional execution in actions is not supported on this target + hdr.icmp.setValid(); + ^^^^^^^^^^^^^^^^^^^ +../p4src/static-mapping.p4(70): error: MethodCallStatement: Conditional execution in actions is not supported on this target + hdr.icmp6.setInvalid(); + ^^^^^^^^^^^^^^^^^^^^^^ +../p4src/static-mapping.p4(73): error: MethodCallStatement: Conditional execution in actions is not supported on this target + hdr.icmp6_na_ns.setInvalid(); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +../p4src/static-mapping.p4(74): error: MethodCallStatement: Conditional execution in actions is not supported on this target + hdr.icmp6_option_link_layer_addr.setInvalid(); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Compilation Error +p4@ubuntu:~/master-thesis/p4app$ + + if(hdr.ipv6.next_header == PROTO_ICMP6) { + nat64_icmp6(); + } +\end{verbatim} + +\begin{verbatim} +p4c --target bmv2 --arch v1model --std p4-16 "../p4src/checksum_diff.p4" -o "/home/p4/master-thesis/p4src" +In file: /home/p4/p4-tools/p4c/backends/bmv2/common/expression.cpp:168 +Compiler Bug: ../p4src/actions_delta_checksum.p4(60): ones_complement_sum(hdr.udp.checksum, tmp);: unhandled case + tmp = ones_complement_sum(hdr.udp.checksum, meta.v6sum); + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Compilation Error``` +Using the following code: +```/* copied from +https://p4.org/p4-spec/docs/PSA-v1.1.0.html#appendix-internetchecksum-implementation +*/ + +bit<16> ones_complement_sum(in bit<16> x, in bit<16> y) { + bit<17> ret = (bit<17>) x + (bit<17>) y; + if (ret[16:16] == 1) { + ret = ret + 1; + } + return ret[15:0]; +}``` +And p4c version: +```p4@ubuntu:~/master-thesis/p4app$ p4c --version +p4c 0.5 (SHA: 5ae30ee)``` +\end{verbatim} + +% ---------------------------------------------------------------------- \section{Traces} Proof of stuff working, reference for each stage / feature diff --git a/doc/plan.org b/doc/plan.org index d462e00..5377b91 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -3348,9 +3348,12 @@ https://en.wikipedia.org/wiki/IPv4_header_checksum | 6.4 | table size = 64, [nsg]: | | 6.5 | udp in ipv6 integrated with ugly define [esprimo]: | | | | -** TODO Benchmark/comparison -*** TODO Setup / Benchmark Jool -*** TODO Setup / Benchmark tayga +** DONE Benchmark/comparison + CLOSED: [2019-08-13 Tue 10:36] +*** DONE Setup / Benchmark Jool + CLOSED: [2019-08-13 Tue 10:36] +*** DONE Setup / Benchmark tayga + CLOSED: [2019-08-13 Tue 10:36] * TODO Thesis documentation ** Introduction *** Related work @@ -3407,7 +3410,6 @@ user@T:~# iptables -t mangle -A PREROUTING \ ** DONE P4 based implementation CLOSED: [2019-07-21 Sun 13:55] *** General - - IPv6 subnet 2001:db8::/32 - IPv6 hosts are in 2001:db8:6::/64 - IPv6 default router (::/0) is 2001:db8:6::42/64 @@ -3767,23 +3769,28 @@ libnanomsg-dev libjudy-dev - Have 1..n session IPv4 addresses - Handle outgoing IPv6: create new session - Handle in -***** TODO Case IPv6 initiator +***** DONE Case IPv6 initiator + CLOSED: [2019-08-13 Tue 10:59] - Mapping whole IPv4 Internet in /96 prefix - Session information for mapping reply - Timeout handling in controller -****** TODO IPv6 udp -> IPv4 +****** DONE IPv6 udp -> IPv4 + CLOSED: [2019-08-13 Tue 10:59] - Got 4-5 tuple ([proto], src ip, src port, dst ip, dst port) - Does not / never signal end - Needs timeout for cleaning up -****** TODO IPv6 tcp -> IPv4 +****** DONE IPv6 tcp -> IPv4 + CLOSED: [2019-08-13 Tue 10:59] - Similar to udp - react on FIN/RST (?) -- could be an addition -****** TODO IPv6 icmp6 -> IPv4 +****** DONE IPv6 icmp6 -> IPv4 + CLOSED: [2019-08-13 Tue 10:59] - usual protocol specific changes - Session?? - src ip, dst ip, code ? -***** TODO Case IPv4 initiator +***** DONE Case IPv4 initiator + CLOSED: [2019-08-13 Tue 10:59] - Needs upper level protol **** DONE General network matching CLOSED: [2019-07-21 Sun 13:56] @@ -3804,14 +3811,14 @@ libnanomsg-dev libjudy-dev ***** DONE Feed back to controller: implemented in switch ***** DONE Create ipv6 session in the controller -***** Create ipv4 session in the controller +***** DONE Create ipv4 session in the controller + CLOSED: [2019-08-13 Tue 11:00] ***** DONE Ensure translation code works CLOSED: [2019-07-21 Sun 13:55] >>> ipaddress.IPv6Network("2001:db8:100::/96")[int(ipaddress.IPv4Address("10.0.0.1"))] IPv6Address('2001:db8:100::a00:1') ****** DONE Status: syn sent, neighbor solicitation working, nothing received on other side - INFO:main:unhandled reassambled=>>> from table TABLE_NAT64_SESSION INFO:main:unhandled reassambled=>> from table TABLE_V6_NETWORKS INFO:main:unhandled reassambled=>> from table TABLE_V6_NETWORKS @@ -4047,7 +4054,8 @@ be plugged in easily. There could be a hypothetical "P4OS" that manages code fragments. This might include, but not limited to downloading (signed?) source code, managing dependencies similar to Linux package management, handling updates, etc. -*** TODO Code sharing (controller, switch) +*** DONE Code sharing (controller, switch) + CLOSED: [2019-08-13 Tue 11:07] Many constants double defined. Easy to make errors. *** Checksum handling: v6->v4 adding, not checking @@ -4056,13 +4064,16 @@ we add a checksum without ever checking v4 checksum before. ** Implementation description and limitations *** Implementation description [move todos here] -**** TODO Support (non-) fragmentation +**** DONE Support (non-) fragmentation + CLOSED: [2019-08-13 Tue 11:07] - if DF bit is not set in ipv4 -**** TODO Supporting [different] MTUs +**** DONE Supporting [different] MTUs + CLOSED: [2019-08-13 Tue 11:07] - sizes of headers are different - packet might not fit into same mtu anymore - send back "ICMP Packet Too Big messages to the sender." RFC7915 -**** TODO pmtud support +**** DONE pmtud support + CLOSED: [2019-08-13 Tue 11:07] - mss change #+BEGIN_QUOTE translator MUST send a @@ -4109,20 +4120,19 @@ Fragmented ICMP/ICMPv6 packets will not be translated by IP/ICMP translators. Only the destination network is matched for deciding on NAT64, as priority based double LPM is not supported. This limits a prefix to be used only in one network. -**** TODO No resolution of hardware addresses +**** DONE No resolution of hardware addresses + CLOSED: [2019-08-13 Tue 11:09] - hardcoded ip --> mac addresses Correct version: Resolve mac address in controller, buffer packet, replay packet / handle packet. Only has to be set, when packets originate from the switch/controller. - -**** TODO No support of IPv4 options +**** DONE No support of IPv4 options + CLOSED: [2019-08-13 Tue 11:09] - header is assumed to be always 20 octets - - -**** TODO Security issue: not checking checksums before +**** DONE Security issue: not checking checksums before + CLOSED: [2019-08-13 Tue 11:09] - Could be implemented - ** DONE Log various CLOSED: [2019-08-07 Wed 14:00] *** 2019-06-06 @@ -4469,7 +4479,7 @@ RUN loading image file. int.bit attempting to launch hw_server -****** Xilinx hw_server v2018.2 + ****** Xilinx hw_server v2018.2 **** Build date : Jun 14 2018-20:18:37 ** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved. @@ -5910,8 +5920,10 @@ new dic: OrderedDict() nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4$ #+END_CENTER -**** TODO try4: find out why empty "new dic: OrderedDict()" is a problem - unclear -**** TODO try5: use older version of gen_testdata +**** DONE try4: find out why empty "new dic: OrderedDict()" is a problem - unclear + CLOSED: [2019-08-13 Tue 11:45] +**** DONE try5: use older version of gen_testdata + CLOSED: [2019-08-13 Tue 11:45] Previous output and new output of tuple expect: #+BEGIN_CENTER @@ -5922,7 +5934,8 @@ nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/project 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000001040000 #+END_CENTER -**** TODO try6: debug the compile process further / find out gen_testdata use +**** DONE try6: debug the compile process further / find out gen_testdata use + CLOSED: [2019-08-13 Tue 11:45] #+BEGIN_CENTER nico@nsg-System:~/master-thesis/netpfga/minip4$ grep gen_testdata -r . ./testdata/Makefile: ./gen_testdata.py @@ -5993,7 +6006,8 @@ nico@nsg-System:~/master-thesis/netpfga/minip4/testdata$ date Son Jul 21 16:48:08 CEST 2019 #+END_CENTER -**** TODO try9: generated files missing +**** DONE try9: generated files missing + CLOSED: [2019-08-13 Tue 11:47] #+BEGIN_CENTER INFO: [IP_Flow 19-234] Refreshing IP repositories @@ -6081,9 +6095,6 @@ INFO: [Common 17-206] Exiting Vivado at Sun Jul 21 16:46:22 2019... Makefile:120: recipe for target 'sim' failed make: *** [sim] Error 1 make: Leaving directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test' - - - #+END_CENTER #+BEGIN_CENTER @@ -6954,7 +6965,6 @@ ERROR: not enough fields provided to complete _hexify() realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434178 => 1 - #+BEGIN_CENTER nico@nsg-System:~$ grep -r "not enough fields provided to complete _hexify()" -r ~/ /home/nico/P4-NetFPGA-live-clean/contrib-projects/sume-sdnet-switch/bin/p4_px_tables.py: print >> sys.stderr, "ERROR: not enough fields provided to complete _hexify()" @@ -7777,8 +7787,6 @@ nico@nsg-System:~$ *** DONE 2019-07-28: compile time around 2.5h CLOSED: [2019-07-28 Sun 19:37] - - *** DONE 2019-07-28: direct loading works / no 2nd reboot necessary CLOSED: [2019-07-28 Sun 19:50] #+BEGIN_CENTER @@ -8017,7 +8025,6 @@ listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes 00:13:57.130843 ARP, Request who-has 10.0.0.201 tell 10.0.0.200, length 46 00:13:58.158866 ARP, Request who-has 10.0.0.201 tell 10.0.0.200, length 46 00:13:59.182948 ARP, Request who-has 10.0.0.201 tell 10.0.0.200, length 46 - #+END_CENTER *** DONE 2019-07-29: after recompiling with default = 16, icmp4 seen on eth1 of nsg @@ -8034,7 +8041,6 @@ eth1@nsg: 09:18:46.452656 IP 10.0.0.200 > 10.0.0.1: ICMP echo request, id 4648, seq 1, length 64 09:18:47.469570 IP 10.0.0.200 > 10.0.0.1: ICMP echo request, id 4648, seq 2, length 64 09:18:48.493577 IP 10.0.0.200 > 10.0.0.1: ICMP echo request, id 4648, seq 3, length 64 - #+END_CENTER reflashing switch @@ -8078,7 +8084,6 @@ listening on enp2s0f1, link-type EN10MB (Ethernet), capture size 262144 bytes 16:20:37.660293 ARP, Request who-has 10.0.0.250 tell 10.0.0.200, length 28 16:20:38.662166 ARP, Request who-has 10.0.0.250 tell 10.0.0.200, length 28 16:20:39.686165 ARP, Request who-has 10.0.0.250 tell 10.0.0.200, length 28 - #+END_CENTER **** DONE 2019-07-29: found bug in PARSER!!!! CLOSED: [2019-07-29 Mon 18:34] @@ -8196,7 +8201,6 @@ PING 10.0.0.66 (10.0.0.66) 56(84) bytes of data. nico@ESPRIMO-P956:~$ - #+END_CENTER Outgoing interface @@ -8286,7 +8290,6 @@ listening on enp2s0f0, link-type EN10MB (Ethernet), capture size 262144 bytes CLOSED: [2019-08-02 Fri 10:19] #+BEGIN_CENTER table_cam_add_entry realmain_nat64_0 realmain.nat64_static 42540766411362381960998550477352206378 => 42540766411362381960998550477184434176 167772160 42540766411362381960998550477184434176 0 - #+END_CENTER *** DONE 2019-08-02: ipv4 checksum after nat64 is empty! CLOSED: [2019-08-07 Wed 14:01] @@ -8440,7 +8443,7 @@ table_cam_add_entry realmain_nat64_0 realmain.nat64_static 42540766411362381960 >> #+END_CENTER -**** DONE setting up translation: v4->v6: ok +**** DONE setting up translation: v4->v6: ok CLOSED: [2019-08-04 Sun 09:14] #+BEGIN_CENTER nico@ESPRIMO-P956:~/master-thesis/bin$ ./socat-listen-tcp-v6 @@ -9225,75 +9228,98 @@ nico@nsg-System:~/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/project ** graphviz: - https://graphviz.gitlab.io/_pages/doc/info/shapes.html#polygon - ** TODO References / Follow up -*** TODO Board -*** RFC 791 IPv4 https://tools.ietf.org/html/rfc791 -*** RFC 792 ICMP https://tools.ietf.org/html/rfc792 -*** RFC 826 ARP https://tools.ietf.org/html/rfc826 -*** RFC 1017 ICMP checksum https://tools.ietf.org/html/rfc1071 +*** Board +*** DONE RFC 791 IPv4 https://tools.ietf.org/html/rfc791 + CLOSED: [2019-08-13 Tue 12:31] +*** DONE RFC 792 ICMP https://tools.ietf.org/html/rfc792 + CLOSED: [2019-08-13 Tue 12:32] +*** DONE RFC 826 ARP https://tools.ietf.org/html/rfc826 + CLOSED: [2019-08-13 Tue 12:40] +*** DONE RFC 1017 ICMP checksum https://tools.ietf.org/html/rfc1071 + CLOSED: [2019-08-13 Tue 12:40] - Related to RFC 6052, Host identifier -*** RFC 2373 IP Version 6 Addressing Architecture +*** DONE RFC 2373 IP Version 6 Addressing Architecture + CLOSED: [2019-08-13 Tue 12:40] - Referenced by RFC2464 - Obsoleted by RFC3513 - -*** RFC 2460 IPv6 (Checksum https://tools.ietf.org/html/rfc2460#section-8.1) -*** RFC 2464 Transmission of IPv6 Packets over Ethernet Networks https://tools.ietf.org/html/rfc2464 +*** DONE RFC 2460 IPv6 (Checksum https://tools.ietf.org/html/rfc2460#section-8.1) + CLOSED: [2019-08-13 Tue 12:40] +*** DONE RFC 2464 Transmission of IPv6 Packets over Ethernet Networks https://tools.ietf.org/html/rfc2464 + CLOSED: [2019-08-13 Tue 12:40] - embedding of Mac addresses -*** RFC 3810 MLD2 https://tools.ietf.org/html/rfc3810 -*** RFC 4038 Application Aspects of IPv6 Transition https://tools.ietf.org/html/rfc4038 +*** DONE RFC 3810 MLD2 https://tools.ietf.org/html/rfc3810 + CLOSED: [2019-08-13 Tue 12:42] +*** DONE RFC 4038 Application Aspects of IPv6 Transition https://tools.ietf.org/html/rfc4038 + CLOSED: [2019-08-13 Tue 12:42] - Ref by RFC4291 / mapped ipv4 - - -*** RFC 4291 IP Version 6 Addressing Architecture https://tools.ietf.org/html/rfc4291 +*** DONE RFC 4291 IP Version 6 Addressing Architecture https://tools.ietf.org/html/rfc4291 + CLOSED: [2019-08-13 Tue 12:43] -! - -*** RFC 4443 ICMPv6 https://tools.ietf.org/html/rfc4443 -*** RFC 4861: https://tools.ietf.org/html/rfc4861 Neighbor discovery -*** RFC 6052: https://tools.ietf.org/html/rfc6052 IPv6 Addressing of IPv4/IPv6 Translators - first NAT64?? -*** RFC 6145 IP/ICMP Translation Algorithm +*** DONE RFC 4443 ICMPv6 https://tools.ietf.org/html/rfc4443 + CLOSED: [2019-08-13 Tue 12:43] +*** DONE RFC 4861: https://tools.ietf.org/html/rfc4861 Neighbor discovery + CLOSED: [2019-08-13 Tue 12:46] +*** DONE RFC 6052: https://tools.ietf.org/html/rfc6052 IPv6 Addressing of IPv4/IPv6 Translators - first NAT64?? + CLOSED: [2019-08-13 Tue 12:46] +*** DONE RFC 6145 IP/ICMP Translation Algorithm + CLOSED: [2019-08-13 Tue 12:46] - Obsoleted by 7915 *** DONE RFC 6146 Stateful nat http://tools.ietf.org/html/rfc6146 CLOSED: [2019-08-09 Fri 10:29] - Referenced from Jool -*** RFC 6147 DNS64 https://tools.ietf.org/html/rfc6147 -*** RFC 6586 for deployment experiences using Stateful NAT64. -*** RFC 7757 Explicit Address Mappings for Stateless IP/ICMP Translation - https://tools.ietf.org/html/rfc7757 -*** RFC 7915 IP/ICMP Translation Algorithm https://tools.ietf.org/html/rfc7915 +*** DONE RFC 6147 DNS64 https://tools.ietf.org/html/rfc6147 + CLOSED: [2019-08-13 Tue 12:46] +*** DONE RFC 6586 for deployment experiences using Stateful NAT64. + CLOSED: [2019-08-13 Tue 12:48] +*** DONE RFC 7757 Explicit Address Mappings for Stateless IP/ICMP Translation - https://tools.ietf.org/html/rfc7757 + CLOSED: [2019-08-13 Tue 12:48] +*** DONE RFC 7915 IP/ICMP Translation Algorithm https://tools.ietf.org/html/rfc7915 + CLOSED: [2019-08-13 Tue 12:49] - Requires RFC 6144 - MUST support one or more address mapping algorithms, which are defined in Section 6. - does not translate IPv6 extension headers except the Fragment Header. -*** EAMT/Jool: https://www.jool.mx/en/eamt.html -*** Solicited node multicast address https://en.wikipedia.org/wiki/Solicited-node_multicast_address +*** DONE EAMT/Jool: https://www.jool.mx/en/eamt.html + CLOSED: [2019-08-13 Tue 12:49] +*** DONE Solicited node multicast address https://en.wikipedia.org/wiki/Solicited-node_multicast_address + CLOSED: [2019-08-13 Tue 12:52] *** Scapy / IPv6: https://www.idsv6.de/Downloads/IPv6PacketCreationWithScapy.pdf *** V1 model: https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4 *** Cisco NAT64 https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipaddr_nat/configuration/xe-3s/nat-xe-3s-book/iadnat-stateful-nat64.pdf *** Wiki_mac: https://en.wikipedia.org/wiki/MAC_address ** TODO Writing Thesis -*** TODO Introduction: 1-2 pages -*** TODO Fill out background sectio -*** TODO Read through/add all points from plan.org -*** TODO Update doc from input Tobias (2019-08-05) +*** DONE Introduction: 1-2 pages + CLOSED: [2019-08-13 Tue 12:52] +*** DONE Fill out background section + CLOSED: [2019-08-13 Tue 12:53] +*** DONE Read through/add all points from plan.org + CLOSED: [2019-08-13 Tue 12:53] +*** DONE Update doc from input Tobias (2019-08-05) + CLOSED: [2019-08-13 Tue 12:53] *** TODO Add graphs from benchmark -*** TODO Ensure bibiography is containing everything -*** TODO Add the final declaration of conformity -*** TODO Don't order by time, but show a procss -*** TODO Send for review to Tobias/Thilo *** TODO Add plots! -*** TODO Create graph of with and without router +*** DONE Ensure bibliography is containing everything + CLOSED: [2019-08-13 Tue 12:54] +*** TODO Add the final declaration of conformity +*** DONE Don't order by time, but show a process + CLOSED: [2019-08-13 Tue 12:54] +*** TODO Send for review to Tobias/Thilo +*** DONE Create graph of with and without router + CLOSED: [2019-08-13 Tue 12:54] *** TODO Add comparison with other solutions (Results?) *** TODO Show / create graph of a bigger network -*** Rough time table / effort -| | | Status | -| Abstract | 1 day | okayish | -| Introduction | 1 day | okayish | -| Background | 1 day | okayish | -| Design | 1-2 days | 2019-08-12 | -| Results | 2-3 days | 2019-08-13 | -| Conclusion | 1 day | | -| Proof reading | 2-3 days | | -| SUM(max) | 12d | | +*** TODO Rough time table / effort +| | | Status | +| Abstract | 1 day | okayish | +| Introduction | 1 day | okayish | +| Background | 1 day | okayish | +| Design | 1-2 days | okayish | +| Results | 2-3 days | 2019-08-13 | +| Conclusion | 1 day | 2019-08-14 | +| Proof reading | 2-3 days | until 2019-08-17 | +| SUM(max) | 12d | | * DONE Initial administration ** DONE Clarify PDF / form with Denise Spicher: free form description ** DONE Create task description to be handed in mystudies diff --git a/doc/refs/refs.bib b/doc/refs/refs.bib index b62484b..4074aa2 100644 --- a/doc/refs/refs.bib +++ b/doc/refs/refs.bib @@ -109,3 +109,9 @@ author = {theojepsen}, title = {Get size of header}, howpublished = {\url{https://github.com/p4lang/p4-spec/issues/660}}} + +@Misc{wikipedia:_solic, + author = {Wikipedia}, + title = {Solicited-node multicast address}, + howpublished = {\url{https://en.wikipedia.org/wiki/Solicited-node_multicast_address}}, + note = {Requested on 2019-08-13}}