ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Table Statistics Request Messages

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v13 (draft 2)
* Don't make use of a union of different ofpX_table_stats structures.
  Rather, use ofp12_table_stats and convert using new ofputil functions
  as necessary.

v12
* No change

v11
* No change

v10
* No change

v9
* Set wildcards, match, write_setfields and apply_setfields based
  on a bitmap of (1 << OFPXMT_*)

v8
* Manual rebase
* Make use of enum ofp_version
* Add ofp-tests

v7
* Omitted

v6
* No change

v5
* Manual rebase
* Add OFPST_TABLE entry for Open Flow 1.1 and 1.2 to ofputil_msg_types,
  this wires-up decoding of table statistics messages.

v4
* Initial post

table test
ofp-msgs: Split OFPRAW_OFPST_PORT_{REQUEST,REPLY}

Split OFPRAW_OFPST_PORT_{REQUEST,REPLY} into OpenFlow 1.0 and 1.1+
versions.

This prepares for encoding and decoding Open Flow 1.1 and 1.2 Port Stats
Request and Reply messages.

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* No change

v9
* Update description - this only prepares for both encoding and decoding
* Move tests to "ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port
  Reply Messages" as this is just a preparatory patch.

v8
* Initial post
ovs-ofputil: Make str_to_port_no() aware of invalid ports

Open Flow 1.1 and 1.2 make use of 32 bit ports,
however Open vSwtich maps them to 16 bits. Make
ovs-ofputl aware of this.

Also, only accept ports that fit into 16 bits
for Open Flow 1.0.

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* No change

v9
* Manual Rebase

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial post
ofp-util: Pass vconn to fetch_port_by_features()

Pass vconn to fetch_port_by_features() and callers.
In some cases this will reduce the number of connections
that ovs-ofputil sets up.

It should not alter the behaviour of ovs-ofputil.

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* No change

v9
* Manual rebase

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial post
ofp-util: Allow encoding of Open Flow 1.1 & 1.2 Port Statistics Reply Messages

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* No change

v9
* Move print test to "ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port
  Reply Messages"

v8
* Manual rebase
* Make use of enum ofp_version
* Add ofp-print test

v7
* Omitted

v6
* No change

v5
* No change

v4
* Initial post

fix port test
ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port Reply Messages

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* No change

v9
* Make use of enum ofp_version
* Add ofp-print test
* Correct printing of port number for Open Flow 1.0
* Replace UINT64_MAX with htonll(UINT64_MAX) in ofp_print_port_stat()
  to correct byte-order problem detected by sparse

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial Post
ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Port Status Request Messages

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* No change

v9
* Manual Rebase
* Make use of enum ofp_version

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial Post
ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port Status Request Messages

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* No change

v9
* Manual Rebase
* Make use of enum ofp_version
* Change title from "ofp-print: Allow display of Open Flow 1.1 & 1.2 Port Status
  Request Messages" to "ofp-print: Allow printing of Open Flow 1.1 & 1.2 Port Status
  Request Messages"
* Add ofp-print test

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial Post
ovs-ofctl: Teach dump-ports about Open Flow 1.1 & 1.2

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* No change

v9
* Initial post
ofp-msgs: Split OFPRAW_OFPST_QUEUE_{REQUEST,REPLY}

Split OFPRAW_OFPST_QUEUE_{REQUEST,REPLY} into OpenFlow 1.0 and 1.1+
versions.

This prepares for encoding and decoding Open Flow 1.1 and 1.2 Queue Stats
Request and Reply messages.

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* Initial Post
ofp-print: Enable display of Open Flow 1.1 & 1.2 Queue Status Reply Messages

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* Make use of enum ofp_version
* Add ofp-print test

v9
* Omitted

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial Post
ofp-util: Allow encoding of Open Flow 1.1 & 1.2 Queue Stats Reply Messages

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* Manual rebase
* Make use of enum ofp_version

v9
* Omitted

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial Post
ofp-util: Allow decoding of Open Flow 1.1 & 1.2 Queue Stats Request Messages

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* Make use of enum ofp_version

v9
* Omitted

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial Post
ovs-print: Enable display of Open Flow 1.1 & 1.2 Queue Stats Request

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* Manual rebase
* Make use of enum ofp_version
* Change subject name from "ovs-print: Enable display of Open Flow 1.1 &
  1.2 Queue Stats Response" to "ovs-print: Enable display of Open Flow 1.1
  & 1.2 Queue Stats Request"
* Add ofp-print test
* Use ofputil_port_from_ofp11 to decode port number

v9
* Omitted

v8
* Omitted

v7
* Omitted

v6
* No change

v5
* Initial Post
ovs-ofpctl: Enable queue-stats for Open Flow 1.1 & 1.2

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* No change

v10
* Manual rebase
* Make use of enum ofp_version

v9
* Omitted

v8
* Omitted

v7
* Omitted

v6
* The queue_id variable in do_dump_aggregate() should be uint32_t not
  uint16_t.

v5
* Initial Post
ofp-msgs: Update for OpenFlow 1.1 & 1.2 Port Desc Stats

* Split OFPRAW_OFPST_PORT_DESC_REPLY into OpenFlow 1.0
  and OpenFlow 1.1+ versions.
* Allow OFPRAW_OFPST_PORT_DESC_REQUEST to be used for
  OpenFlow 1.0+ instead of only OpenFlow 1.0.

This appears to be necessary and sufficient to allow encoding of Port Desc
Stats reply messages and decoding of Port Desc Stats request messages. Or
in other words both the client and server side of ovs-ofctl dump-ports-desc

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* Initial post
ofproto: Use OFPERR_OFPFMFC_TABLE_FULL for OpenFlow 1.1+

Use OFPERR_OFPFMFC_ALL_TABLES_FULL in place of
OFPERR_OFPFMFC_TABLE_FULL for OpenFlow 1.1+.

OFPERR_OFPFMFC_ALL_TABLES_FULL only exists in OpenFlow 1.0.
OFPERR_OFPFMFC_TABLE_FULL was added in OpenFlow 1.1.

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* Initial post
ofproto: Do not add flow on flow mod if new_cookie is UINT64_MAX

Internally a new_cookie value UINT64_MAX is used for
an OpenFlow 1.2 flow mod whose command is not Add.
Open Flow 1.2 does not permit adding flows for such commands.
Also, UINT64_MAX is a prohibited cookie value, and the
existing code created a flow with that value as for the cookie.

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v13
* Fix endienness issues in modify_flows_add()

v12
* No change

v11
* Initial post
ofp-print: Do not display flow mod cookie if it is UINT64_MAX

Internally UINT64_MAX is used to denote that the cookie
should not be changed, so it seems appropriate
to omit this value when pretty printing flow mods.

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* Initial post
ofp-util: Correct setting of Flow Mod cookie on encode

When the command of a Flow Mod messages is ADD the cookie should be set as
fm->cookie, internally this is the new cookie value to be set. Otherwise it
should be set as fm->cookie, internally this is the cookie value to match.

Also remove 'XXX' marker from the matching code in the decoder.
I am now comfortable with the implementation.

Signed-off-by: Simon Horman <horms@verge.net.au>

---

v12
* No change

v11
* Initial post