Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async Runtime #65

Merged
merged 88 commits into from
Jan 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
b30762b
async: remove old test
arjunguha Dec 26, 2013
9d56a61
async: add OpenFlow_Header module
arjunguha Dec 26, 2013
664c688
asyn: Add arbitrary instance and roudtrip test for Header
arjunguha Dec 26, 2013
1f810cf
async: removed version-specific Header modules
arjunguha Dec 26, 2013
eb17cae
async: checkpoint implementation of async platform
arjunguha Dec 26, 2013
ea665bb
async: xid type is now in OpenFlow_Header
arjunguha Dec 26, 2013
ca87f07
async: added Message.header_of to 1.0 and 1.3
arjunguha Dec 27, 2013
8d54eec
async: added Async_Platform.Message wrappers
arjunguha Dec 27, 2013
e8c9d94
.gitignore
arjunguha Dec 27, 2013
d22db7a
:async Async_OpenFlow is the interface
arjunguha Dec 27, 2013
bb1549c
async: added textutils as a dependency for travis
arjunguha Dec 27, 2013
7d29066
async: moved the Message signature out of Platform.
arjunguha Dec 27, 2013
70a8a85
async: fix compile errors in lwt
seliopou Dec 27, 2013
78eb5a2
async: fix compile errors in lwt
seliopou Dec 27, 2013
3b88a3e
Merge branch 'final-async' of github.com:frenetic-lang/ocaml-openflow…
arjunguha Dec 27, 2013
16d39c5
async: Async_OpenFlow.ClientServer
arjunguha Dec 27, 2013
9049eb6
async: expose log
arjunguha Dec 27, 2013
6bea9fb
async: Chunk before OF1.0 and OF1.3 in signature
arjunguha Dec 27, 2013
7ad6c65
async: lots of optional logging in serializers
arjunguha Dec 27, 2013
de37c24
async: link with core and still run tests
arjunguha Dec 27, 2013
adc0d15
async: marshal returns unit and only marshals body
arjunguha Dec 27, 2013
30bc4e4
bugfix to previous commit
arjunguha Dec 27, 2013
8461985
async: chunk stream <-> parsed stream converters
arjunguha Dec 27, 2013
c88f6be
Hypervisor
arjunguha Dec 27, 2013
da30c66
async: better logging
arjunguha Dec 27, 2013
f063703
async: added async and core dependencies to travis
arjunguha Dec 27, 2013
09c8764
async: ignore Mac OS extended attribute files
arjunguha Dec 27, 2013
5d1466d
async: OpenFlow0x01 controller with handshake
seliopou Dec 27, 2013
85a05f9
async: learning switch
seliopou Dec 27, 2013
6018b89
fix to PortStatus marshaling
arjunguha Dec 27, 2013
5d7fe89
async: remove debug printline
seliopou Dec 27, 2013
0b5eb36
async: robustness for ClientServer module
arjunguha Dec 27, 2013
ea08911
async: bugfix
arjunguha Dec 27, 2013
46a395d
robustness
arjunguha Dec 27, 2013
d4c5372
robustness
arjunguha Dec 27, 2013
4a676e5
bugfix
arjunguha Dec 28, 2013
8c40000
async: Add Trans submodule to Platform
seliopou Dec 29, 2013
3e043ca
asyn: OF0x01 Controller handles echos
seliopou Dec 29, 2013
0e5640e
of: remove redundant cstruct definitions
seliopou Dec 29, 2013
0848333
of: all xid types refer to OpenFlow_Header.xid
seliopou Dec 29, 2013
bbf0591
of: constants for common protocol message types
seliopou Dec 30, 2013
ae1d50e
async: Add local to Platform.Trans
seliopou Dec 30, 2013
cafc426
async: Add allocating marshal' to Message interface
seliopou Dec 30, 2013
62cc4a0
async: Chunk Controller (w/ handshake) implementation
seliopou Dec 30, 2013
2415f63
async: rewrite 0x01 controller in terms of chunk controller
seliopou Dec 30, 2013
5a55856
async: OpenFlow0x04 controller
seliopou Dec 30, 2013
9d3b6f7
async: remove Handshake exn from version'd controllers
seliopou Dec 30, 2013
9542372
Fix xid and sexp issue.
jnfoster Dec 31, 2013
16a316e
async: Rename Switch_id to Client_id
seliopou Dec 31, 2013
7df846a
Progress on Highlevel
jnfoster Dec 31, 2013
8e53648
Merge branch 'final-async' of https://github.com/frenetic-lang/ocaml-…
jnfoster Dec 31, 2013
6e00775
First rough cut at an Async-ized SDN.ml
jnfoster Dec 31, 2013
6d7c813
Missing files
jnfoster Dec 31, 2013
ded377c
Toward a simpler SDN-async replacement
jnfoster Jan 1, 2014
03cbd1e
ported 0x04 handshake
jnfoster Jan 1, 2014
1f7eaf4
Streamlining and implement OpenFlow0x01 setup_flow_table
jnfoster Jan 2, 2014
dc9f884
OpenFlow 0x04 setup_flow_table
jnfoster Jan 2, 2014
5793134
Expose Highlevel
jnfoster Jan 2, 2014
0fd3e9a
Logging for Async and a bugfix
jnfoster Jan 2, 2014
e4495b6
async: combined handshake into one function
seliopou Jan 2, 2014
5ed3814
async: proper version negotiation in Chunk Controller
seliopou Jan 2, 2014
d1bf893
async: deduplicate code in HighLevel
seliopou Jan 2, 2014
5f87b05
async: Use Chunk for HighLevel
seliopou Jan 2, 2014
3d3e9ff
async: Use OF0x04 for a 0x04 connection in HighLevel
seliopou Jan 2, 2014
f7a3b39
async: remove unused version parameter
seliopou Jan 3, 2014
3c12bfa
async: fix use of port_description_request_msg
seliopou Jan 3, 2014
ca8c05d
--enable-tests --enable-quickcheck tweak
arjunguha Jan 5, 2014
4f1fe60
removed ocamldoc configuration from _oasis
arjunguha Jan 5, 2014
8885660
removed _oasis generated ./configure and Makefile
arjunguha Jan 5, 2014
23f27e3
better, hand-crafted Makefile
arjunguha Jan 5, 2014
4e594f4
better logging for messages written
arjunguha Jan 5, 2014
48cac44
do not enable debug logging here
arjunguha Jan 5, 2014
f166ae6
fix to tag-based log filtering
arjunguha Jan 5, 2014
2d77fe5
no more indiscriminate logging
arjunguha Jan 5, 2014
a1cac2c
nicer logging
arjunguha Jan 5, 2014
e522ec0
fixed OF 1.3 handshake
arjunguha Jan 5, 2014
5884ab0
async: Remove unused import
seliopou Jan 8, 2014
00012c2
async: Export Controllers for each protocol
seliopou Jan 8, 2014
fe30da6
async: Make handle on Highlevel Platform explicit
seliopou Jan 9, 2014
678096f
async: Highlevel clear switch on disconnect for both versions
seliopou Jan 9, 2014
5d791da
async: Remove redundant debugging
seliopou Jan 9, 2014
e1ebe7b
async: Make Highlevel interface conformant
seliopou Jan 9, 2014
3f8818a
async: abstract over the event type in Platform.S
seliopou Jan 10, 2014
b99f264
async: Add note about ChunkController public API
seliopou Jan 10, 2014
37e1664
async: make Platform's event type explict
seliopou Jan 10, 2014
be274b4
async: expose echo and handshake stages in Chunk Controller
seliopou Jan 10, 2014
db8494a
async: Remove redundant Async_Highlevel export
seliopou Jan 10, 2014
b377b8a
async: add Async_Highlevel to InternalModules
seliopou Jan 10, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ _build
.DS_Store
setup.data
setup.log
*~
*~
.*.sw[po]
._*
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ language: c
script: bash -ex .travis-ci.sh
env:
global:
- OPAM_DEPENDS="lwt cstruct quickcheck ounit pa_ounit"
- CONFIG_FLAGS="--enable-tests --enable-quickcheck --enable-lwt"
- OPAM_DEPENDS="lwt cstruct quickcheck ounit pa_ounit textutils core async"
- CONFIG_FLAGS="--enable-tests --enable-quickcheck --enable-lwt --enable-async"
- FRENETIC_DEPENDS="ocaml-packet"
matrix:
- OCAML_VERSION=4.01.0 OPAM_VERSION=1.1.0
Expand Down
50 changes: 22 additions & 28 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
# OASIS_START
# DO NOT EDIT (digest: 7b2408909643717852b95f994b273fee)
all: build

