1775 Commits

Author SHA1 Message Date
FUJITA Tomonori
4c72789a1c Ryu 3.9
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v3.9
2014-05-01 17:49:39 +09:00
Yuichi Ito
56528cfd00 sw test tool: Modify lengths of pad fields for ARP
Wireshark may misunderstand a MAC frame (including ARP) whose length is 64 bytes or more, as a frame with the FCS field.
This patch fixes the issue by modifying lengths of pad fields for ARP.

This patch modifies lengths of pad fields as follows:

 - Add 18 bytes for MAC frames (including ARP, without VLAN/MPLS/PBB).
 - Add 18 bytes for MAC frames related to POP_MPLS/POP_PBB.

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:44 +09:00
Yuichi Ito
8ac3968af4 sw test tool: Revert changes of test files
This reverts commit d1b9e371dbfd130cf6685046de287bfd79d8a164.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:43 +09:00
Simon Horman
a6f5109f07 tests/integrated: Enable MPLS set-field and push MPLS tests
Enable disabled MPLS tests, they appear to be supported by Open vSwitch.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the set NW TTL action.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:33 +09:00
Simon Horman
55ec423e25 tests/integrated: Match on MPLS dl_type for flows with MPLS TTL actions
OpenFlow 1.2 section 6.7 describes inconsistent action in a flow
as an action whose operation is inconsistent with the flows match.

In terms of the above MPLS TTL actions are inconsistent if the flow
does not match on one of the MPLS dl_types.

This patch add such a match for the flows that have MPLS TTL actions.

Also enable these tests, they appear to be supported by Open vSwitch.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the set NW TTL action.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:33 +09:00
Simon Horman
f6e1fa4c57 tests/integrated: Match on MPLS dl_type for flows with pop MPLS actions
OpenFlow 1.2 section 6.7 describes inconsistent action in a flow
as an action whose operation is inconsistent with the flows match.

In terms of the above pop MPLS actions are inconsistent if the flow
does not match on one of the MPLS dl_types.

This patch add such a match for the flow that has a pop MPLS action.

Also enable the pop MPLS test, it appears to be supported by Open vSwitch.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the set NW TTL action.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:33 +09:00
Simon Horman
9e5e9ce56c tests/integrated: Match on IP dl_type for flows with set IPv6 addresses
OpenFlow 1.2 section 6.7 describes inconsistent action in a flow
as an action whose operation is inconsistent with the flows match.

In terms of the above the set-field actions for IPv6 addresses are
inconsistent if it the flow does not match on the IPv6 dl_type.

This patch add such a match for those that have set-field actions
for IPv6 addresses.

Also enable these tests, they appear to be supported by Open vSwitch.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the set NW TTL action.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:33 +09:00
Simon Horman
a88bdffab3 tests/integrated: Enable ARP tests
Enable ARP tests, they appear to be supported by Open vSwitch.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the set NW TTL action.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:33 +09:00
Simon Horman
d5e433ee04 tests/integrated: Match on IP dl_type for flows with set NW TTL actions
OpenFlow 1.2 section 6.7 describes inconsistent action in a flow
as an action whose operation is inconsistent with the flows match.

In terms of the above the set NW TTL action is inconsistent if
it the flow does not match on the IPv4 or IPv6 dl_type because
the action manipulates either the IPv4 TTL or the IPv6 hop limit.

This patch splits the testing of the set NW TTL action into two tests,
one for each of IPv4 and IPv6, including a match on the corresponding
dl_type in the flow.

Also enable these tests, they appear to be supported by Open vSwitch.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the set NW TTL action.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:33 +09:00
Simon Horman
ec02de8d7a tests/integrated: Match on VLAN tag for flows which set VLAN tags
OpenFlow 1.2 section 6.7 describes inconsistent action in a flow
as an action whose operation is inconsistent with the flows match.

In terms of the above a set-field action for a VLAN tag is considered
inconsistent if it the flow does not match on a VLAN tag.

This patch add such a match for the flow that has a set-field action
for a VLAN tag.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for set-field actions for
VLAN tags.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:26 +09:00
Simon Horman
756521f0b4 tests/integrated: Match on VLAN tag for flows with pop VLAN TTL actions
OpenFlow 1.2 section 6.7 describes inconsistent action in a flow
as an action whose operation is inconsistent with the flows match.

In terms of the above the pop ttl action is considered inconsistent if
it the flow does not match on a VLAN tag.

This patch add such a match for the flow that has a pop VLAN action.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the pop VLAN TTL action.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:26 +09:00
Simon Horman
47856c381c tests/integrated: Match on IP dl_type for flows with dec NW TTL actions
OpenFlow 1.2 section 6.7 describes inconsistent action in a flow
as an action whose operation is inconsistent with the flows match.

