Fix the verbatim issue
This commit is contained in:
parent
38eaf8c2ee
commit
a5858febf0
5 changed files with 236 additions and 150 deletions
|
@ -21,7 +21,7 @@ parser will read and parse in the ingress pipeline one protocol
|
|||
\caption{P4 protocol independence~\cite{vanbever:_progr_networ_data_planes}}
|
||||
\label{fig:p4fromnsg}
|
||||
\end{figure}
|
||||
The \textit{target independence} is the second strong feature
|
||||
The \textit{target independence} is the second major feature
|
||||
of P4: it allows code to be compiled to different targets. While in
|
||||
theory the P4 code should be completely target independent, in reality,
|
||||
there are some modifications needed on a per-target basis and each
|
||||
|
@ -47,8 +47,9 @@ the higher level protocol identifier.\footnote{
|
|||
This is important because
|
||||
Ethernet can only reference one protocol, which makes IPv4 and IPv6
|
||||
mutually exclusive.
|
||||
The figures \ref{fig:ipv4header} and \ref{fig:ipv6header} show the
|
||||
packet headers of IPv4 and IPv6. The most notable differences between
|
||||
In the figures \ref{fig:ipv4header} and \ref{fig:ipv6header} we
|
||||
show the packet headers of IPv4 and IPv6 for showing the in-protocol
|
||||
differences. The most notable differences between
|
||||
the two protocols for this thesis are:
|
||||
\begin{itemize}
|
||||
\item Different address lengths
|
||||
|
@ -67,11 +68,12 @@ addressing for protocols that have no or limited addressing support
|
|||
(like TCP or UDP), protocols like ARP~\cite{rfc826} and
|
||||
NDP~\cite{rfc4861} provide support for resolving IPv6 and IPv4
|
||||
addresses to hardware (MAC) addresses. While both ARP and NDP are only
|
||||
used prior to establishing a connection on and their results are
|
||||
cached, their availability is crucial for operating a switch.
|
||||
used prior to establishing a connection and their results are
|
||||
cached, their availability is crucial for operating a switch, because
|
||||
without ARP or NDP no connection will every be established.
|
||||
Figure \ref{fig:arpndp} illustrates a typical address resolution process.
|
||||
\begin{figure}[h]
|
||||
\includegraphics[scale=0.3]{arp-ndp}
|
||||
\includegraphics[scale=0.4]{arp-ndp}
|
||||
\centering
|
||||
\caption{ARP and NDP}
|
||||
\label{fig:arpndp}
|
||||
|
@ -90,8 +92,9 @@ way to communicate to the target IPv4 address (``The chicken and the
|
|||
egg problem'').
|
||||
NDP on the other hand already works within IPv6, as every IPv6 host is
|
||||
required to have a self-assigned link local IPv6 address from the
|
||||
range \texttt{fe80::/10} (compare RFC4291~\cite{rfc4291}). NDP also
|
||||
does not require broadcast communication, because hosts automatically
|
||||
IPv6 network \texttt{fe80::/10} (compare
|
||||
RFC4291~\cite{rfc4291}). While ARP uses broadcasting for address
|
||||
resolution, NDP uses multicasting. IPv6 hosts automatically
|
||||
join multicast groups that embed parts of their
|
||||
IPv6 addresses~\cite{rfc2710},~\cite{wikipedia:_solic}. This way the
|
||||
collision domain is significantly reduced in IPv6, compared to IPv4.
|
||||
|
@ -101,13 +104,13 @@ section \ref{results:netpfga:features}), the requirement to generate checksums
|
|||
over payload poses difficult problems for some hardware targets. Even
|
||||
more difficult is the use of options within ICMP6.
|
||||
\begin{figure}[h]
|
||||
\includegraphics[scale=0.3]{icmp6ndp}
|
||||
\includegraphics[scale=0.4]{icmp6ndp}
|
||||
\centering
|
||||
\caption{ICMP6 option fields}
|
||||
\label{fig:icmp6ndp}
|
||||
\end{figure}
|
||||
The problem arises from the layout of the options, as seen in the
|
||||
following quote and in figure \ref{fig:icmp6ndp}:
|
||||
The problem arises from the layout of the options, as seen
|
||||
in figure \ref{fig:icmp6ndp} and the following quote:
|
||||
\begin{quote}
|
||||
``Neighbor Discovery messages include zero or more options, some of
|
||||
which may appear multiple times in the same message. Options should
|
||||
|
@ -116,18 +119,17 @@ be padded when necessary to ensure that they end on their natural
|
|||
\end{quote}
|
||||
|
||||
ICMP6 and ICMP are primarily used to signal errors in
|
||||
communication. Specifically signalling that a packet is too big to
|
||||
communication. Specifically, signalling that a packet is too big to
|
||||
pass a certain link and needs fragmentation is a common functionality
|
||||
of both protocols. For a host (or switch) to be able to emit ICMP6 and
|
||||
of both protocols. For a host (or a switch) to be able to emit ICMP6 and
|
||||
ICMP messages, the host requires a valid IPv6 / IPv4 address.
|
||||
Without ICMP6 / ICMP support path MTU
|
||||
discovery~\cite{rfc1191},~\cite{rfc8201}
|
||||
does not work and the sender needs to determine
|
||||
different ways of finding out the maximum MTU on the path.
|
||||
% ok -- need to separate backgroun and results
|
||||
% ----------------------------------------------------------------------
|
||||
\section{\label{background:transition}IPv6 Translation Mechanisms}
|
||||
While in this thesis the focus was in NAT64 as a translation mechanism,
|
||||
While in this thesis we focus on NAT64 as a translation mechanism,
|
||||
there are a variety of different approaches, some of which we would
|
||||
like to portray here.
|
||||
% ----------------------------------------------------------------------
|
||||
|
@ -151,61 +153,64 @@ translation direction, a translator will need to re-arrange fields to
|
|||
a different position, remove fields and add fields.
|
||||
\begin{figure}[h]
|
||||
\begin{verbatim}
|
||||
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|Version| Traffic Class | Flow Label |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Payload Length | Next Header | Hop Limit |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ Source Address +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ Destination Address +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
0 1 2 3
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|Version| Traffic Class | Flow Label |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Payload Length | Next Header | Hop Limit |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ Source Address +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ Destination Address +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
\end{verbatim}
|
||||
\centering
|
||||
\caption{IPv6 Header~\cite{rfc2460}}
|
||||
\label{fig:ipv6header}
|
||||
\end{figure}
|
||||
This in turn causes the packet size for standard headers
|
||||
to differ by 160 Bit.\footnote{IPv6: 320 Bit, IPv4 160 Bit}
|
||||
% ----------------------------------------------------------------------
|
||||
\subsection{\label{background:transition:statefulnat64}Stateful NAT64}
|
||||
Stateful NAT64 as defined in RFC6146~\cite{rfc6146} defines how to
|
||||
create 1:n mappings between IPv6 and IPv4 hosts. The motivation for
|
||||
stateful NAT64 is similar to stateful NAT44~\cite{rfc3022}: it allows
|
||||
translating many IPv6 addresses to one IPv4 address. While the
|
||||
opposite translation is also technically possible, the differences in
|
||||
address space don't justify its use in general.
|
||||
|
||||
stateful NAT64 is similar to stateful NAT44~\cite{rfc3022}: while
|
||||
NAT44 allows translating many (private) IPv4 addresses to one
|
||||
(public) IPv4 address,
|
||||
NAT64 allows translating many IPv6 addresses to one IPv4 address.
|
||||
While the opposite stateful translation, mapping many IPv4 addresses
|
||||
to one IPv6 address, is also technically possible,
|
||||
the differences in address space size don't justify its use in general.
|
||||
\begin{figure}[h]
|
||||
\begin{verbatim}
|
||||
|
||||
0 1 2 3
|
||||
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|Version| IHL |Type of Service| Total Length |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Identification |Flags| Fragment Offset |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Time to Live | Protocol | Header Checksum |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Source Address |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Destination Address |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Options | Padding |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
|Version| IHL |Type of Service| Total Length |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Identification |Flags| Fragment Offset |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Time to Live | Protocol | Header Checksum |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Source Address |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Destination Address |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Options | Padding |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
\end{verbatim}
|
||||
\caption{IPv4 Header~\cite{rfc791}}
|
||||
\label{fig:ipv4header}
|
||||
|
@ -238,17 +243,20 @@ Further translation can be achieved by using information in higher
|
|||
level protocols like HTTP~\cite{rfc2616} or TLS~\cite{rfc4366}.
|
||||
Application proxies like
|
||||
nginx~\cite{nginx:_nginx_high_perfor_load_balan}
|
||||
use layer 7 protocol
|
||||
information to proxy towards backends. Within this proxying method,
|
||||
the underlying IP protocol can be changed from IPv6 to IPv4 and vice
|
||||
versa. However, the requested hostname that is usually used for
|
||||
selecting the backend is encrypted in TLS 1.3~\cite{rfc8446}, which
|
||||
poses a challenge for implementations.
|
||||
use layer 7 protocol information, like the requested hostname,
|
||||
to proxy towards backends.
|
||||
|
||||
Within this proxying method, the underlying IP protocol can be changed
|
||||
from IPv6 to IPv4 and vice versa. However, if using HTTPS with TLS
|
||||
1.3~\cite{rfc8446}, the requested hostname that is usually used for
|
||||
selecting the backend can be encrypted, which poses a challenge for
|
||||
implementations.
|
||||
|
||||
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.
|
||||
opportunities of protocol dependent translations to run on devices
|
||||
with less sophisticated devices.
|
||||
% ----------------------------------------------------------------------
|
||||
\subsection{\label{background:transition:prefixnat}Mapping IPv4
|
||||
Addresses in IPv6}
|
||||
|
@ -256,8 +264,9 @@ As described in section \ref{background:ip}, one of the major
|
|||
differences between IPv6 and IPv4 is the address length. As the whole
|
||||
IPv4 Internet can be represented in only 32 bits, it is a common
|
||||
practice to assign an IPv6 prefix for IPv6 hosts that represents a
|
||||
mapping to the IPv4 Internet. In RFC6052~\cite{rfc6502} the well
|
||||
known prefix \textit{64:ff9b::/96} is defined. One possibility to map
|
||||
mapping to the whole IPv4 Internet. In RFC6052~\cite{rfc6502} the well
|
||||
known prefix \textit{64:ff9b::/96} is defined that can be used for
|
||||
this purpose. One possibility to map
|
||||
an IPv4 address into the prefix is by adding its integer value to the
|
||||
prefix, treating it as an offset. In figure \ref{fig:ipv4embed}
|
||||
we show example python code of how this can be done.
|
||||
|
@ -286,21 +295,21 @@ other prefix lengths are defined in RFC6052 (see figure
|
|||
\ref{fig:prefixlen}) that allow flexible embedding of the IPv4 address.
|
||||
\begin{figure}[h]
|
||||
\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) |
|
||||
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
||||
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
||||
|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) |
|
||||
+--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|
||||
\end{verbatim}
|
||||
\centering
|
||||
\caption{IPv4 embedding depending on the prefix length}
|
||||
|
@ -335,14 +344,16 @@ A record and gets an answer that the name
|
|||
\textit{ipv4onlyhost.example.com} resolves to the IPv4 address
|
||||
\textit{192.0.2.0}. The DNS64 server then embeds the IPv4 address in
|
||||
the configured IPv6 prefix (\textit{64:ff9b::/96} in this case) and
|
||||
returns a fake AAAA record to the IPv6 only host. The IPv6 only host
|
||||
returns a fake AAAA record to the IPv6 only host (pointing to
|
||||
\textit{64:ff9b::c000:200} in this case). The IPv6 only host
|
||||
then will use the address to connect to. The NAT64 translator recognises
|
||||
either that the address is part of a configured prefix or that it has
|
||||
a dedicated table entry for mapping this IPv6 address to an IPv4
|
||||
address and translates it accordingly.
|
||||
% ok
|
||||
% ----------------------------------------------------------------------
|
||||
\section{\label{background:checksums}Protocol Checksums}
|
||||
One challenge for translating IPv6-IPv4 are checksums of higher level
|
||||
One challenge for translating IPv6 to IPv4 are checksums of higher level
|
||||
protocols like TCP and UDP that incorporate information from the lower
|
||||
level protocols. The pseudo header for upper layer protocols for
|
||||
IPv6 is defined in RFC2460~\cite{rfc2460} and shown in figure
|
||||
|
@ -350,27 +361,27 @@ IPv6 is defined in RFC2460~\cite{rfc2460} and shown in figure
|
|||
defined in RFC768 and RFC793 and are shown in \ref{fig:ipv4pseudoheader}.
|
||||
\begin{figure}[h]
|
||||
\begin{verbatim}
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ Source Address +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ Destination Address +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Upper-Layer Packet Length |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| zero | Next Header |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ Source Address +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+ Destination Address +
|
||||
| |
|
||||
+ +
|
||||
| |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| Upper-Layer Packet Length |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
| zero | Next Header |
|
||||
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
||||
\end{verbatim}
|
||||
\centering
|
||||
\caption{IPv6 Pseudo Header}
|
||||
|
@ -383,14 +394,14 @@ important because some targets (like the NetFPGA) do not allow to
|
|||
access the payload (see section \ref{design:netpfga}).
|
||||
\begin{figure}[h]
|
||||
\begin{verbatim}
|
||||
0 7 8 15 16 23 24 31
|
||||
+--------+--------+--------+--------+
|
||||
| source address |
|
||||
+--------+--------+--------+--------+
|
||||
| destination address |
|
||||
+--------+--------+--------+--------+
|
||||
| zero |protocol| TCP/UDP length |
|
||||
+--------+--------+--------+--------+
|
||||
0 7 8 15 16 23 24 31
|
||||
+--------+--------+--------+--------+
|
||||
| source address |
|
||||
+--------+--------+--------+--------+
|
||||
| destination address |
|
||||
+--------+--------+--------+--------+
|
||||
| zero |protocol| TCP/UDP length |
|
||||
+--------+--------+--------+--------+
|
||||
\end{verbatim}
|
||||
\centering
|
||||
\caption{IPv4 Pseudo Header}
|
||||
|
|
|
@ -68,7 +68,7 @@ with legacy IPv4 devices still needs to be provided.
|
|||
\end{figure}
|
||||
IPv6 hosts and IPv4 hosts cannot directly connect to each other,
|
||||
because the protocols are incompatible to each other.
|
||||
To allow communication between different protocol hosts,
|
||||
To allow communication between different protocol host!s,
|
||||
several transition mechanisms have been
|
||||
proposed~\cite{wikipedia:_ipv6},~\cite{rfc4213}.
|
||||
\begin{figure}[h]
|
||||
|
|
BIN
doc/Thesis.pdf
BIN
doc/Thesis.pdf
Binary file not shown.
|
@ -8,7 +8,7 @@
|
|||
|
||||
|
||||
\makeatletter
|
||||
\newcommand{\verbatimfont}[1]{\renewcommand{\verbatim@font}{\ttfamily#1}}
|
||||
%\newcommand{\verbatimfont}[1]{\renewcommand{\verbatim@font}{\ttfamily#1}}
|
||||
\makeatother
|
||||
|
||||
\input{preamble}
|
||||
|
@ -17,7 +17,15 @@
|
|||
|
||||
%** begin the document environment
|
||||
\begin{document}
|
||||
\verbatimfont{\tiny}%
|
||||
%\verbatimfont{\tiny}%
|
||||
%\renewcommand{\verbatim@font}{\normalfont\ttfamily\hyphenchar\font\m@ne\@noligs}
|
||||
|
||||
% \tiny\ttfamily}
|
||||
|
||||
\begin{tiny}
|
||||
|
||||
\end{tiny}
|
||||
|
||||
|
||||
\frenchspacing
|
||||
\sloppy
|
||||
|
|
133
doc/appendix.tex
133
doc/appendix.tex
|
@ -49,11 +49,12 @@ After that the variable \texttt{P4\_PROJECT\_NAME} in
|
|||
read \texttt{export P4\_PROJECT\_NAME=minip4}
|
||||
instead of \texttt{export P4\_PROJECT\_NAME=switch\_calc}.
|
||||
Sample code for installation:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
mkdir -p ~/projects
|
||||
git clone git@github.com:NetFPGA/P4-NetFPGA-live.git P4-NetFPGA
|
||||
sed -i 's/\(P4_PROJECT_NAME=\).*/\1minip4/' ~/projects/P4-NetFPGA/tools/settings.sh
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Version \textbf{v1.3.1-46-g97d3aaa} of the P4-NetPFGA repository was
|
||||
used for creating the bitfiles of this project.
|
||||
\begin{verbatim}
|
||||
|
@ -87,7 +88,7 @@ First we get the integer values of the IPv4 addresses in python:
|
|||
>>>
|
||||
\end{verbatim}
|
||||
After that we set the table table entries for the NetFPGA.
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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
|
||||
|
@ -120,16 +121,18 @@ READ 0x44020244 = 0x0001
|
|||
success
|
||||
>>
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
On the host we setup the ARP entries:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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}
|
||||
\end{tiny}
|
||||
And then we generate test packets and expect 4 packets to show up on
|
||||
enp2s0f0.
|
||||
The following \texttt{tcpdump} output shows the expected packets
|
||||
arriving on enp2s0f0:
|
||||
\begin{verbatim}
|
||||
\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
|
||||
|
@ -138,6 +141,7 @@ listening on enp2s0f0, link-type EN10MB (Ethernet), capture size 262144 bytes
|
|||
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}
|
||||
% ok
|
||||
% ----------------------------------------------------------------------
|
||||
\subsection{Test 2: IPv6 egress}
|
||||
|
@ -153,6 +157,7 @@ the Integer values of the IPv6 addresses:
|
|||
42540766411362381960998550477184434242L
|
||||
\end{verbatim}
|
||||
After that we set the table entries:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
>> table_cam_add_entry realmain_v6_networks_0 realmain.set_egress_port 42540766411362381960998550477184434182 => 64 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)]
|
||||
|
@ -192,13 +197,15 @@ READ 0x44020344 = 0x0001
|
|||
success
|
||||
>>
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
On the host we set the IPv6 neighbor entries:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
nico@ESPRIMO-P956:~$ sudo ip -6 neigh add 2001:db8:42::6 lladdr f8:f2:1e:09:62:d0 dev enp2s0f1
|
||||
nico@ESPRIMO-P956:~$ sudo ip -6 neigh add 2001:db8:42::4 lladdr f8:f2:1e:09:62:d0 dev enp2s0f1
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
And generate the test packets:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
nico@ESPRIMO-P956:~$ ping6 -c2 2001:db8:42::6
|
||||
PING 2001:db8:42::6(2001:db8:42::6) 56 data bytes
|
||||
|
||||
|
@ -211,6 +218,7 @@ listening on enp2s0f1, link-type EN10MB (Ethernet), capture size 262144 bytes
|
|||
11:30:18.310178 IP6 2001:db8:42::42 > 2001:db8:42::6: ICMP6, echo request, seq 2, length 64
|
||||
11:30:18.310258 IP6 2001:db8:42::42 > 2001:db8:42::6: ICMP6, echo request, seq 2, length 64
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
The packets are successfully seen by tcpdump.
|
||||
% ----------------------------------------------------------------------
|
||||
\section{\label{appendix:bmv2}P4/BMV2 environment and tests}
|
||||
|
@ -250,7 +258,7 @@ Sometimes flashing bitfiles to the NetFPGA will fail. A random amount
|
|||
of reboots (1 to 3) and a random amount of reflashing will fix this
|
||||
problem.
|
||||
Below can be found the log output from the flashing process.
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
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
|
||||
|
@ -296,6 +304,7 @@ nf3: ERROR while getting interface flags: No such device
|
|||
+ bash config_writes.sh
|
||||
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
% ok
|
||||
% ----------------------------------------------------------------------
|
||||
\section{\label{appendix:netpfgalogs:flashsuccess}NetFPGA Flash Success}
|
||||
|
@ -305,7 +314,7 @@ its succeeding lines are missing, as seen below.
|
|||
|
||||
After that in all cases a reboot is required; the PCI rescan in none
|
||||
of our test cases re enabled the nf devices.
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
nico@nsg-System:~$ cd $NF_DESIGN_DIR/bitfiles/
|
||||
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"
|
||||
|
@ -349,12 +358,13 @@ 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{verbatim}
|
||||
\end{tiny}
|
||||
% ok
|
||||
% ----------------------------------------------------------------------
|
||||
\section{\label{appendix:netfpgalogs:kernelmodule}NetFPGA Kernel module}
|
||||
After a successful flash, loading the kernel module will enable nf
|
||||
devices to appear in the operating system.
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
nico@nsg-System:~$ ip l
|
||||
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
|
||||
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
|
||||
|
@ -420,13 +430,14 @@ nico@nsg-System:~$ ip l
|
|||
nico@nsg-System:~$
|
||||
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
% ----------------------------------------------------------------------
|
||||
\section{\label{appendix:netfpgalogs:compilelogs}NetFPGA compile logs}
|
||||
% ----------------------------------------------------------------------
|
||||
This section shows a compilation of of NetFPGA compile output and errors.
|
||||
|
||||
Unfound tbl files that are not correctly generated fail the compilation:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
# Fix introduced for SDNet 2017.4
|
||||
sed -i 's/xsim\.dir\/xsc\/dpi\.so/dpi\.so/g' nf_sume_sdnet_ip/SimpleSumeSwitch/vivado_sim.bash
|
||||
sed -i 's/xsim\.dir\/xsc\/dpi\.so/dpi\.so/g' nf_sume_sdnet_ip/SimpleSumeSwitch/vivado_sim_waveform.bash
|
||||
|
@ -438,13 +449,15 @@ cp: cannot stat 'src/*.tbl': No such file or directory
|
|||
make: *** [Makefile:23: cpp_test] Error 1
|
||||
[23:12] loch:minip4%
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Failure to generate an intermediate file:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
ERROR: [XSIM 43-3409] Failed to compile generated C file xsim.dir/work.SimpleSumeSwitch_tb#work.glbl/obj/xsim_3.c.
|
||||
ERROR: [XSIM 43-3915] Encountered a fatal error. Cannot continue. Exiting...
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Failure to compile because libncurses.so.5 is missing:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
/opt/Xilinx/Vivado/2018.2/data/../tps/llvm/3.1/lnx64.o/bin/clang -fPIC -c -std=gnu89 -nobuiltininc -nostdinc++ -w -Wl,--unres
|
||||
olved-symbols=ignore-in-object-files -fbracket-depth=1048576 -I/opt/Xilinx/Vivado/2018.2/data/../tps/llvm/3.1/lnx64.o/bin/../li
|
||||
b/clang/3.1/include -fPIC -m64 -I"/opt/Xilinx/Vivado/2018.2/data/xsim/include" "xsim.dir/work.SimpleSumeSwitch_tb#work.glbl/ob
|
||||
|
@ -455,9 +468,10 @@ ERROR: [XSIM 43-3409] Failed to compile generated C file xsim.dir/work.SimpleSum
|
|||
ERROR: [XSIM 43-3915] Encountered a fatal error. Cannot continue. Exiting...
|
||||
[20:00] rainbow:SimpleSumeSwitch%
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Failure to access txt files that were not correctly generated in a
|
||||
different compilation step:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
# Fix introduced for SDNet 2018.2
|
||||
sed -i 's/glbl_sim/glbl/g' nf_sume_sdnet_ip/SimpleSumeSwitch/vivado_sim_waveform.bash
|
||||
sed -i 's/SimpleSumeSwitch_tb_sim#work.glbl/SimpleSumeSwitch_tb/g' nf_sume_sdnet_ip/SimpleSumeSwitch/vivado_sim_waveform.bash
|
||||
|
@ -467,8 +481,9 @@ cp: cannot stat 'testdata/*.txt': No such file or directory
|
|||
make: *** [Makefile:17: all] Error 1
|
||||
[15:46] rainbow:minip4%
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Missing pcap files of non generated testdata causing compile abortion:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
make -C testdata/
|
||||
make[1]: Entering directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/testdata'
|
||||
./gen_testdata.py
|
||||
|
@ -490,7 +505,9 @@ make[1]: Leaving directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume
|
|||
make: *** [Makefile:32: frontend] Error 2
|
||||
[15:47] rainbow:minip4%
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Syntax errors due to incorrect generation of a python script:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
update_compile_order: Time (s): cpu = 00:00:17 ; elapsed = 00:00:09 . Memory (MB): peak = 1995.594 ; gain = 0.016 ; free physic
|
||||
al = 21975 ; free virtual = 33161
|
||||
|
@ -512,8 +529,9 @@ IndentationError: expected an indented block
|
|||
ume_switch_sim.tcl" line 177)
|
||||
INFO: [Common 17-206] Exiting Vivado at Sat May 18 15:21:21 2019...
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Missing axi files don't abort the compilation process: (shortened for formatting)
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
cp: cannot stat 'simple_sume_switch/test/nf_interface_0_log.axi': No such file or directory
|
||||
cp: cannot stat 'simple_sume_switch/test/nf_interface_0_stim.axi': No such file or directory
|
||||
cp: cannot stat 'simple_sume_switch/test/nf_interface_0_expected.axi': No such file or directory
|
||||
|
@ -536,8 +554,9 @@ cp: cannot stat 'simple_sume_switch/test/reg_stim.axi': No such file or director
|
|||
['/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/simple_sume_switch/test/sim_switch_default/run.py',
|
||||
'--sim', 'xsim']
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Add Wave error during compilation: (shortened for formatting)
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
# add_wave $nf_sume_sdnet_ip/out_src_port
|
||||
# add_wave $nf_sume_sdnet_ip/out_dst_port
|
||||
# set const_reg_ip /top_tb/top_sim/nf_datapath_0/nf_sume_sdnet_wrapper_1/inst/SimpleSumeSwitch_inst/const_reg_rw_0/
|
||||
|
@ -565,8 +584,9 @@ cp: cannot stat 'simple_sume_switch/test/dma_0_log.axi': No such file or directo
|
|||
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']
|
||||
[15:31] rainbow:P4-NetFPGA%
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Compilation error failing to run ``connect\_bd\_intf\_net.''
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
ERROR: [BD 41-171] The modes of the interface pins 'cfg_interrupt'(Slave) and 'pcie3_cfg_interrupt'(Slave) are incompatible. They cannot be connected.
|
||||
ERROR: [BD 5-3] Error: running connect_bd_intf_net.
|
||||
ERROR: [Common 17-39] 'connect_bd_intf_net' failed due to earlier errors.
|
||||
|
@ -585,8 +605,9 @@ ERROR: [Common 17-39] 'connect_bd_intf_net' failed due to earlier errors.
|
|||
"source ./tcl/control_sub.tcl"
|
||||
(file "tcl/simple_sume_switch.tcl" line 89)
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Compilation aborts due to missing IP:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
### set NF_10G_INTERFACE3_BASEADDR $M07_BASEADDR
|
||||
### set NF_10G_INTERFACE3_HIGHADDR $M07_HIGHADDR
|
||||
### set NF_10G_INTERFACE3_SIZEADDR $M07_SIZEADDR
|
||||
|
@ -600,8 +621,9 @@ hw/project/simple_sume_switch.srcs/sources_1/bd/control_sub/control_sub.bd>
|
|||
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}
|
||||
\end{tiny}
|
||||
Mismatch: a non-critical critical error that does not abort the compilation process
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
[SW] CAM_EnableDevice() - done
|
||||
[2420698] INFO: finished packet stimulus file
|
||||
[2735572] ERROR: tuple mismatch for packet 1
|
||||
|
@ -611,8 +633,9 @@ $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}
|
||||
\end{tiny}
|
||||
Missing interface when testing switch\_calc:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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
|
||||
|
@ -623,6 +646,7 @@ The HW testing tool for the switch_calc design
|
|||
type help to see all commands
|
||||
testing>
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Ioctl error when adding table errors on the first NetFPGA card:
|
||||
\begin{verbatim}
|
||||
>> table_cam_add_entry lookup_table send_to_port1 ff:ff:ff:ff:ff:ff =>
|
||||
|
@ -634,7 +658,7 @@ python: ioctl: Unknown error 512
|
|||
[20:27] rainbow:CLI%
|
||||
\end{verbatim}
|
||||
Exec format errors when loading the kernel module due to incompabilities:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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
|
||||
|
@ -656,8 +680,10 @@ depmod -a 5.0.0-16-generic
|
|||
modprobe: ERROR: could not insert 'sume_riffa': Exec format error
|
||||
[7:06] rainbow:netpfga%
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Java traceback when trying to install SDNET:
|
||||
(reason was a hidden window)
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Window must not be zero
|
||||
at java.desktop/sun.awt.X11.XAtom.checkWindow(Unknown Source)
|
||||
|
@ -719,8 +745,9 @@ Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Windo
|
|||
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
|
||||
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Failures when testing the first NetFPGA card
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
---------------------------------------------
|
||||
[ddr3B]: Running Auto Test
|
||||
---------------------------------------------
|
||||
|
@ -752,7 +779,9 @@ Traceback (most recent call last):
|
|||
raise child_exception
|
||||
OSError: [Errno 2] No such file or directory
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
More failures when testing the first NetFPGA card
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
---------------------------------------------
|
||||
[pcie]: Running Auto Test
|
||||
|
@ -777,6 +806,7 @@ Traceback (most recent call last):
|
|||
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}
|
||||
\end{tiny}
|
||||
Unexpected EOF during compilation:
|
||||
\begin{verbatim}
|
||||
ERROR: [VRFC 10-1491] unexpected EOF
|
||||
|
@ -791,6 +821,7 @@ INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_5_ErrorCheck
|
|||
INFO: [VRFC 10-311] analyzing module TopDeparser_t_EngineStage_6_ErrorCheck
|
||||
\end{verbatim}
|
||||
The function syntax is not supported by p4/netfpga:
|
||||
\begin{tiny}
|
||||
\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
|
||||
|
@ -805,9 +836,10 @@ Makefile:31: recipe for target 'frontend' failed
|
|||
make: *** [frontend] Error 2
|
||||
nico@nsg-System:~/master-thesis/netpfga$
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
The config\_writes.py is missing due to a previous, non critical
|
||||
compilation error:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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*
|
||||
|
@ -817,8 +849,9 @@ cp: cannot stat '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-swit
|
|||
Makefile:36: recipe for target 'all' failed
|
||||
make: *** [all] Error 1
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Failed to synthesizing module errors:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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]
|
||||
|
@ -841,8 +874,9 @@ 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}
|
||||
\end{tiny}
|
||||
Missing ``souce'' files abort CLI compilation errors:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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
|
||||
|
@ -857,7 +891,9 @@ 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}
|
||||
\end{tiny}
|
||||
Generated axi files not found at a different stage:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
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
|
||||
|
@ -877,14 +913,16 @@ NetFPGA environment:
|
|||
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
|
||||
=== 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}
|
||||
\end{tiny}
|
||||
Renaming variables as follows breaks the compile process
|
||||
\begin{verbatim}
|
||||
@Xilinx_MaxPacketRegion(1024)
|
||||
|
@ -906,6 +944,7 @@ Renaming variables as follows breaks the compile process
|
|||
}
|
||||
\end{verbatim}
|
||||
In NetPFGA the LPM table size must be != 64:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
minip4_solution.p4(38): [--Wwarn=uninitialized_out_param] warning: out parameter meta may be uninitialized when RealParser terminates
|
||||
out metadata meta,
|
||||
|
@ -932,8 +971,9 @@ Makefile:31: recipe for target 'frontend' failed
|
|||
make: *** [frontend] Error 2
|
||||
nico@nsg-System:~/master-thesis/netpfga/log$
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Cannot mix the key table types with P4/NetFPGA:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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
|
||||
|
@ -973,8 +1013,9 @@ make[1]: *** [all] Error 1
|
|||
default_action = controller_debug_table_id(TABLE_ARP);
|
||||
}
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Implicit error saying that LPM tables don't work in P4/NetFPGA:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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
|
||||
|
@ -984,8 +1025,9 @@ FATAL_ERROR: Vivado Simulator kernel has encounted an exception from DPI C funct
|
|||
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}
|
||||
\end{tiny}
|
||||
The table for exact matches must be at least 64 in P4/NetFPGA:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
minip4_solution.p4(35)
|
||||
parser RealParser(
|
||||
^^^^^^^^^^
|
||||
|
@ -996,8 +1038,9 @@ actions_nat64_generic.p4(173): error: could not not map table size size
|
|||
size = 63;
|
||||
^^^^
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Unsupported default parameters in P4/NetFPGA:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\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);
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -1007,8 +1050,9 @@ Compiler Bug: actions_egress.p4(89): unhandled expression realmain_controller_de
|
|||
default_action = controller_debug_table_id(TABLE_V4_NETWORKS);
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Causing compiler bug by using an if statement at a wrong place in P4/NetFPGA:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
minip4_solution.p4(39)
|
||||
parser RealParser(
|
||||
^^^^^^^^^^
|
||||
|
@ -1021,8 +1065,10 @@ 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}
|
||||
\end{tiny}
|
||||
Applying table ``twice'' in different branches is impossible in
|
||||
P4/NetFPGA causes a different compiler bug:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
make -C src/
|
||||
make[1]: Entering directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/src'
|
||||
|
@ -1039,20 +1085,26 @@ Compiler Bug: overwrite
|
|||
|
||||
Makefile:34: recipe for target 'all' failed
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Adding table entries requires setting parameters for all possible
|
||||
actions that are registered in a table:
|
||||
\begin{tiny}
|
||||
\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}
|
||||
\end{tiny}
|
||||
The table handling scripts do not handle conversion for long integers
|
||||
for P4/NetFPGA:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
>> table_cam_delete_entry realmain_v6_networks_0 42540766411362381960998550477184434179
|
||||
ERROR: failed to convert 42540766411362381960998550477184434179 of type <type 'long'> to an integer
|
||||
nico@nsg-System:~/master-thesis/netpfga/minip4/sw/CLI$
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
A P4/BMV2 compiler error:
|
||||
\begin{tiny}
|
||||
\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
|
||||
|
@ -1083,6 +1135,7 @@ bad json:
|
|||
}
|
||||
}
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
|
||||
Inability of P4/BMV2 to have multiple LPM keys in a table:
|
||||
\begin{verbatim}
|
||||
|
@ -1106,12 +1159,15 @@ Compilation Error
|
|||
}
|
||||
\end{verbatim}
|
||||
Switch statements are not allowed in P4/BMV:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
../p4src/static-mapping.p4(60): error: SwitchStatement: switch statements not allowed in actions
|
||||
switch(hdr.icmp6.type) {
|
||||
^^^^^^
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
And also no ifs in actions:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
../p4src/static-mapping.p4(57): error: MethodCallStatement: Conditional execution in actions is not supported on this target
|
||||
hdr.icmp.setValid();
|
||||
|
@ -1132,7 +1188,9 @@ p4@ubuntu:~/master-thesis/p4app$
|
|||
nat64_icmp6();
|
||||
}
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Compiler bug in P4/BMV2:
|
||||
\begin{tiny}
|
||||
\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
|
||||
|
@ -1157,6 +1215,7 @@ And p4c version:
|
|||
```p4@ubuntu:~/master-thesis/p4app$ p4c --version
|
||||
p4c 0.5 (SHA: 5ae30ee)```
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
|
||||
%----------------------------------------------------------------------
|
||||
\chapter{\label{benchmark}Benchmark Logs}
|
||||
|
@ -1273,7 +1332,7 @@ rtt min/avg/max/mdev = 0.097/0.200/0.304/0.104 ms
|
|||
[15:12] nsg-System:~#
|
||||
\end{verbatim}
|
||||
We also setup the IPv6 networking:
|
||||
\begin{verbatim}
|
||||
\begin{tiny}\begin{verbatim}
|
||||
nico@ESPRIMO-P956:~$ ip addr show dev enp2s0f1
|
||||
13: enp2s0f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
|
||||
link/ether f8:f2:1e:09:62:d1 brd ff:ff:ff:ff:ff:ff
|
||||
|
@ -1286,6 +1345,7 @@ nico@ESPRIMO-P956:~$ sudo ip route add 2001:db8:23::/96 via 2001:db8:42::77
|
|||
[15:12] nsg-System:~# ip addr add 2001:db8:42::77/64 dev eth2
|
||||
[15:15] nsg-System:~# ip link set eth2 up
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
And verify that IPv6 networking works:
|
||||
\begin{verbatim}
|
||||
nico@ESPRIMO-P956:~$ ping6 -c2 2001:db8:42::77
|
||||
|
@ -1307,6 +1367,7 @@ net.ipv6.conf.all.forwarding = 1
|
|||
net.ipv4.ip_forward = 1
|
||||
\end{verbatim}
|
||||
And we test NAT64 with tayga:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
nico@ESPRIMO-P956:~$ ping -c2 10.0.1.42
|
||||
PING 10.0.1.42 (10.0.1.42) 56(84) bytes of data.
|
||||
|
@ -1331,6 +1392,8 @@ listening on enp2s0f1, link-type EN10MB (Ethernet), capture size 262144 bytes
|
|||
0 packets dropped by kernel
|
||||
nico@ESPRIMO-P956:~$
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
|
||||
And test NAT64 from IPv6 to IPv4:
|
||||
\begin{verbatim}
|
||||
nico@ESPRIMO-P956:~$ ping6 -c2 2001:db8:23::a00:2a
|
||||
|
@ -1347,6 +1410,7 @@ nico@ESPRIMO-P956:~$
|
|||
\section{\label{benchmark:jool}Jool}
|
||||
We install Jool 4.0.1 from source from
|
||||
\url{https://www.jool.mx/en/download.html} as follows:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
nico@nsg-System:~$ wget https://github.com/NICMx/Jool/releases/download/v4.0.1/jool_4.0.1.tar.gz
|
||||
nico@nsg-System:~$ tar xvfz jool_4.0.1.tar.gz
|
||||
|
@ -1356,6 +1420,7 @@ nico@nsg-System:~/jool-4.0.1$ sudo apt install libnl-genl-3-dev
|
|||
nico@nsg-System:~/jool-4.0.1$ sudo apt install iptables-dev
|
||||
nico@nsg-System:~/jool-4.0.1$ sudo make install
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
We enable forwarding:
|
||||
\begin{verbatim}
|
||||
sysctl -w net.ipv4.conf.all.forwarding=1
|
||||
|
@ -1363,6 +1428,7 @@ sysctl -w net.ipv6.conf.all.forwarding=1
|
|||
\end{verbatim}
|
||||
We configure jool to map the network prefixes and setup iptables to
|
||||
redirect the traffic into the jool instance:
|
||||
\begin{tiny}
|
||||
\begin{verbatim}
|
||||
[16:53] nsg-System:~# modprobe jool_siit
|
||||
[16:54] nsg-System:~# jool_siit instance add "example" --iptables
|
||||
|
@ -1371,6 +1437,7 @@ redirect the traffic into the jool instance:
|
|||
[16:57] nsg-System:~# ip6tables -t mangle -A PREROUTING -s 2001:db8:42::/120 -d 2001:db8:23::/120 -j JOOL_SIIT --instance example
|
||||
[16:57] nsg-System:~# iptables -t mangle -A PREROUTING -s 10.0.0.0/24 -d 10.0.1.0/24 -j JOOL_SIIT --instance example
|
||||
\end{verbatim}
|
||||
\end{tiny}
|
||||
Afterwards we test NAT64:
|
||||
\begin{verbatim}
|
||||
nico@ESPRIMO-P956:~/master-thesis/iperf$ ping6 2001:db8:23::2a
|
||||
|
|
Loading…
Reference in a new issue