SETUP = ocaml setup.ml
LWT ?= $(shell if ocamlfind query lwt.unix >/dev/null 2>&1; then echo --enable-lwt; else echo --disable-lwt; fi)
ASYNC ?= $(shell if ocamlfind query async >/dev/null 2>&1; then echo --enable-async; else echo --disable-async; fi)
# Implies --enable-quickcheck
TESTS ?= $(shell if ocamlfind query quickcheck >/dev/null 2>&1; then echo --enable-tests; else echo --disable-tests; fi)

build: setup.data
$(SETUP) -build $(BUILDFLAGS)
NAME=openflow
J=4

doc: setup.data build
$(SETUP) -doc $(DOCFLAGS)
setup.ml: _oasis
oasis setup

test: setup.data build
$(SETUP) -test $(TESTFLAGS)
setup.data: setup.ml
ocaml setup.ml -configure $(LWT) $(ASYNC) $(TESTS)

all:
$(SETUP) -all $(ALLFLAGS)
build: setup.data setup.ml
ocaml setup.ml -build -j $(J)

install: setup.data
$(SETUP) -install $(INSTALLFLAGS)
install: setup.data setup.ml
ocaml setup.ml -install

uninstall: setup.data
$(SETUP) -uninstall $(UNINSTALLFLAGS)
test: setup.ml build
_build/test/Test.byte inline-test-runner openflow