In terms of the above the dec NW TTL action is inconsistent if
it the flow does not match on the IPv4 or IPv6 dl_type because
the action manipulates either the IPv4 TTL or the IPv6 hop limit.

This patch splits the testing of the dec NW TTL action into two tests,
one for each of IPv4 and IPv6, including a match on the corresponding
dl_type in the flow.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces action consistency for the dec NW TTL action.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:49:26 +09:00
Simon Horman
1d1c3b8751 tests/integrated: Do not verify buffer_id of packet_in resulting from packet_out
When a packet_in message results from a packet_out message
there is no particular relationship between the buffer_ids of
the two messages.

I noticed this when using Open vSwitch's "make ryu-check".

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-25 18:41:16 +09:00
Yuichi Ito
d1b9e371db sw test tool: Modify lengths of pad fields for ARP
Wireshark may misunderstand a MAC frame (including ARP) whose length is 64 bytes or more, as a frame with the FCS field.
This patch fixes the issue by modifying lengths of pad fields for ARP.

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-24 23:10:03 +09:00
takahashi.minoru
9c5e9288cc packet lib: ipv6: support Routing header (type3)
Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-24 23:09:41 +09:00
Yuichi Ito
0f8407a9ce sw test tool: Fix MAC addresses used in tests
IEEE 802.3-2012 (3.2.3 Address fields) says:

 b) The first bit (LSB) shall be used in the Destination Address field as an address type designation bit
    to identify the Destination Address either as an individual or as a group address. If this bit is 0, it
    shall indicate that the address field contains an individual address. If this bit is 1, it shall indicate that
    the address field contains a group address that identifies none, one or more, or all of the stations
    connected to the LAN. In the Source Address field, the first bit is reserved and set to 0.
 c) The second bit shall be used to distinguish between locally or globally administered addresses. For
    globally administered (or U, universal) addresses, the bit is set to 0. If an address is to be assigned
    locally, this bit shall be set to 1. Note that for the broadcast address, this bit is also a 1.

This patch fixes MAC addresses used in tests as follows:

 - set the first bit to 0
 - set the second bit to 1

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-24 23:09:34 +09:00
Simon Horman
4a38237357 tests/integrated: Use table_id greater than the current table for goto-table instruction
For a goto-table instruction use a table_id greater than the table in which
a flow will be inserted.  OpenFlow 1.2 section 5.6 stipulates that this is
required.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces the above stipulation.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-24 23:09:24 +09:00
Simon Horman
9664f3b9e3 tests/integrated: Specify table_id for flow_mod modify tests
Use actual table ids rather than OFPTT_ALL for
flow_mod modify tests as OpenFlow 1.2 section A3.4.1
stipulates that OFPTT_ALL is only valid for flow_mod delete requests.

I noticed this when using Open vSwitch's "make ryu-check" as
Open vSwitch enforces the above stipulation.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-24 23:09:17 +09:00
FUJITA Tomonori
66759d76dd bgp: fix connect timeout error
RROR 2014-04-23 11:54:59,239 hub 58 hub: uncaught exception: Traceback (most recent c\
all last):
  File "/Users/fujita/git/ryu/ryu/lib/hub.py", line 50, in _launch
    func(*args, **kwargs)
  File "/Users/fujita/git/ryu/ryu/services/protocols/bgp/base.py", line 239, in start
    self._run(*args, **kwargs)
  File "/Users/fujita/git/ryu/ryu/services/protocols/bgp/peer.py", line 448, in _run
    self._connect_loop(client_factory)
  File "/Users/fujita/git/ryu/ryu/services/protocols/bgp/peer.py", line 820, in _conne\
ct_loop
    bind_address=bind_addr)
  File "/Users/fujita/git/ryu/ryu/services/protocols/bgp/base.py", line 354, in _conne\
ct_tcp
    return sock
UnboundLocalError: local variable 'sock' referenced before assignment

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-24 07:32:06 +09:00
FUJITA Tomonori
ce1c6c0c1e bgp: add __init__.py files
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-24 07:32:04 +09:00
takahashi.minoru
b47fa61dd3 packet lib: ipv6: Fix to calculate AH length
RFC2402 says:

    All IPv6 extension headers, as per RFC 1883, encode the "Hdr Ext Len" field by first
    subtracting 1 (64-bit word) from the header length (measured in 64-bit words).
    AH is an IPv6 extension header.  However, since its length is measured in 32-bit words,
    the "Payload Length" is calculated by subtracting 2 (32 bit words).

This patch fixes as follows:

    return (int(size) - 1) * 8 ->
    return (int(size) + 2) * 4
                      ^ ^    ^
