1808 Commits

Author SHA1 Message Date
Yoshihiro Kaneko
fe8d8e27c5 app/rest_qos: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 15:53:02 +09:00
Yoshihiro Kaneko
6ab117db4f add pep8 options to tox.ini
Add the pep8 section to tox.ini and specify ignoring E113.
Many E113 errors appeared on comments. It seems a bug of pep8, so it can be ignored.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 15:39:33 +09:00
Yoshihiro Kaneko
857ec0c019 tests/unit: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:20:58 +09:00
Yoshihiro Kaneko
bd61cd5dd1 tests: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:20:58 +09:00
Yoshihiro Kaneko
c468fdd126 services/protocols: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:20:58 +09:00
Yoshihiro Kaneko
039f9a154c lib/xflow: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:20:58 +09:00
Yoshihiro Kaneko
c38270ce12 lib/packet: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:20:57 +09:00
Yoshihiro Kaneko
853bdeb1c3 lib/of_config: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:20:08 +09:00
Yoshihiro Kaneko
3f46c5a2ff lib: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:19:16 +09:00
Yoshihiro Kaneko
16839dfc68 controller: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:19:16 +09:00
Yoshihiro Kaneko
89a428b10b app: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:19:16 +09:00
Yoshihiro Kaneko
f295487bef topology/switches: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:19:16 +09:00
Yoshihiro Kaneko
f79634b3c7 base/app_manager: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:19:16 +09:00
Yoshihiro Kaneko
df8f807e13 ofproto: fix pep8
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-14 13:19:16 +09:00
Kiyonari Harigae
01bf2ca349 Added rest_qos module
This module is intended for operation in a pipeline on a flow table.
It supports setting of the queue, (Currently, only support
OpenvSwitch), packet marking, queuing, regitation to meter table,
perform this simple QoS.

Signed-off-by: Kiyonari Harigae <lakshmi@cloudysunny14.org>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-13 14:43:22 +09:00
ISHIDA Wataru
abafab9149 packet/bgp: bug fix of route target nlri class
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:57 +09:00
ISHIDA Wataru
b65d6dc315 bgp: fix bug of accessing dead socket
BGP session can be closed by sending inappropriate messages.
So touching socket by get_peername() after sending messages may cause an
exception. Though we can handle this by try..exception, I fixed to simply
call get_peername() before sending messages because session disconnection by
sending messages is an ordinary procedure and not an exception(the peer will
send notification before disconnection).

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:57 +09:00
ISHIDA Wataru
2430fc7c17 bgp: improve how to show rib
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
ISHIDA Wataru
e3a3c7dc0c 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-05-10 01:14:56 +09:00
ISHIDA Wataru
4f8d7a1411 packet/bgp: enhanced route refresh support
Enhanced Route Refresh(draft-ietf-idr-bgp-enhanced-route-refresh) uses
reserved fields in a Route Refresh message as demarcation fileds.

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
ISHIDA Wataru
c560908633 packet/bgp: fix bug in serializing AS PATH path attribute
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
ISHIDA Wataru
7c1410ccf6 bgp: add ssh client
add ssh client which has basic bash keybinds and tab complement.
to use, you have to create ssh key at first then specify the location of
the key in ryu configuration files.

configuration file will be like this.

> ryu.conf
> ==
> [DEFAULT]
> cli_ssh_hostkey=/home/user/.ssh/id_rsa

after this, run operator/ssh.py with application.py

$ ryu-manager --config-file=ryu.conf application.py operator/ssh.py

you can login by

$ ssh ryu@localhost -p 4990

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
ISHIDA Wataru
eb488e3cb3 bgp: fix wrong module path
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
ISHIDA Wataru
ca923a35bf packet/bgp: add helper methods to nlri class for bgp ssh client
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
ISHIDA Wataru
1d97ac1727 bgp: don't block at start method
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
ISHIDA Wataru
6da9cf0187 bgp: bug fix when the peer initiated the connection.
set binded ip and port properly regardless of the direction of connection

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
ISHIDA Wataru
2d00b7d424 bgp: remove unnecessary log message
update msg without MpReachNlri or MpUnReachNlri is now normal

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-10 01:14:56 +09:00
Yuichi Ito
aad58663c0 set default attributes for OFPPortMod
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
2014-05-10 00:17:12 +09:00
Yuichi Ito
bee4846bc2 sw test tool: pylint
W:546,14: Access to a protected member _send_msg of a client class (protected-access)

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
2014-05-10 00:17:12 +09:00
Yuichi Ito
5e60f0250c sw test tool: Remove unused codes
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
2014-05-10 00:17:12 +09:00
Yuichi Ito
f7ca84d4ce sw test tool: Reduce similar methods
- _test_flow_install()
 - _test_meter_install()

are merged as

 - _test_msg_install()

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
2014-05-10 00:17:12 +09:00
Kiyonari Harigae
882c28820f Added queue stats request
Here is added queue status request to ofctl.

Signed-off-by: Kiyonari Harigae <lakshmi@cloudysunny14.org>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-09 23:57:17 +09:00
Kiyonari Harigae
73674f4631 Added ovs-vsctl commands of QoS-related
Here is added the command of QoS-related, such as the following:

ovs-vsctl -- set port eth1 qos=@newqos \
 -- --id=@newqos create qos type=linux-htb other-config:max-rate=30000000 queues=0=@q0,1=@q1 \
 -- --id=@q0 create queue other-config:min-rate=1000000 other-config:max-rate=1000000 \
 -- --id=@q1 create queue other-config:min-rate=2000000 other-config:max-rate=2000000

Also, operation that delete QoS is supported.
Note that It supports only deletion of relationships with QoS record.

Signed-off-by: Kiyonari Harigae <lakshmi@cloudysunny14.org>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-05-09 23:57:16 +09:00
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