reinstall: setup.data
$(SETUP) -reinstall $(REINSTALLFLAGS)
reinstall: setup.ml
ocamlfind remove $(NAME) || true
ocaml setup.ml -reinstall

clean:
$(SETUP) -clean $(CLEANFLAGS)

distclean:
$(SETUP) -distclean $(DISTCLEANFLAGS)

setup.data:
$(SETUP) -configure $(CONFIGUREFLAGS)

.PHONY: build doc test all install uninstall reinstall clean distclean configure

# OASIS_STOP
ocamlbuild -clean
rm -f setup.data setup.log
100 changes: 68 additions & 32 deletions _oasis
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,32 @@ Synopsis: Serialization library for OpenFlow
Authors: Marco Canini, Nate Foster, Arjun Guha, Mark Reitblatt,
Cole Schlesinger, and Laurent Vanbever
License: LGPL
Plugins: META (0.3), DevFiles (0.3)
Plugins: META (0.3)
BuildTools:
ocamlbuild,
ocamldoc
ocamlbuild

Flag quickcheck
Description: build the openflow.quickcheck library
Default: False
Default: false

Flag lwt
Description: build the openflow.lwt library
Default: False
Default: false

Flag async
Description: build the openflow.async library
Default: false

Library openflow
Path: lib
BuildDepends:
str,
cstruct,
cstruct.syntax,
packet
packet,
core,
sexplib.syntax,
threads
InternalModules:
Bits,
Misc,
Expand All @@ -36,13 +42,39 @@ Library openflow
HighLevelSwitch_common
Modules:
VInt,
OpenFlow_Header,
OpenFlow0x01,
OpenFlow0x01_Core,
OpenFlow0x01_Stats,
OpenFlow0x04,
OpenFlow0x04_Core,
SDN_Types

Library async
Findlibparent: openflow
Findlibname: async
Path: async
Build$: flag(async)
BuildDepends:
async,
openflow,
cstruct.async,
threads,
textutils,
sexplib.syntax
InternalModules:
Async_OpenFlow_Log,
Async_OpenFlow_Message,
Async_OpenFlow_Platform,
Async_OpenFlow_ClientServer,
Async_OpenFlow0x01,
Async_OpenFlow0x04,
Async_OpenFlowChunk,
Async_Highlevel
Modules:
Async_OpenFlow


Library lwt
Findlibparent: openflow
Findlibname: lwt
Expand Down Expand Up @@ -72,33 +104,18 @@ Library quickcheck
Findlibparent: openflow
Findlibname: quickcheck
Path: quickcheck
Build$: flag(quickcheck)
Build$: flag(tests) || flag(quickcheck)
BuildDepends:
quickcheck,
openflow
Modules:
OpenFlow_Arbitrary,
OpenFlow0x01_Arbitrary

