connmgr: Remove unnecessary reason fixup logic

A packet_in message may be sent for one of two reasons.

1. As the result of an controller action supplied in a rule.
   This is executed if a packet matches the match for the rule.
   The packet_in reason is explicitly part of the action and
   is thus correct.

2. As the result of the failure to match a packet against any rule.
   In this case a rule present in TBL_INTERNAL is used. This rule
   has the packet_in reason set to OFPR_NO_MATCH.

   This is the behaviour described in OpenFlow 1.1 and 1.2 when
   a miss occurs. And to date it is the behaviour provided
   by Open vSwtich for all OpenFlow versions.

   When this behaviour is in effect OFPR_NO_MATCH is the desired
   packet_in reason and by virtue of the TBL_INTERNAL rule described
   above is always that value.

So for both cases the packet_in reason is always correct.
And following this reasoning there seems to be no need to fix it up.

What there is a need for, which this patch does not address, is for packets
to be dropped rather than forwarded to OpenFlow1.3 controllers when a miss
occurs and an alternate behaviour has not been selected using Table Mod. I
plan to address this in subsequent patches.

As well as not been necessary, I believe that the logic that this patch
removes has not been executed because pin->generated_by_table_miss is never
true without a separate patch that I have proposed, "ofproto-dpip: Set
generated_by_table_miss for miss rule".  So I do not expect there to be any
run-time affect of this change.

This patch does not remove pin->generated_by_table_miss, although it
is now set but never used, as I plan to use when implementing the
OpenFlow1.3 drop-on-miss behaviour described above.

Cc: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Simon Horman <horms@verge.net.au>
ofproto-dpip: Set generated_by_table_miss for miss rule

An assumption for this change is assuming that miss-rules are added by
add_internal_flow().

If so it seems to me that the current rule_is_table_miss() does not match
such rules. This is because add_internal_flows() adds rules with the mask
of register 0 set to all 1s due to the following line in
add_internal_flow().

    match_set_reg(&fm.match, 0, id);

This patch proposes an alternate approach which is to provide
a function to determine if a rule is a miss rule. And infer
that any rule that results in execute_controller_action() being
called has a controller action present and if that rule is internal
then it is the miss rule. This allows generated_by_table_miss for miss
rules.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofp-util: Use enum ofp_table_config in struct ofputil_table_mod

Use enum ofp_table_config as the type of the 'config' field
of struct ofputil_table_mod. This reflects the usage
of the field.

Signed-off-by: Simon Horman <horms@verge.net.au>
ofproto: Support OF version-specific table-miss behaviours

OpenFlow 1.1 and 1.2 specify that if a table-miss occurs then the default
behaviour is to forward the packet the controller using a packet-in
message. And until this patch this is the default behaviour that Open
vSwitch uses for all OpenFlow versions.

OpenFlow1.3+ specifies that if a table-miss occurs then the default
behaviour is simply to drop the packet. This patch implements this
behaviour using the following logic:

If a table-miss occurs and the table-miss behaviour for the table
has not been set using a table_mod (in which case it is no longer
the default setting) then:

* Installing a facet in the datapath with a drop action in the
  if there are no pre-OF1.3 controllers connected which would receive
  an packet_in message.

  Note that this covers both the case where there are only OF1.3
  controllers and the case where there are no controllers at all.

* Otherwise sent a packet_in message to all pre-OF1.3 controllers.

  This covers both the case where there are only pre-OF1.3
  controllers and there are both pre-OF1.3 and OF1.3+ controllers.

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