2406 Commits

Author SHA1 Message Date
Minoru TAKAHASHI
310397305b test_parser: Regen OFP15 group_desc request packet
Re-generate the packet data by using packet_data_generator2.
(This patch is to complete the TODO of d0733220f3 )

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:39:56 +09:00
Yusuke Iwase
d815eb0f17 test_parser: Add test case for OXS related messages in OF1.5
TODO: Because Open vSwitch (lib/ofp-util) does not support
Extensible Flow Entry Statistics [EXT-334] yet, re-generate
the packet data by using packet_data_generator2 when
Open vSwitch supports it.

Reference: OpenFlow 1.1+ support status of Open vSwitch
https://github.com/openvswitch/ovs/blob/master/OPENFLOW-1.1%2B.md

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:32:51 +09:00
Yusuke Iwase
317d3c4634 ofproto_v1_5_parser: Add OFPFlowDesc support
OpenFlow Spec 1.5 introduce lightweight flow statistics multipart,
rename existing flow statistics as flow description.

This patch add flow description multipart support.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:32:50 +09:00
Yusuke Iwase
c7df2ef4fb ofproto_v1_5_parser: Fix OFPFlowStats/OFPAggregateStats to use OFPStats
OpenFlow Spec 1.5 introduces OXS into flow statistics multipart
and flow aggregate multipart.

This patch fixes these multipart to use OXS.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:32:49 +09:00
Yusuke Iwase
141957fbbd ofproto_v1_5_parser: Fix OFPFlowRemoved to use OFPStats
OpenFlow Spec 1.5 introduces OXS into flow removed message.
This patch fixes flow removed message to use OXS.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:32:48 +09:00
Yusuke Iwase
be1b802c07 ofproto_v1_5_parser: Use b'str' for binary data
Note: ofproto_v1_[034]_parser was done in previous commits.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
50274170a1 ofproto_v1_5_parser: Use six.binary_type instead of buffer
To support Python3, buffer() type need to be replaced with
six.binary_type().

Note: ofproto_v1_[0234]_parser was done in previous commits.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
5e6877b10a test_parser: Add test case for OFP15 group_desc reply
TODO: Because Open vSwitch (lib/ofp-util) does not support OF1.5
group_desc structure [EXT-350] yet, re-generate the packet data by
using packet_data_generator2 when Open vSwitch supports it.

Reference: OpenFlow 1.1+ support status of Open vSwitch
https://github.com/openvswitch/ovs/blob/master/OPENFLOW-1.1%2B.md

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
148cd09792 test_parser: Add expected json representations of OF1.5 GroupMod
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
4dc9a034aa packet_data: Regen
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
fcff174771 packet_data_generator2: Generate OF1.5 GroupMod packets
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
64df2437ee ofproto_v1_5_parser: Support OF1.5 OFPGroupDescStats structure
OpenFlow Spec 1.5 adds properties field which is a list of group
properties.

This patch adds properties field support in group description
multipart reply message.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
09cef6dc1d ofproto_v1_[345]: Fix backward compatibility for OFPGroupDescStats
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
6fe9321485 ofproto_v1_5_parser: Support OF1.5 OFPGroupMod structure
OpenFlow Spec 1.5 adds bucket_id and properties fields.
And also introduces command_bucket_id field which indicates
Bucket Id used as part of the new commands, OFPGC_INSERT_BUCKET
and OFPGC_REMOVE_BUCKET.

This patch adds these fields support and fixes the example of
usage according to this changes.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
7b2c49e822 ofproto_v1_5_parser: Add OFPGroupProp support
OpenFlow Spec 1.5 introduces group property to extend groups.

This patch add group property support.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
9d3e6520a8 ofproto_v1_5_parser: Add OFPGroupBucketProp support
OpenFlow Spec 1.5 introduces group bucket properties to extend
group buckets and redefine bucket fields weight, watch_port and
watch_group as group bucket properties.

