test: simplify integrated OVS test suite

This patch simplifies integrated OVS test suite. Currently, we wait
for a barrier response before moving to the next test. However, we
don't need. The logic works like the following:

sending a flow mod (deleting all the flows)
sending a barrier
sending a flow mod (set up a flow to test)
sending a barrier
sending a flow stats

Then the reply handler for flow stats verifies the result and move to
the next.

You can run a test suite like:

$ ryu-manager ~/git/ryu/ryu/tests/integrated/test_add_flow_v12_actions.py

We can try two more suites:

ryu/tests/integrated/test_add_flow_v10.py
ryu/tests/integrated/test_add_flow_v12_matches.py

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.2: handle unknown match field properly

Ryu crashes when it finds an unknown match field in OFPMatch. Instead,
Ryu should just ignore it and continue to parse.

With this patch, Ryu uses OFPmatchField class for an unknown match
field and continue to parse.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Simon Horman <horms@verge.net.au>
Ryu 1.1

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Add SubmittingPatches doc

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test: specify OF version in integrated test suite

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
rename ryu/ofproto/in.py to ryu/ofproto/inet.py

Avoid a reserved word.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
add IPPROTO_SCTP constant

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
clean up IPPROTO_ constants

Use ofproto/inet.py.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test: fix SET_NW_TOS action in test_add_flow_v10

The lowest two bits must be zero.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
add ethernet type constants

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
clean up ETH_TYPE_ constants

Use ofproto/ether.py

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
of1.2: pretty OFPGetConfigReply parser

Make OFPGetConfigReply parser consistent with the rest

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of: Fix OFPEchoRequest serialize

The spec allows zero-length data.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Simon Horman <horms@verge.net.au>
test: add stats and config tests to integrated test suite

Run this in the following way:

$ ryu-manager ryu/ryu/tests/integrated/test_request_reply_v12.py

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
controller: print backtrace when exception in addition to stacktrace

This is useful when debugging. it's difficult to debug without
backtrace.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
add packet library

As discussed on the mailing list, there is no good packet library
(parses and builds various protocol packets). dpkt isn't flexible
enough (can't nicely handle stacked protocols such as vlan, mpls,
gre). NOX's one is nice but released under GPL3.

So we need our own packet library.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test: use the latest version of pep8

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
fix pep8 1.3.3 warnings

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
test: fix pep8 1.3.3 warnings

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
of1.2: fix ofp_port_stats pack format

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>