diff --git a/doc/Design.tex b/doc/Design.tex index a2f42f6..cb1d391 100644 --- a/doc/Design.tex +++ b/doc/Design.tex @@ -3,4 +3,4 @@ Description of the theory/software/hardware that you designed. %** Design.tex: How was the problem attacked, what was the design % the architecture -Maybe figures here? +Maybe figures here? controller, diff --git a/doc/Results.tex b/doc/Results.tex index 20a11f9..85f799f 100644 --- a/doc/Results.tex +++ b/doc/Results.tex @@ -9,4 +9,21 @@ The results from your evaluations. \item Solution in P4/NetFPGA \end{itemize} +\section{\label{Results:BMV2}BMV2} +ndp +arp + +test framework openvswitch + + + +\section{\label{Results:NetPFGA}NetFPGA} +\subsection{\label{Results:NetPFGA:challenges}Challenges} Many workarounds + +Table size 63, table size 64, + + +\section{\label{Results:P4}P4} + +Limits if in actions diff --git a/doc/appendix.tex b/doc/appendix.tex index 56afab9..d5865b1 100644 --- a/doc/appendix.tex +++ b/doc/appendix.tex @@ -1,15 +1,95 @@ -\chapter{\label{appendixA}Appendix A should have a title} +\chapter{\label{appendixA}Test descriptions} -\section{\label{chapterA:section1}Section 1} - +\section{\label{chapterA:section1}NetFPGA NAT64 Test cases} +todo: add graphic of nsg <-> esprimo cabling \begin{verbatim} -All is presented exactely the way you write it. -Page boundaries are not checked..................................................................................... +ip addr add 10.0.0.42/24 dev enp2s0f0 + +# Adding necessary ARP entries: for the virtual IPv4 address(es) +ip neigh add 10.0.0.6 lladdr f8:f2:1e:09:62:d1 dev enp2s0f0 +ip neigh add 10.0.0.42 lladdr f8:f2:1e:09:62:d1 dev enp2s0f0 \end{verbatim} +\subsection{Test 1: do IPv4 egress settings work} +Scenario: simple egress port setting + +Step 1: getting correct values for table entries from python: + +\begin{verbatim} +>>> int(ipaddress.IPv4Address(u"10.0.0.42")) +167772202 +>>> int(ipaddress.IPv4Address(u"10.0.0.4")) +167772164 +>>> + +\end{verbatim} + +Step 2: setting table netries + +\begin{verbatim} + +>> table_cam_add_entry realmain_v4_networks_0 realmain.set_egress_port 167772202 => 16 0 0 0 0 +fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)] +action_name = TopPipe.realmain.set_egress_port +field_vals = [1, '16', '0', '0', '0', '0'] +CAM_Init_ValidateContext() - done +WROTE 0x44020250 = 0xa00002a +WROTE 0x44020280 = 0x0000 +WROTE 0x44020284 = 0x0000 +WROTE 0x44020288 = 0x10000000 +WROTE 0x4402028c = 0x0001 +READ 0x44020244 = 0x0001 +WROTE 0x44020240 = 0x0001 +READ 0x44020244 = 0x0001 +READ 0x44020244 = 0x0001 +success +>> table_cam_add_entry realmain_v4_networks_0 realmain.set_egress_port 167772164 => 16 0 0 0 0 +fields = [(u'hit', 1), (u'action_run', 3), (u'out_port', 8), (u'out_port', 8), (u'mac_addr', 48), (u'task', 16), (u'table_id', 16)] +action_name = TopPipe.realmain.set_egress_port +field_vals = [1, '16', '0', '0', '0', '0'] +CAM_Init_ValidateContext() - done +WROTE 0x44020250 = 0xa000004 +WROTE 0x44020280 = 0x0000 +WROTE 0x44020284 = 0x0000 +WROTE 0x44020288 = 0x10000000 +WROTE 0x4402028c = 0x0001 +READ 0x44020244 = 0x0001 +WROTE 0x44020240 = 0x0001 +READ 0x44020244 = 0x0001 +READ 0x44020244 = 0x0001 +success +>> +\end{verbatim} + +Step 3: setting arp entries + +\begin{verbatim} +root@ESPRIMO-P956:~# ip neigh add 10.0.0.6 lladdr f8:f2:1e:09:62:d1 dev enp2s0f0 +root@ESPRIMO-P956:~# ip neigh add 10.0.0.4 lladdr f8:f2:1e:09:62:d1 dev enp2s0f0 + +\end{verbatim} +Step 3: generating test packets, expecting 4 packets to show up on +enp2s0f0: + +\begin{tiny} +\begin{verbatim} +nico@ESPRIMO-P956:~$ sudo tcpdump -ni enp2s0f0 +tcpdump: verbose output suppressed, use -v or -vv for full protocol decode +listening on enp2s0f0, link-type EN10MB (Ethernet), capture size 262144 bytes +10:49:28.200407 IP 10.0.0.42 > 10.0.0.4: ICMP echo request, id 4440, seq 1, length 64 +10:49:28.200445 IP 10.0.0.42 > 10.0.0.4: ICMP echo request, id 4440, seq 1, length 64 +10:49:29.222340 IP 10.0.0.42 > 10.0.0.4: ICMP echo request, id 4440, seq 2, length 64 +10:49:29.222418 IP 10.0.0.42 > 10.0.0.4: ICMP echo request, id 4440, seq 2, length 64 +\end{verbatim} +\end{tiny} + +Result: sucess + + + \chapter{\label{appendixB}Appendix B?}