This patch adds group bucket properties support and restructures
bucket fields.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:09 +09:00
Yusuke Iwase
1c822d02c1 ofproto_v1_5: Fix a typo
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-08-03 21:31:08 +09:00
FUJITA Tomonori
579383ed75 Ryu 3.24
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v3.24
2015-08-03 13:34:33 +09:00
ISHIDA Wataru
27b7a524d4 ospf: fix serialize() to work with packet.Packet()
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:41:46 +09:00
Minoru TAKAHASHI
65205dcdb0 of1.5: Multipart METER_CONFIG was renamed to METER_DESC
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:31:42 +09:00
Minoru TAKAHASHI
70021b25d7 of1.5: Meter statistics field flow_count was renamed to ref_count
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:31:41 +09:00
Minoru TAKAHASHI
b7b8e2fca3 test_parser: Add test case for OFP15 port_desc request
TODO:Open vSwtich (lib/ofp-util) support OF1.5 port_desc_request, but it has a bug[1].
So, re-generate the packet data by using packet_data_generator2 when Open vSwitch fix the bug.

ref: 1) http://openvswitch.org/pipermail/discuss/2015-July/018253.html

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:31:12 +09:00
Minoru TAKAHASHI
ebb87b4e03 of1.5: port statistics and port descriptions use a common request format
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:31:12 +09:00
Minoru TAKAHASHI
d0733220f3 test_parser: Add test case for OFP15 group_desc request
TODO:Open vSwtich (lib/ofp-util) support OF1.5 group_desc_request, but it has a bug[1].
So, re-generate the packet data by using packet_data_generator2 when Open vSwitch fix the bug.

ref: 1) http://openvswitch.org/pipermail/discuss/2015-July/018253.html

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:31:12 +09:00
Minoru TAKAHASHI
69ef757e4a of1.5: group statistics and group descriptions use a common request format
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:31:12 +09:00
Minoru TAKAHASHI
b57db813b5 test_parser: Add test case for OFP15 queue_desc request
TODO: Because Open vSwitch (lib/ofp-util) does not support queue_desc request,
re-generate the packet data by using packet_data_generator2 when Open vSwitch supports it.

Reference: OpenFlow 1.1+ support status of Open vSwitch
https://github.com/openvswitch/ovs/blob/master/OPENFLOW-1.1%2B.md

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:31:12 +09:00
Minoru TAKAHASHI
57c5a1f88f of1.5: queue statistics and queue descriptions use a common request format
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:31:12 +09:00
Yusuke Iwase
8153510446 ofproto_v1_[2345]_parser: Add items method to OFPMatch/OFPStats
iteritems() was renamed as items() to support Python3.
In accordance with this change, this patch adds items() into
OFPMatch/OFPStats class for convenience.

Reported-by: Ed Kiefer <ehk8@cornell.edu>
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-31 08:30:38 +09:00
Jason Kölker
aa198d6900 Add OVSDB manager protocol application
Allows listening on a socket for OVSDB clients, reacting to their events
and modifying their database.

Co-Authored-By: Chris Hansen <chris.hansen.career@gmail.com>
Co-Authored-By: Ravi Kamachi <ravi.kamachi@rackspace.com>

Signed-off-by: Jason Kölker <jason@koelker.net>
Signed-off-by: Chris Hansen <chris.hansen.career@gmail.com>
Signed-off-by: Ravi Kamachi <ravi.kamachi@rackspace.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-30 16:54:46 +09:00
FUJITA Tomonori
0de43f7b60 OF: send fin/ack in response to fin packet
Calls socket's close().

Reported-by: Guru Chaitanya Perakam <gperakam@Brocade.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Guru Chaitanya Perakam <gperakam@Brocade.com>
2015-07-29 14:57:30 +09:00
Yusuke Iwase
7025a0fd6d packet_data_generator2: Adopt upgrade of ofputil_packet_in
In accordance with the upgrade of ofputil_packet_in structure
in OVS libraries, this patch fixes the usage of struct
ofputil_packet_in when initializing the flow metadata field.

FYI: The appropriate commit on OVS GitHub
50dcbd8ed4

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-25 14:58:48 +09:00
Minoru TAKAHASHI
9aa8e1556c test_ofctl: Add some test cases of OF1.0 actions
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:12:48 +09:00
Minoru TAKAHASHI
10df461c7b ofctl_v1_0: fix output string of ENQUEUE
There is no port information in output string of ENQUEUE in ofctl_v1_0.py
This patch fixes this problem.

Execution example is as follows.

curl -X GET http://localhost:8080/stats/flow/1

{
    "1": [
        {
            "actions": [
                "ENQUEUE:2:3"  # ENQUEUE:<port>:<queue_id>
            ],
            "byte_count": 0,
            "cookie": 0,
            "duration_nsec": 864000000,
            "duration_sec": 107,
            "hard_timeout": 0,
            "idle_timeout": 0,
            "match": {
                "in_port": 5
            },
            "packet_count": 0,
            "priority": 32768,
            "table_id": 0
        }
    ]
}

