ofproto-dpif: refactor rule_dpif_lookup() for table miss whose id > 0

The refactored function, rule_dpif_miss_rule(), will be used for
handling table miss whose table_id > 0 by goto-table instruction.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-util: Allow decoding of Open Flow 1.2 Flow Statistics Request Messages

Allow decoding of Open Flow 1.1 and 1.2 flow statistics request messages.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-msgs: Split OFPRAW_OFPST_AGGREGATE_REQUEST

Split OFPRAW_OFPST_AGGREGATE_REQUEST into OpenFlow 1.0 and 1.1+
versions.

This should be sufficient to allow adding encoding and decoding of
Open Flow 1.1 and 1.2 Aggregate Stats Request messages.

Encoding and decoding of Open Flow 1.1 and 1.2 Aggregate Stats Response
messages works using the existing code without modification.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovs-ofctl: Use vconn as a parameter of dump_stats_transaction()

In order to form a stats message for the prevailing OpenFlow version
of a vconn the vconn needs to be open at the time the request is
encoded. Thus there is no longer a case where it makes sense to
use dump_stats_transaction() without a vconn already being open and
available to pass as a parameter.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-msgs: Allow encoding and decoding of Open Flow 1.1 & 1.2 Barrier Messages

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: Make OFPP_TABLE send packet-in on miss.

The OpenFlow specification for OFPP_TABLE implies that a miss
should generate a packet-in, but Open vSwitch has never done
that.  This corrects the behavior.

This also prepares for the goto-table instruction, which will
need to generate a table-miss in some circumstances.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
[blp@nicira.com rebased and updated commit message]
Signed-off-by: Ben Pfaff <blp@nicira.com>
vswitchd: Respect other_config:stp-enable port setting.

Commit a699f614 (lib: Utilize smaps in the idl.) broke the
other_config:stp-enable port setting in two ways.  First, it
changed the default if the setting was missing to disabled.
Second, if the setting was present, it did the opposite of what the
user configured.

Bug #13122.
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib/ofp-util: preparation for OF12 of ofp-util

Add necessary macros to ofp-util for OF12 support.
This is just a place holder.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>

---

v3
* No change

v2
* No change

v1  [Isaku Yamahata]
* Initial Post
lib/ofp-actions: make ofpact_reg_load.value mf_value from uint64_t

set_field action needs more than 64 bits value unlike nx_reg_load action.
This is preparation for set_field action. mf_value will be used later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>

---

v3
* No change

v2 [Isaku Yamahata]
* First post
lib/ofp-actions: helper functions for of12 set-field action

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>

---

v3 [Simon Horman]
* Add (now) missing cases to nxm_reg_load_check()

v2 [Isaku Yamahata]
* First post
ofp-actions: plumb of12 actions support

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>

---

v3 [Simon Horman]
* Manual Rebase
* Make use of enum ofp_version

v2 [Isaku Yamahata]
* First post
ofp-actions: encode OF12 output/set-field actions

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>

---

v3 [Simon Horman]
* Manual Rebase
  - Add ofpacts_put_openflow12_instructions() and
    ofpacts_put_openflow11_actions(), this seems to be in keeping
    with the intention of the previous version of this patch.

v2 [Isaku Yamahata]
* Initial post