And, this patch also fixes a default argument of length.

Signed-off-by: TAKAHASHI Minoru <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 22:22:58 +09:00
ISHIDA Wataru
57166dc485 bgp: fix pep8
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
8bda92da85 bgp: add sample configuration file
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
4488761fb5 bgp: improve log visibility
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
d8407d445d bgp: avoid the trouble of having to explicitly specify IDs in configuration
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
8b07123c91 bgp: enable to use system IP addr implicitly for binding
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
ce33b61a1f bgp: enable default label range
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
d262c1bcb6 bgp: make bgpspeaker RyuApp
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
3a4f092de5 bgp: use ryu.lib.hub instead of the direct use of eventlet
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
68c13b7fa1 bgp: clean up codes which constructs an update message
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:35 +09:00
ISHIDA Wataru
2eccc5da41 bgp: fix typo
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 20:55:34 +09:00
FUJITA Tomonori
128fd85c13 remove obsolete man pages (rpc_cli and neutron_ofagent_agent)
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 19:07:22 +09:00
FUJITA Tomonori
28f6f6020a delete bin/neutron-ofagent-agent
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-04-21 19:06:25 +09:00
FUJITA Tomonori
78d0b08048 delete ryu/tests/bin/of-config-cli
This command is available via ryu command.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 19:05:47 +09:00
FUJITA Tomonori
95fa2d63d4 delete bin/rpc-cli
This command is available via ryu command.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-21 19:05:46 +09:00
YAMAMOTO Takashi
86da3d9939 document ryu command
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-04-20 21:00:57 +09:00
YAMAMOTO Takashi
769fb62ca9 add bin/ryu to PYLINT_INCLUDE
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
2014-04-20 21:00:56 +09:00
YAMAMOTO Takashi
ce2f39a720 add bin/ryu
this new command takes a sub-command name as its first positional argument
and passes the rest of arguments to the corresponding sub-module.
for example, 'run' sub-command is an equivalent to bin/ryu-manager.

this commit does not replace the existing commands like ryu-manager.
this merely adds new ways to invoke the functionalities.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-20 21:00:51 +09:00
YAMAMOTO Takashi
7d1fcd7581 pip-requires: require oslo.config >= 1.2.0
specifically we want their commit de803cdf
(Change-Id: If712e1d51c1e1329093acb16ed6a84e9f0baf8c1)
for stable order of cli options.
the following sub-command commits rely on it.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-20 20:59:14 +09:00
YAMAMOTO Takashi
e88529f966 allow overriding argv and progname
this will be used by the comming 'ryu' command.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-20 20:59:14 +09:00
YAMAMOTO Takashi
186da7eb78 ryu.cfg: re-export some more stuff for convenience
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-20 20:59:14 +09:00
Yuichi Ito
51ec3d2d7b sw test tool: Fix to compare OFPMatch using masks without byte boundary
Mask lengths without byte boundary are fixed as follows:

 - VLAN_VID, from 16 bits (2 bytes) to 12 + 1 bits
 - IPV6_EXTHDR, from 16 bits (2 bytes) to 9 bits

Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-18 18:42:49 +09:00
ISHIDA Wataru
660c8e68b4 bgp: remove original bgp packet library
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-17 08:38:43 +09:00
ISHIDA Wataru
9d5e66fa4e bgp: use ryu bgp packet library instead of original one
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-17 08:38:43 +09:00
ISHIDA Wataru
bdad6267de bgp: add stuff for integration with bgp speaker
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-17 08:38:43 +09:00
FUJITA Tomonori
a1fe3d92db Rename to CONTRIBUTING.rst
This makes the GitHub interface aware of the contribution guidelines,
so it will be displayed to contributors when they submit issues or
pull requests.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-16 15:56:59 +09:00
Yuichi Ito
f4d3c5616d of14: set default attributes for group-related classes
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-16 15:11:25 +09:00
Yuichi Ito
f516474c10 of13: set default attributes for group-related classes
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-16 15:11:23 +09:00
Yuichi Ito
97e8827681 of12: set default attributes for group-related classes
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-16 15:11:22 +09:00
Yuichi Ito
d083895961 sw test tool: Correct the comparison method to treat matches as the set
OF 1.3.3 spec (3 Glossary) says:

    Flow Entry: an element in a flow table used to match and process packets. It contains a set of
    match fields for matching packets, a priority for matching precedence, a set of counters to track
    packets, and a set of instructions to apply (see 5.2).

According to OF spec, the match fields are treated as the set.
This means that the order of matches which flow_stats message returns is inconsistant.
This patch corrects the comparison method of matches by sorting in a particular order before comparison.

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-04-15 14:54:14 +09:00