<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Toward the first SDN programming capacity theorem on realizing high-level programs on low-level datapaths</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>2018 April</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10073676</idno>
					<idno type="doi"></idno>
					<title level='j'>IEEE International Conference on Computer Communications</title>
<idno></idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Christopher Leet</author><author>Xin Wang</author><author>Y. Richard Yang</author><author>James Aspnes</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[High-level programming and programmable data paths are two key capabilities of software-defined networking (SDN). A fundamental problem linking these two capabilities is whether a given high-level SDN program can be realized onto a given low-level SDN datapath structure. Considering all highlevel programs that can be realized onto a given datapath as the programming capacity of the datapath, we refer to this problem as the SDN datapath programming capacity problem. In this paper, we conduct the first study on the SDN datapath programming capacity problem, in the general setting of highlevel, datapath oblivious, algorithmic SDN programs and state-ofart multi-table SDN datapath pipelines. In particular, considering datapath-oblivious SDN programs as computations and datapath pipelines as computation capabilities, we introduce a novel framework called SDN characterization functions, to map both SDN programs and datapaths into a unifying space, deriving the first rigorous result on SDN datapath programming capacity. We not only prove our results but also conduct realistic evaluations to demonstrate the tightness of our analysis.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>I. INTRODUCTION</head><p>A major research direction of SDN is programmable, efficient datapaths (e.g., OF1.3 <ref type="bibr">[1]</ref>, OF-DPA <ref type="bibr">[2]</ref>, P4 <ref type="bibr">[3]</ref>). Only by being programmable can a given SDN datapath support diverse, ever evolving application scenarios. At the same time, it is crucial that datapaths be efficient, to be able to satisfy demanding requirements such as achieving high throughput and being cost effective. In the last few years, multi-table pipelines have emerged as a key structure of SDN datapaths (e.g., Domino <ref type="bibr">[4]</ref>, Forwarding Metamorphosis <ref type="bibr">[5]</ref>).</p><p>One problem of efficient datapaths, however, is that they must often be programmed at an inefficiently low level. For example, TCAM, which is essential to achieve highthroughput, does not support logical negation. Hence, a second major research direction of SDN is high-level, datapath pathoblivious programming, to provide abstractions to hide lowlevel datapath programming. To this end, in the last few years multiple high-level SDN programming models have emerged (e.g., Frenetic <ref type="bibr">[6]</ref>, Maple <ref type="bibr">[7]</ref>).</p><p>As both directions progress, a basic problem emerges: whether a given high-level program can be realized on a given Christopher Leet and Xin Wang are co-first authors low-level datapath. A good understanding of this problem can benefit both the design of high-level SDN programming and the design of datapaths. Given a fixed datapath (e.g., a fixed pipeline architecture such as OF-DPA), the vendor of the datapath can provide guidelines on the high-level programs that can be realized. Given a set of high-level programs to be supported, one could use this understanding to design the most compact datapath supporting these programs. Even for reconfigurable datapaths (e.g., P4), as reconfiguration can be expensive and time consuming, one can use this understanding to guide the design of a more robust datapath. Considering all high-level programs that can be realized onto a given programmable datapath as the capacity of the datapath, we define the basic problem as the SDN datapath programming capacity problem.</p><p>Solving the datapath capacity problem, however, is not trivial. Consider a simple datapath, named Simple-DP, shown in Fig. <ref type="figure">1</ref>. It is among the simplest datapaths, consisting of three tables forming a pipeline, where the first table (t1) matches on source IP and may jump to one of the two following tables, which both match on destination IP. Consider two simple high-level SDN programs below, both specified in the algorithmic, event-driven programming style to handle packet misses; see Sec. II for more details on the programming model. An interested reader can try to verify that the first program can be realized by Simple-DP, but the second cannot. Although the preceding datapath and high-level programs are among the simplest, they may already appear to be nontrivial for a reader to analyze. General datapath and high-level programs can be much more complex as multiple services need to be implemented and hence they can pose severe challenges in analysis. The goal of this paper is to develop the first systematic methodology to solve the SDN datapath programming capacity problem.</p><p>The contributions of this paper can be summarized as follows. First, we propose a unifying characteristic functional space to unify and extract the essence of programs and pipelines, removing complexities such as program structures and pipeline layouts. Second, we define a comparator in this functional space, which can be used to check whether a highlevel program can be realized on a given pipeline.</p><p>The rest of the paper is organized as follows. We define our model precisely in Sec. II. The main results are given in Sec. III. Sec. IV shows our evaluation results. Finally, related work is provided in Sec. V.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>II. MODELS</head><p>We start by specifying the high-level SDN programs and low-level datapath models. Since the main focus of SDN is routing, we refer to a high-level SDN program as a routing function. Since multi-table pipelines are the state-of-art for SDN datapaths, we focus on pipelines as datapaths.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Routing Function Model</head><p>Routing function: We denote a routing function as f , and assume that it is a logically centralized, deterministic function written in a high level language logically executed by an SDN controller on every packet <ref type="bibr">[7]</ref> entering that controller's network to determine network-wide routing for that packet.</p><p>Each execution of f on a packet reads a set of the packet's attributes (called match fields) M " xm 1 , ..., m n y (e.g., &lt;srcIP, dstIP, ...&gt;). We use M to denote a subset of packet match fields included in M. Moreover, we denote dompM q as the domain of a set of match fields M . The execution of f returns a routing action from a set of valid actions R (e.g., Drop, Forward(port=2)):</p><p>The space of such functions is denoted F.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Example:</head><p>We use the routing function onPkt below to illustrate key features of our routing function model. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Specifically,</head><p>onPkt reads the match fields M " xethType, srcIP, srcPort, dstIP, dstPorty and maps each value in the domain of M to a routing action in R " tDrop(), Forward(port=x)u. While we write onPkt as an imperative function, we emphasize that our model is fully generic and does not specify a programming paradigm.</p><p>Elaborating, onPkt's first three lines declare key-value tables. Specifically, hostTable and condTable associate each IP address with an attachment switch and host condition (e.g., authentication status) respectively, while routeTable maps a switch, condition pair to its forwarding port. Moving on to onPkt's body, L1 and L2 detect and drop non-IPv4 traffic, while L7 drops traffic from unverified endpoints. For verified packets, L4 to L6 further set dstCond and dstSw variables, and then return a routing action from routeTbl based on the two variables.</p><p>Routing function DFG: Since a generic routing function can have arbitrary, complex control structure, we transform a routing function into a dataflow graph (DFG) to better represent its structure. We denote an f 's DFG as G f . Specifically, to compute G f for f , we must remove all of f control follow dependencies. These dependencies are removed by the following transformations:</p><p>&#8218; We remove assignment statement order dependencies by converting f to single static assignment form (SSA). &#8218; We remove branches by assigning their conditionals' values to guards, and appending dependencies on these guards to all statements in their if and else blocks. &#8218; We remove program loops by converting them to black box functions which read all variables read by the loop and write all variables written by them. For example, our example routing function onPkt is transformed as follows: Note that onPkt's if statement at L1's has been replaced by an assignment from its conditional to the guard g0. This guard is appended to L2, which was formally in the if statement's if block.</p><p>Given this transformation, we define G f for f : Definition 1. A routing function f 's' dataflow graph DFG G f " pV f , E f q is a vertex weighted dag generated from a transformed f such that:</p><p>&#8218; There is a directed edge in E f between two variables if the source variable appears in the target variable's assignment.</p><p>As an example, we give onPkt's DFG below: Observe that the vertex dstSw is descended from the two variables in its assignment, g1 and dstIP. The vertex's weight, 10, indicates dstSw's domain.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Pipeline Model</head><p>We focus on state-of-the-art datapaths: multi-table pipelines. We first model a table t in a pipeline p and then we give a clear definition for the pipeline. Pipeline table: Each pipeline table t P p is a exact match match-action table. Each of t's actions is a routing action output, or a write to t's output register rptq followed by a hop to a subsequent table in p, or a simple jump action to a subsequent table in p. Not all t output routing actions, and we denote the t that do as an egress table.</p><p>Each t matches on a set of inputs Iptq that contains packet match fields m i P M and preceding tables' output registers rptq. Key limitations on a t are the maximum number of rules it can contain and rptq's bit length, which we denote maxrulesptq and bitsprptqq respectively. Pipeline: A pipeline p is a singly rooted dag (directed acyclic graph) of tables tt i u. An edge pt i , t j q in a p indicates that a packet arriving at t i can jump to t j .</p><p>Each packet passing through p starts at p's root and proceeds through p to an egress table. Therefore, each packet passing through p can map to a path in the p, along with a routing action for that packet from R.</p><p>A packet's path through p and the action its egress table outputs are determined by the set of packet match fields M each t i P p matches on. Given this, p may also be summarized as a mapping from dompMq to R, which depends on p's contents.</p><p>We denote the space of all pipelines p as P .   Narrowing our focus, consider t2 P ExampleDP. t2 is an exact match table whose inputs Ipt2q are srcIP and srcPort, and whose output register is r(t2).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Symbol</head><p>Significant computation limits on t2 are its maximum number of rules maxrulespt2qq and the size of its output register bitspr(t2)q.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>III. MAIN RESULTS</head><p>Given the function and pipeline models, we now present our main results, on whether a function f can be realized by a pipeline p.</p><p>To simplify the reading of our results, we put only the definitions and main results in the main text. The proofs of the results are in the appendix. To make it easier to follow the symbols, we collect key symbols in Table I for reference.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Overview</head><p>A main challenge in developing a systemic method to verify whether a routing function f can be realized by a pipeline p, which we denote as f &#217; p, is that routing functions and pipelines are represented differently and both types of representations can have substantial complexities and variations. Consider each routing function f as a point in a functional space F, and each pipeline p as a point in functional space P.</p><p>Our main contribution is the introduction of a novel, unifying, normalization functional space C called the characteristic functions space. Each routing function f is mapped by the mapping &#964; to a characteristic function &#964; pf q P C, characterizing the computational load of f . Each pipeline p, on the  Since &#964; pf q and &#954;ppq are defined in the the same space C, as a point and as a set of points respectively, one can compare &#964; pf q with each element in &#954;ppq, to see if the load can be "covered" by a capability, resulting in our basic capacity theorem: that if D c P &#954;ppq &#283; &#964; pf q, f &#217; p.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Characteristic Functions</head><p>We begin by defining a generic characteristic function c. Definition 2. A characteristic function c is a mapping from each subset M of a packet's match fields to a vector consisting of two components: cpM q &#916; "&#259; scopepM q, ecpM q &#261; . We refer to the two components of cpM q's vector as cpM qrscopes and cpM qrecs respectively.</p><p>Given two characteristic functions, one can compare them.</p><p>Definition 3. We define c i dominates c j , denoted as c i &#283; c j as follows:</p><p>To verify our capacity theorem, we need to compare a set of characteristic functions with a single characteristic function.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Characterization of a Routing Function</head><p>Given the concept of characteristic functions, we now derive the characteristic function, denoted as &#964; pf q, of a routing function f . Definition 5. The scope of the characteristic function of a routing function for a subset of packet match fields M is the size of the domain of valid values of M : &#964; pf qpM qrscopes &#916; " dompM q &#964; pf qpM qrecs is a property that we build from the concept of f-equivalence: Definition 6. We define f-equivalence, denoted as " f , as a relationship between two values of M , which we write as v i pM q and v j pM q, which denotes that these values cannot be distinguished by f :</p><p>Our definition of f-equivalence leads naturally to our definition of an f-equivalence class. Definition 7. An f-equivalence class, denoted as rv i pM qs f , is the set of all values f-equivalent to a given M 's value v i pM q: rv i pM qs f &#916; " tv j pM q P dompM q : v i pM q " f v j pM qu.</p><p>Counting equivalence classes gives us the concept of fequivalence class number. We now arrive at our definition of &#964; pf qpM qrecs.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Definition 9. The ec of a routing function's characteristic function for an M is the cardinality of M 's set of f-equivalence classes:</head><p>&#964; pf qpM qrecs</p><p>The characteristic function &#964; pf q of a routing function characterizes f 's computational load:</p><p>While &#964; pf q is powerful it is impractical because fequivalence class number is costly to directly calculate. We therefore bound a &#964; pf q by defining the bounding characteristic function of a routing function &#964; G pf q which is easily derivable from f 's DFG. This function characterizes an upper bound on f 's computation load: &#964; G pf q dominates &#964; pf q.</p><p>We find &#964; G pf qrscopes as before. Instead of calculating &#964; G pf qrecs, however, we determine an upper bound for with the value of specific vertex cut in G f , f 's DFG. We now construct this cut. Definition 11. Let V f pM q be the vertices of m i P M in G f , and D f pM q be the vertices in G f descended from V f pM q.</p><p>The vertex-min-cut of M , G f .vertexM inCutpM q, is the product of the weights of the vertices in the minimum weight vertex cut severing V f pM q from D f pM &#180;M q.</p><p>Given this cut, we define &#964; G pf q follows: Definition 12. The characteristic function &#964; G pf q of a routing function characterizes an upper bound on f 's computational load; &#964; G pf q dominates &#964; pf q: &#964; G pf qpM q &#916; " pdompM q, G f .vertexM inCutpM qq.</p><p>Example: We illustrate these concepts with our example routing function onPkt.</p><p>Consider onPkt's match fields srcIP and srcPort. Each are only read once: on L3, by the boolean function isVerified. Thus, while srcIP and srcPort may have many f-equivalence classes individually, (srcIP, srcPort) only has two: values that isVerified evaluates to 0, and values it evaluates as 1.</p><p>Suppose onPkt is a routing function for a small commercial network fronted by a NAT with 50 hosts each running a limited set of applications that only use 200 standard ports. Given this, dompsrcIP, srcPortq " 10000, and thus &#964; ponPktqpsrcIP, srcPortq " p10000, 2q.</p><p>While the equivalence class number of (srcIP, srcPort) was straightforwards, the equivalence class number of most other subsets of onPkt's inputs is not so obvious. We therefore bound &#964; ponPktq with &#964; G ponPktq, which we calculate using onPkt's DFG G onPkt , shown in Fig. <ref type="figure">5</ref>. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>5.</head><p>The routing function onPkt's DFG G onPkt and the cut psrcIP, srcPort, dstPortq. To bound, for example, the equivalence class number of onPkt's inputs (srcIP, srcPort, dstIP) we take the vertex-min-cut in G onPkt between their vertices and every vertex descended from onPkt's other inputs: (ethType, dstPort,g0, dstCond, return). This vertex-min-cut is indicated in Fig. <ref type="figure">5</ref> by a dotted line.</p><p>The vertices in this cut, (g1, dstIP) have weight 50 and 2, and thus &#964; G psrcIP, srcPort, dstIPq " p50000, 100q.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>D. Characterization of a Pipeline</head><p>We now define &#954;ppq, the set of characteristic functions of a pipeline p. We start by defining a path &#961; through a pipeline p. Definition 13. A path, &#961;, in a p is a path through p's dag xt 1 , ..., t n y such that t 1 is a root table and t n an egress table in the p.</p><p>As an example, ExampleDP contains two paths: xt1, t2, t3, t4, t5y, and xt1, t6y, which we denote as &#961; L2 and &#961; L3 respectively.</p><p>We define, @ &#961; P p, &#954; &#961; ppq as the characteristic function of the a path through a pipeline. Definition 14. The characteristic function set &#954;ppq of a p is the union of @ &#961; P p's characteristic functions: &#954;ppqpM q &#916; " tc P C : c " &#954; &#961; p&#961;q @ &#961; P pu.</p><p>We now construct the characteristic function of a path &#961; by introducing the following definitions: Definition 15. The input closure M&#961; pt i q of a table t i P &#961; is the set of inputs that t i can obtain information about:</p><p>m i P M&#961; pt j q s.t. rpt j q P Ipt i qu.</p><p>Definition 16. The closure set, M&#961; pM q of a &#961;'s M is the set of t i P &#961; with input closure M .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>M&#961; pM q</head><p>&#916; " tt i P &#961; : M&#961; pt i q " M u.</p><p>Using these definitions, we define the characteristic function of a &#961; as: Definition 17. The characteristic function &#954; &#961; p&#961;q of a &#961; characterizes the computational capacity of a &#961;. &#954; &#961; p&#961;qrscopes is the maximum number of values of M that &#961; can read and &#954; &#961; p&#961;qrecs is the maximum number of equivalence classes of M that &#961; can distinguish.</p><p>M&#961; pM q &#8240; H pminrmaxrulespt i q : t i P M&#961; pM qs, minr2 bitsprptiqq : t i P M&#961; pM qsq M&#961; pM q " H ^D m i P M :</p><p>Example: As before, we provide intuition into the characteristic functions of pipelines using our example pipeline ExampleDP.</p><p>Recall from our model that ExampleDP contains two &#961;: &#961; L2 and &#961; L3 . Consider the table t4, only contained by &#961; L3 . The input closure M&#961;L3 pt4q is (srcIP, srcPort, dstIP) since t4 reads dstIP and r(t2), and t2 in turn reads srcIP and srcPort. The closure set, M&#961;L3 psrcIP, srcPort, dstIPq, of t4's inputs in &#961; L3 is tt4u: t4's input closure is unique.</p><p>Thus, &#954; &#961;L3 p M&#961;L3 q " &#954; &#961;L3 psrcIP, srcPort, dstIPq " pmaxRulespt4q, 2 bitsprpt4qq q. In the case that t4 has 2 20 rules and a 16 bit output register, &#954; &#961;L3 p M&#961;L3 q " p2 20 , 2 16 q.</p><p>Further, consider the subset of ExampleDP's match fields psrcMac, dstMacq. &#961; L3 does not contain the inputs srcMac or dstMac and thus it can only realize functions that contain them in the unlikely event that all are constants. Constants have domain 1 and 1 equivalence class. Thus the value of &#954; &#961;L3 for any set of outputs containing srcMac is p1, 1q.</p><p>Finally, consider the subset of ExampleDP's match fields psrcIP, srcPortq. srcIP and srcPort are both read by &#961; L3 , but psrcIP, srcPortq is not an input closure of any t i P &#961; L3 . In this case, it is not necessary to consider psrcIP, srcPortq to verify realizability, and thus &#954; &#961;L3 psrcIP, srcPortq " p , q, indicating that we can skip this field during comparison with a routing funciton's &#964; .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>E. Datapath Programming Capacity Theorems</head><p>Combining the preceding definitions to characterize both routing functions and pipelines, we finally arrive at our central result: a sufficient condition for whether a given f can be realized in a given p.</p><p>Theorem 1 (Pipeline Realization Theorem). A routing function f can be realized by a pipeline p if &#954;ppq, the set of characteristic functions of p dominates &#964; pf q, the characteristic function of f . Formally, we have:</p><p>As a corollary, because &#964; G pf q &#261; &#964; pf q, the Pipeline Realization Theorem extends to &#964; G pf q.</p><p>Example: We illustrate our Pipeline Realization Theorem using onPkt and ExampleDP. Specifically, our Pipeline Realization Theorem states that &#954;pExampleDPq &#304; &#964; ponPktq &#241; ExampleDP &#217; onPkt.</p><p>Further, &#954;pExampleDPq &#304; &#964; ponPktq is true if &#954; &#961; p&#961; L2 q &#261; &#964; G ponPktq or &#954; &#961; p&#961; L3 q &#261; &#964; G ponPktq We verify each conditional by comparing each component of each vector given by each pair of characteristic functions. For example, &#964; ponPktqpsrcIP, srcPort, dstIP) " p50000, 100q, &#954; &#961; p&#961; L3 qpsrcIP, srcPort, dstIP) " p2 20 , 2 16 q, and thus the input set (srcIP, srcPort, dstIP) does not prevent onPkt from being realized in &#961; L3 .</p><p>Tightness: Though the theorem provides only a sufficient condition, tighter results, in particular sufficient and necessary conditions, can be established in multiple settings. In particular, we have the following result: Definition 18. A branchless pipeline p is a p whose dag is a path from its root to its output node. Theorem 2. If p is a branchless pipeline, p's table size is large, and each match field m i P M appears in exactly one of p's tables, &#954;ppq &#304; &#964; G pf q &#244; f &#217; p.</p><p>In Sec. IV-A, we evaluate our realization theorem's tightness on more general pipelines through experiments.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>IV. EVALUATION</head><p>We now evaluate the tightness, time complexity and output size of routing function and pipeline characterization numerically. All experiments are conducted on a 1.6 GHz Intel Core i5 with 4 GB RAM.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>A. Routing Function Characterization Tightness</head><p>We demonstrate the tightness of our characterization of a routing function by comparing the number of equivalence classes of a M for both &#964; and &#964; G for the following set of simple routing functions: Our final function secureRoute drops all traffic from srcIPs on a filter list and forwards remaining traffic. Results: We present our results in Table <ref type="table">II</ref>. Specifically, in Table <ref type="table">II</ref>, column 2 defines the domain of srcIP, dstIP, columns 3-6 give the output ranges Optblsq of each table, and columns 7-10 give the values of selected fields in each function's &#964; pf q and &#964; G pf q.</p><p>Note that the row b1(scR) and b2(scR) represent the two branches of secureRoute. We record N/A when a value is not applicable to a given function, and null for values of &#964; pf q where computation failed to halt.</p><p>In our evaluation of simpleRoute and condRoute, the results of &#964; and &#964; G are almost identical in every case barring an extreme one where OpcondTblq = 1. Notably, our values of &#964; pf q and &#964; G pf q are not influenced by the range of routeT bl OprouteTblq. This implies there is no pattern between the allocation of routes to (srcIP, dstIP) pairs &#964; pf q can exploit to reduce its number of equivalence classes.</p><p>Further notice that our functions with control statements: secureRoute and onPkt have a large gap between &#964; and &#964; G , suggesting &#964; G 's bound is loose on heavily branching programs. However, as rows b1(scR) and b2(scR) show, we can ameliorate this problem by calculating each route through a program characteristic function separately.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>B. Routing Function Characterization Time Complexity</head><p>We now compare the time required to compute &#964; and &#964; G for given routing functions. We run our tests using simpleRoute where OphostTblq = 100 and OprouteTblq = 30.</p><p>Results: Fig. <ref type="figure">6</ref> shows the scalability of &#964; G as input length grows. As srcIP and dstIP) bit length increase, &#964; G 's computation time remains constant while &#964; 's computation time grows rapidly. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>C. Characterization of a Pipeline</head><p>We now examine the memory utilization and computation time of pipeline characterization. We evaluate the following pipelines:</p><p>1) The OF-DPA Abstract Switch 2.0: The OpenFlow Data Plane Abstraction Abstract Switch 2.0 (OF-DPA) is an abstract switch model based on the Open Flow 1.3.4 protocol designed to allow the programming of Broadcom-based switches under the OpenFlow protocol. We examine two OF-DPA flow table configurations: bridging and routing (BR), and data center overlay tunnel (OT), which contain 7, and 3 tables in 5, 3 stages respectively.</p><p>[2] 2) PicOS: PicOS is a network operating system for white box switches that provides OF programmability across HP, Edgecore and Pica switches. We examine two fixed pipelines offered by PicOS as table type patterns: PicOS's IP routing pipeline (IPR) and Policy routing pipeline (PR), which contain 4 and 5 tables in 4 and 5 stages respectively. <ref type="bibr">[8]</ref> Results: Table <ref type="table">III</ref> our characterization results for our evaluated pipelines. The results show that despite the theoretically large number of subsets of M across evaluated pipelines, memory utilization and computation time are small.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>V. RELATED WORK</head><p>High level SDN Program Compilers: Multiple systems that allow programmers to write SDN programs in high level languages and then compile such programs to flow table pipelines have been proposed over the last several years. Such systems are related to our work in that they examine the transformation of policy programs into switch flow tables. We group these systems into two categories: tier-less and splitlevel. Tier-less systems (e.g. SNAP <ref type="bibr">[9]</ref>, FML <ref type="bibr">[10]</ref>, FlowLog <ref type="bibr">[11]</ref>, Maple <ref type="bibr">[7]</ref>), require programmers to specify forwarding behaviors as packet handling functions which are then used by the SDN controller to configure and update network state. Such systems pioneer our pipeline capacity theorem's notion of a program function and are able to compile such functions to single pipelines. These systems, however, are unable to verify that submitted functions can be written to a given pipeline without physically carrying out the time consuming process of compilation, and cannot write programs to multi-pipeline networks.</p><p>Split-level systems such as the Frentic family (e.g. Frenetic <ref type="bibr">[6]</ref>, Pyretic <ref type="bibr">[12]</ref>) provide a two tiered programming model in which controller programs specify events of interest and then respond to these events when they occur by calculating new network policies. Again, such systems cannot verify that a given controller program's output can be written to the controller's switches' pipelines, although this paradigm falls outside of our pipeline capacity theorem's model as well.</p><p>Pipeline specification languages: There are some superficial similarities between pipeline specification languages (e.g. P4 <ref type="bibr">[3]</ref>, PISCES <ref type="bibr">[13]</ref>, Concurrent NetCore <ref type="bibr">[14]</ref>) and our pipeline capacity theorem, such as the analysis and guarantees that such languages provide about pipeline behavior. For example, Concurrent NetCore's type system ensures that any program used to populate a pipeline has certain properties, such as determinism, whilst PISCES's switch specification allows compilers to analyze pipelines and optimize their performance. We contend, however, that our capacity theorem attacks an entirely different space in pipeline analysis -guaranteeing pipeline properties or improving performance is qualitatively different to verifying whether compilation is possible.</p><p>Pipeline design: Pipeline design schemes such as Jose et al.'s "Compiling Packet Programs to Reconfigurable Switches" <ref type="bibr">[15]</ref>, Sun et al.'s "Software-Defined Flow Table Pipeline" <ref type="bibr">[16]</ref>, FlowAdapter <ref type="bibr">[17]</ref>, and Domino <ref type="bibr">[4]</ref> are clearly related to our pipeline capacity theorem in that they examine pipeline layout design under hardware constraints. Jose et al., <ref type="bibr">Sun et al.,</ref> and FlowAdapter however, focus on mapping logical lookup tables/flow table pipelines to physical tables whilst our pipeline capacity theorem focuses on generic programs, while Domino considers weaker hardware constraints (e.g. limits on stateful operations at line-rate) than our work does.   M P M to fully execute a given f . Second, we show that a pipeline transmitting information internally using our encoding can realize an f in p given that &#954;ppq &#304; &#964; G pf q. Finally, we show that &#964; G pf q &#261; &#964; pf q, proving by extension that if &#954;ppq &#304; &#964; pf q, f &#217; p. We omit a proof of Theorem 2 and the proofs of certain corollaries and lemmas due to space constraints. We will give these proofs in an extended report in an upcoming technical journal.</p><p>We base our summary on the vertices in the G f .vertexM inCutpM q of a f 's G f . Definition 19. The min cut vertices &#956; f pM q are the vertices in an f 's G f cut by G f .vertexM inCutpM q.</p><p>Let a given value of &#956; f pM q be v i p&#956; f pM qq and the domain of values of &#956; f pM q be domp&#956; f pM qq.</p><p>Lemma 1. Given a G f .vertexM inCutpM q, we can calculate f without knowing v i pM q given v i p&#956; f pM qq.</p><p>While &#956; f pM q acts as an effective representation of values of M v i pM q, we can compress it by introducing the concept of codewords, allowing maximize transmission through a pipeline.</p><p>Definition 20. The codewords &#967; f pM q of inputs M of a f are a set of integers that correspond to the f-equivalence classes of M .</p><p>Receiving a codeword P &#967; f pM q is equivalent to receiving a value for M v i pM q, since the codeword can be deterministically mapped back into a value from v i pM q's equivalence class. We now define the shorthand 'compute the codewords of M ' which we will use in our proofs:</p><p>Definition 21. If we can compute the codewords &#967; f pM q of M , @ v i pM q P dompM q we can compute the codeword associated with the equivalence class of v i pM q.</p><p>Our codewords give us a bound on the transmission requirements of an M , given in Lemma 2. Lemma 2. A table t i only requires log 2 pr|domp&#956; f pM qq|&#180;1sq bits of information about M to execute f correctly.</p><p>Proof. We can encode the value of any v i pM q P dompM q as a codeword in &#967; f pM q and still convey sufficient information to compute f . If &#956; f pM q can take |domp&#956; f pM qq| distinct values, we can assign each value a unique codeword from the set [0, ..., |domp&#956; f pM qq| &#180;1], which take at most log 2 pr|domp&#956; f pM qq| &#180;1sq bits to represent.</p><p>Proving the realization theorem: Given our characterization of function transmission requirements, we can now embark on our proof of our realization theorem. First, we will give our key underlying lemma, lemma 3, from which our realization theorem follows naturally. Lemma 3. If @ t i P &#961; " xt 1 , ..., t n y have maxRulespt i q &#261; &#964; G pf qp M&#961; pt i qqrdoms, and 2 rptiq &#261; &#964; G pf qp M&#961; pt i qqrecs, then @t i P &#961; " xt 1 , ..., t n y can output &#967; f p M&#961; pt i qq to rpt i q.</p><p>Given Lemma 3, we are now equipped to prove the realization theorem.</p><p>Proof. Given an f and p, we will prove that if &#954;ppq &#304; taupf q, f &#217; p. Consider a &#954; &#961; p&#961;q P &#954;ppq.</p><p>@ M P M : m i P M &#209; m i R &#356; tiP&#961; M&#961; pt i q, &#954; &#961; p&#961;qpM q " p1, 1q. Therefore, if &#954; &#961; p&#961;q &#261; &#964; G pf q &#241; all m i not read by &#961; are treated as constants or not read at all by f , and thus f is effectively a mapping from &#356; tiP&#961; M&#961; pt i q &#209; R. Further, given &#954; &#961; p&#961;q &#261; &#964; G pf q @ t i P &#961;, maxRulespt i q &#261; &#964; G pf qp M&#961; pt i qqrdoms, and 2 rptiq &#261; &#964; G pf qp M&#961; pt i qqrecs, and thus by Lemma 3 t n can calculate &#967; f p M&#961; pt n qq.</p><p>Finally, consider that if a t i can calculate &#967; f pM i q, and an f is a mapping dompM i q &#209; R, t i can compute f 's output @ v j pM i q P dompM i q by mapping each codeword in &#967; f pM i q to the output of f it corresponds to.</p><p>Since t n is &#961;'s only output, M&#961; pt n q " &#356; tiP&#961; M&#961; pt i q. Thus, t n can compute f 's output. Further, since t n is an egress table it can always pass this output back to the switch.</p><p>Therefore, if &#954; &#961; p&#961;q &#261; &#964; G pf q, f &#217; &#961;. Since &#954; &#961; p&#961;q P kppq and &#961; P p, we have proved that if &#954;ppq &#304; &#964; G pf q, f &#217; p.</p><p>The last step required to prove our realization theorem is to show that &#964; G pf q &#261; &#964; pf q and thus that &#954;ppq &#304; &#964; pf q &#241; f &#217; p. The crux of this step is given in Lemma 4, below. Proof. Suppose, by way of contradiction, D pf, M q : |dompM q{ " f | &#261; domp&#956; f pM q. Each v i pM q in one of M 's equivalence classes must generate a v i p&#956; f pM qq. By the pigeonhole principle, if M has more equivalence classes than &#956; f pM q, two values of M from different equivalence classes must generate the same value of &#956; f pM q. However, by Lemma 1, &#956; f pM q contains sufficient information about M to fix f 's outputs value, and thus these two bindings of M must be in the same equivalence class, which is a contradiction. Corrollary 1. The number of f-equivalence classes of any M is bounded by G f .vertexM inCutpM q.</p><p>Corrollary 2. The characteristic function &#964; G pf q dominates the characteristic function &#964; pf q.</p><p>We have therefore proven our realization theorem: that &#954;ppq &#304; &#964; G pf q &#241; f &#217; p.</p></div></body>
		</text>
</TEI>
