Project Creation Review: Maple in OpenDaylight

Project Creation Review:
Maple in OpenDaylight
Andreas Voellmy, Y. Richard Yang,
Xiao Shi, Xin Li, Reinaldo Penno
December 18, 2014
What’s the Problem:
Challenge of Flow Programming
• Programming directly against flow tables can
be painful:
– Limited computational capability: e.g., no logic
negation
– Lost context: why is this rule here? why is a given
rule not there?
– Limited action set, e.g., no ARP responses
–…
2
Maple: Packet Processing Abstraction
• User defines a packet processing function, f, in a
high-level, general purpose language such as
Java.
• The abstraction: f processes every packet
entering the network.
• f can look at packet fields, query control state,
compute a route, send packets, etc.
3
Maple Example
Route f(Packet p, Env e) {
if (p.tcpDstIs(22))
return nullRoute();
else {
Location sloc = e.location(p.ethSrc());
Location dloc = e.location(p.ethDst());
Path path = myShortestPath(e.links(),
sloc,dloc);
return unicast(sloc,dloc,path);
}
}
Does not specify anything on flow tables!
Specified in a high-level language with a centralized view.
4
From a Maple Program
to Switch Flow Table Rules
5
Maple Compiler and Runtime
• Key design goals
– Language independent core: to support multiple
programming languages
– Simple, efficient data structures to support
correct, optimized rule generations
6
Maple Compiler and Runtime
1. Executes f on an arriving
packet, observing traces
of data accesses.
Observing packet data
accesses by asking f to
access pkt using libraries
Route f(Packet p, Env e) {
if (p.tcpDstIs(22))
return nullRoute();
else {
if (p.ethDst() == 2)
return nullRoute();
Location dloc = e.location(p.ethDst());
Location sloc = e.location(p.ethSrc());
Path path = myShortestPath(e.links(),
sloc,dloc);
return unicast(sloc,dloc,path);
}
}
7
Maple Compiler and Runtime
1. Executes f on an arriving
packet, observing traces
of data accesses.
2. Combine traces to form
a trace tree (TT), a
language-independent,
partial decision tree
representation of f.
3. Optimizing
compiler to compile
trace tree to flow
tables (FTs)
Prio
1
0
0
Prio
Match
Action
1
tcpDst:22
ToControlle
r
0Match
Action
ethDst:2
discard
Prio
Match
ToControlle
0
ethDst:4, ethSrc:6
port 30
tcpDst:22
r
1
tcpDst:22
ethDst:2
discard
0
ethDst:2
ethDst:4, ethSrc:6
port 30
0
ethDst:4, ethSrc:6
Action
ToControlle
r
discard
port 30
8
Maple in ODL: A New Programming Model
(North Bound Interface) for ODL Programmers
• A new programming model in ODL so that control
programs do not need to generate flow tables directly
– Programmers provides Java modules about how they want
to treat traffic.
– Programmer provides a top-level module defining how
multiple modules are composed to determine the overall
packet processing function
– Example:
• top-level function calls access control module to determine permit
or deny;
• if deny, drop, else call service chaining module to get next service;
• if found service, route to it; otherwise …
9
Dependency on ODL Components
• Use the MD-SAL design
• Use ODL Flow Manager to program flowcapable devices
• Need access and modification notifications of
ODL managed states (e.g., topology, ports)
10
Deliverables (Scope) of Maple in ODL-Lithium
• Provide Java-based programming abstraction,
comparable to Maple today.
• Tracing runtime and compiler to target flowcapable devices via MD-SAL.
• Implement sample applications (e.g., SFC,
GBP).
• API documentation and getting started guide.
11
Committers
•
•
•
•
•
Andreas Voellmy (Project Lead)
Reinaldo Penno
Xiao Shi (Nominated: Project Contact)
Xin Li (Nominated: Test Lead)
Y. Richard Yang
12
Thank you
• Questions?
13