Document doc
Title: OpenFlow documentation
Type: ocamlbuild (0.3)
XOCamlBuildPath: lib
XOCamlBuildModules:
OpenFlow0x01,
OpenFlow0x01_Core,
OpenFlow0x01_Stats,
OpenFlow0x01_Switch,
OpenFlow0x01_TxSwitch,
OpenFlow0x01_Platform,
OpenFlow0x04,
OpenFlow0x04_Core,
OpenFlow0x04_Platform,
OpenFlow0x04_Misc

Executable testtool
Path: test
Install: False
Build$: flag(quickcheck) && flag(tests)
Build$: flag(tests)
MainIs: Test.ml
BuildDepends:
packet,
Expand All @@ -110,14 +127,33 @@ Executable testtool
openflow.quickcheck,
quickcheck

Executable test0
Path: test
Install: False
Build$: flag(quickcheck) && flag(tests)
MainIs: Test0.ml
BuildDepends: packet,openflow,openflow.lwt,oUnit,pa_ounit,pa_ounit.syntax

Test all_tests
Command: $testtool inline-test-runner dummy
Command: $testtool inline-test-runner openflow
Run$: flag(quickcheck) && flag(tests)
TestTools: testtool

Executable Hypervisor
Path: examples
MainIs: Hypervisor.ml
Install: False
BuildDepends:
threads,
core,
async,
packet,
cstruct.async,
openflow,
openflow.async