Reported-by: Weijie Liu <wliu43@illinois.edu>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:12:47 +09:00
Yusuke Iwase
46185c48d9 OXM/OXS: Initialize exp_type with oxm_field
OpenFlow Spec 1.5 mandates that Experimenter OXMs encode the
experimenter type in the oxm_field field of the OXM header
(EXT-380).

Assumption: This can be applied for OXSs too.

This patch initializes exp_type value of _Experimenter class
with oxm_field/oxs_field value.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:01:01 +09:00
Yusuke Iwase
8a638c088f ofproto_v1_5_parser: Add OFPPortDescPropRecirculate class
This class is parser class for OFPPDPT_RECIRCULATE type
in Port Description Properties.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:01:01 +09:00
Yusuke Iwase
142e180b94 ofproto_v1_5_parser: Add OFPPortDescPropOxm class
This class is parser class for OFPPDPT_PIPELINE_INPUT and
OFPPDPT_PIPELINE_OUTPUT type in Port Description Properties.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:01:01 +09:00
Yusuke Iwase
3a9559e042 ofproto_v1_5_parser: Move utility method to OFPPropBase
This patch moves get_rest() and serialize() from OFPTableFeatureProp
to OFPPropBase in order to share it with other subclass.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:01:01 +09:00
Yusuke Iwase
188d47e083 ofproto_v1_[45]_parser: Sort out the inheritance relation of OFP*Prop
This patch sorts out the inheritance relation of properties field class.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:01:01 +09:00
Yusuke Iwase
d885753270 ofproto_v1_[45]_parser: Correct example of OFPPortMod
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:01:01 +09:00
Yusuke Iwase
8cb9b9a67a ofproto_v1_[45]_parser: Rename Port Description Properties class
To reflect the name of struct ofp_port_desc_prop_* in OpenFlow Spec 1.4/1.5,
this patch renames "OFPPortProp" to "OFPPortDescProp".

e.g.) in OpenFlow Spec 1.4
  struct ofp_port_desc_prop_header {
      uint16_t type;    /* One of OFPPDPT_*. */
      uint16_t length;  /* Length in bytes of this property. */
  };

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:01:01 +09:00
Yusuke Iwase
7e313b90fd ofproto_v1_5_parser: Enable setting mask in OFPActionSetField
OpenFlow Sepc 1.5 allows wildcard to be used in set-field
action (EXT-314).
This patch enables setting mask in set-field action.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 19:00:18 +09:00
Yusuke Iwase
ecb1d55607 ofproto_v1_5_parser: Add OFPActionCopyField support
OpenFlow Spec 1.5 introduces Copy-Field action which allows to copy
the value from one header or pipeline field into another header or
pipeline field (EXT-320).

This patch add Copy-Field action support.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 13:56:08 +09:00
Yusuke Iwase
00a920c440 ofproto_v1_5_parser: Add OFPInstructionStatTrigger support
OpenFlow Spec 1.5 introduces new instruction OFPIT_STAT_TRIGGER
to define a set of statistics thresholds using OXS (EXT-335).

This patch adds OFPIT_STAT_TRIGGER instruction support.

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-22 13:56:07 +09:00
Takeshi
c7bf2707df add host restful api
Signed-off-by: Takeshi <a86487817@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-18 15:28:49 +09:00
Takeshi
af63e5f519 add host discovery functions
Signed-off-by: Takeshi <a86487817@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-18 15:28:46 +09:00
Takeshi
b5c4b9ae51 ignore lldp packet to avoid wrong links
Signed-off-by: Takeshi <a86487817@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-10 11:23:48 +09:00
FUJITA Tomonori
7d37e33b5b bgp: fix withdrawn label handling again
The commit fba7213 is incomplete; doesn't parse properly so crashes
when serializing.

Reported-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
2015-07-09 10:54:12 +09:00
Takeshi
4175f99a34 ignore lldp packet to avoid wrong links
Signed-off-by: Takeshi <a86487817@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-09 05:51:08 +09:00
FUJITA Tomonori
607eeb0c7e declare python3 support
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-08 13:02:49 +09:00
ISHIDA Wataru
fba7213421 bgp: fix bug of not taking care of withdrawn label
Reported-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2015-07-06 15:48:58 +09:00