\chapter{Problem Statement}

\section{Notation}
Table \ref{table:notations} shows the notations used in this work. Given the
switch under test $dut$, the number of tables for $dut$ is denoted by $N$.
The controller, the hosts, and the link capacities are denoted by $c$, $H$ and
$CAP$ respectively. The performance parameters consist of three categories: they
are the C2D parameters $CD$, the D2C parameters $DC$, and the OFD parameters
$D_{openflow}$. And the flow entries $F$ in $dut$ and traffic $TFC$ generated by
$H$ will affect each parameter.

\begin{center}
    \begin{table}[!h]
        \centering
        \begin{tabular}{| l | P{5cm} | P{8cm}|}
            \hline
            Category & Notation & Description \\ \hline
            \multirow{5}{*}{Entity}
                & $c$ & The controller \\ \cline{2-3}
                & $dut$ & The switch under test \\ \cline{2-3}
                & $N$ & The number of tables for $dut$ \\ \cline{2-3}
                & $H = \{h_n | n \geq 2\}$ & The set of hosts. \\ \cline{2-3}
                & $CAP = \{cap_c, cap_n | n \geq 2\}$ & The set of link capacities.
                    $cap_c$/$cap_n$ is link capacity between $c$/$h_n$ and $dut$ \\ \hline

            C2D & $CD = POR$ & The parameter for C2D.
                    $POR$ means the throughput of packet-out
                    operation in $dut$ \\ \hline

            D2C & $DC = PIR$ & The parameter for D2C.
                    $PIR$ means the throughput of packet-in
                    operation in $dut$ \\ \hline

            \multirow{5}{*}{OFD}
                & $T_{\var{action-set}}$ & The time of action set execution in $dut$ \\ \cline{2-3}
                & $T_{\var{table-pipline}}$ & The time of table pipeline in $dut$ \\ \cline{2-3}
                & $buf$ & The size of buffer in $dut$ \\ \cline{2-3}
                & $Acc_{timeout}$ & The accuracy of timeout in $dut$ \\ \cline{2-3}
                & $P$ & The gain of table pipeline in $dut$ \\ \cline{2-3}
                & $D_{openflow} = \{T_{\var{action-set}},$ \newline
                    $T_{\var{table-pipeline}}, buf, Acc_{timeout},$ \newline
                    $P\}$

                    & The set of parameters for OFD \\ \hline

            \multirow{5}{*}{Process}
                & $TB = \{table_i | 0 \geq i < N\}$
                    & The set of flow tables in $dut$ \\ \cline{2-3}

                & $F = \{flow_{i,j} | 0 \geq i < N, j > 0\}$
                    & The set of flow entries. $flow_{i,j}$
                        mean the flow entry in $table_i$.  \\ \cline{2-3}

                & $TFC = \{pkt_z | z > 0\}$
                    & The traffic which be sent from $src$ to $dst$.
                        $src \in H, dst \in H$. \\
                        \cline{2-3}
                & $T_{table\_lookup}$
                    & The time of looking up the flow table in $dut$. \\ \cline{2-3}
                & $T_{apply\_action}$
                    & The time of executing Apply-Action in $dut$. \\ \cline{2-3}
                & $T_{\var{idle-timeout}}, T_{\var{hard-timeout}}$
                    & The timeout value for idle/hard timeout flow entry. \\ \cline{2-3}
                & $T_{\var{idle-expired}}, T_{\var{hard-expired}}$
                    & The arrival tiem of flow-removed message for idle/hard timout flow entry at $c$. \\ \cline{2-3}
                & $T_{\var{idle-duration}}, T_{\var{hard-duration}}$
                    & The duration of flow-removed message for idle/hard timeout flow entry. \\
            \hline
        \end{tabular}
        \caption{Notation description}
        \label{table:notations}
    \end{table}
\end{center}

\section{Problem Description}
The topology is created based on the given entities shown in Table
\ref{table:notations}. The flow entries and traffic are determined based on the
parameter of $F$ and the $TFC$ to evaluate $CD$, $DC$, and $D_{openflow}$. The
objective of our work is to assure the accuracy of each measurement result of
$CD$, $DC$, and $D_{openflow}$. Due to the black-box testing, the $dut$ is not
modifiable.

\subsection*{Example}
Figure \ref{fig:example} shows the parameters of the test. The pipeline process
contains the time and performance of table pipeline ($T_{\var{table−pipeline}}$,
$P$), and the time of action set execution $T_{\var{action−set}}$ in
$dut$. The set of flow entries $F$ determines the operation of the entire
pipeline. Each flow entry, denoted by $flow_{i,j}$, has two timers of
hard-timeout and idle-timeout. The accuracy of the timeout, denoted by
$Acc_{timeout}$, evaluate whether each timer expired correctly or not. With the
combinations of $F$ and traffic $TFC$ the $dut$ is able to generate the
Packet-in messages to $c$ or to process the Packet-out messages sent from $c$.
The rate of Packet-in and Packet-out for a given $dut$ is determined by the
parameters of $PIR$ and $POR$.
The buffer size of $dut$ denoted by $buf$. If $buf$ is remaining, $dut$ stores the
$TFC$ into the buffer and raises the Packet-in operation with an identity when the
new flows arrival. And the $c$ generates the Packet-out operation with the
corresponding identity to $dut$, so $dut$ could forward the new flows.

\begin{figure}[htb]
    \begin{center}
        \includegraphics[width=0.9\textwidth]{example.png}
        \caption{OpenFlow performance testing example}
        \label{fig:example}
    \end{center}
\end{figure}