Executable learning_switch
Path: examples
MainIs: Learning_Switch.ml
Install: false
BuildDepends:
threads,
core,
async,
packet,
cstruct.async,
openflow,
openflow.async
89 changes: 70 additions & 19 deletions _tags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: f67bf63e760b489a07a3561d1e1b9dad)
# DO NOT EDIT (digest: cd5e0972635d1a28cbce6bdbb6bc87fb)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
Expand All @@ -15,68 +15,119 @@
"_darcs": not_hygienic
# Library openflow
"lib/openflow.cmxs": use_openflow
<lib/*.ml{,i}>: package(threads)
<lib/*.ml{,i}>: package(core)
<lib/*.ml{,i}>: package(packet)
<lib/*.ml{,i}>: package(sexplib.syntax)
<lib/*.ml{,i}>: package(str)
<lib/*.ml{,i}>: package(cstruct)
<lib/*.ml{,i}>: package(cstruct.syntax)
# Library async
"async/async.cmxs": use_async
<async/*.ml{,i}>: use_openflow
<async/*.ml{,i}>: package(threads)
<async/*.ml{,i}>: package(core)
<async/*.ml{,i}>: package(async)
<async/*.ml{,i}>: package(packet)
<async/*.ml{,i}>: package(cstruct.async)
<async/*.ml{,i}>: package(textutils)
<async/*.ml{,i}>: package(sexplib.syntax)
<async/*.ml{,i}>: package(str)
<async/*.ml{,i}>: package(cstruct)
<async/*.ml{,i}>: package(cstruct.syntax)
# Library lwt
"lwt/lwt.cmxs": use_lwt
<lwt/*.ml{,i}>: use_openflow
<lwt/*.ml{,i}>: package(threads)
<lwt/*.ml{,i}>: package(core)
<lwt/*.ml{,i}>: package(packet)
<lwt/*.ml{,i}>: package(lwt)
<lwt/*.ml{,i}>: package(lwt.unix)
<lwt/*.ml{,i}>: package(lwt.syntax)
<lwt/*.ml{,i}>: package(sexplib.syntax)
<lwt/*.ml{,i}>: package(str)
<lwt/*.ml{,i}>: package(cstruct)
<lwt/*.ml{,i}>: package(cstruct.syntax)
# Library quickcheck
"quickcheck/quickcheck.cmxs": use_quickcheck
<quickcheck/*.ml{,i}>: use_openflow
<quickcheck/*.ml{,i}>: package(threads)
<quickcheck/*.ml{,i}>: package(core)
<quickcheck/*.ml{,i}>: package(packet)
<quickcheck/*.ml{,i}>: package(quickcheck)
<quickcheck/*.ml{,i}>: package(sexplib.syntax)
<quickcheck/*.ml{,i}>: package(str)
<quickcheck/*.ml{,i}>: package(cstruct)
<quickcheck/*.ml{,i}>: package(cstruct.syntax)
# Executable testtool
"test/Test.byte": use_quickcheck
"test/Test.byte": use_openflow
"test/Test.byte": package(threads)
"test/Test.byte": package(core)
"test/Test.byte": package(packet)
"test/Test.byte": package(oUnit)
"test/Test.byte": package(pa_ounit)
"test/Test.byte": package(pa_ounit.syntax)
"test/Test.byte": package(quickcheck)
"test/Test.byte": package(sexplib.syntax)
"test/Test.byte": package(str)
"test/Test.byte": package(cstruct)
"test/Test.byte": package(cstruct.syntax)
<test/*.ml{,i}>: use_quickcheck
<test/*.ml{,i}>: package(quickcheck)
# Executable test0
"test/Test0.byte": use_lwt
"test/Test0.byte": use_openflow
"test/Test0.byte": package(packet)
"test/Test0.byte": package(oUnit)
"test/Test0.byte": package(pa_ounit)
"test/Test0.byte": package(pa_ounit.syntax)
"test/Test0.byte": package(lwt)
"test/Test0.byte": package(lwt.unix)
"test/Test0.byte": package(lwt.syntax)
"test/Test0.byte": package(str)
"test/Test0.byte": package(cstruct)
"test/Test0.byte": package(cstruct.syntax)
<test/*.ml{,i}>: use_lwt
<test/*.ml{,i}>: use_openflow
<test/*.ml{,i}>: package(threads)
<test/*.ml{,i}>: package(core)
<test/*.ml{,i}>: package(packet)
<test/*.ml{,i}>: package(oUnit)
<test/*.ml{,i}>: package(pa_ounit)
<test/*.ml{,i}>: package(pa_ounit.syntax)
<test/*.ml{,i}>: package(lwt)
<test/*.ml{,i}>: package(lwt.unix)
<test/*.ml{,i}>: package(lwt.syntax)
<test/*.ml{,i}>: package(quickcheck)
<test/*.ml{,i}>: package(sexplib.syntax)
<test/*.ml{,i}>: package(str)
<test/*.ml{,i}>: package(cstruct)
<test/*.ml{,i}>: package(cstruct.syntax)
# Executable Hypervisor
"examples/Hypervisor.byte": use_async
"examples/Hypervisor.byte": use_openflow
"examples/Hypervisor.byte": package(threads)
"examples/Hypervisor.byte": package(core)
"examples/Hypervisor.byte": package(async)
"examples/Hypervisor.byte": package(packet)
"examples/Hypervisor.byte": package(cstruct.async)
"examples/Hypervisor.byte": package(textutils)
"examples/Hypervisor.byte": package(sexplib.syntax)
"examples/Hypervisor.byte": package(str)
"examples/Hypervisor.byte": package(cstruct)
"examples/Hypervisor.byte": package(cstruct.syntax)
# Executable learning_switch
"examples/Learning_Switch.byte": use_async
"examples/Learning_Switch.byte": use_openflow
"examples/Learning_Switch.byte": package(threads)
"examples/Learning_Switch.byte": package(core)
"examples/Learning_Switch.byte": package(async)
"examples/Learning_Switch.byte": package(packet)
"examples/Learning_Switch.byte": package(cstruct.async)
"examples/Learning_Switch.byte": package(textutils)
"examples/Learning_Switch.byte": package(sexplib.syntax)
"examples/Learning_Switch.byte": package(str)
"examples/Learning_Switch.byte": package(cstruct)
"examples/Learning_Switch.byte": package(cstruct.syntax)
<examples/*.ml{,i}>: use_async
<examples/*.ml{,i}>: use_openflow
<examples/*.ml{,i}>: package(threads)
<examples/*.ml{,i}>: package(core)
<examples/*.ml{,i}>: package(async)
<examples/*.ml{,i}>: package(packet)
<examples/*.ml{,i}>: package(cstruct.async)
<examples/*.ml{,i}>: package(textutils)
<examples/*.ml{,i}>: package(sexplib.syntax)
<examples/*.ml{,i}>: package(str)
<examples/*.ml{,i}>: package(cstruct)
<examples/*.ml{,i}>: package(cstruct.syntax)
# OASIS_STOP
<lib/*.ml>: syntax_camlp4o
<lwt/*.ml>: syntax_camlp4o
<async/*.ml>: syntax_camlp4o
<test/*.ml>: syntax_camlp4o
<examples/*.ml>: syntax_camlp4o
<of13test/*.ml>: syntax_camlp4o
Loading