tunnel: Only un-wildcard the ECN bits for IP traffic.

With tunnels carrying IP packets, ECN bits are always inherited by
the encapsulating tunnel.  However, it doesn't make sense to
unwildcard the inner packet's TOS fields if the packet is not IP.

Found by inspection.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
ofproto-dpif: Always un-wildcard 'dl_type'.

We always look at the fragment status and often look at other L3
headers when processing the packet, so just un-wildcard the
Ethertype.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
ofproto-dpif: Add 'force-miss-model' configuration

This adds support for specifying flow miss handling behaviour at
runtime, through a new "other-config" option in the Open_vSwitch table.
This takes precedence over flow-eviction-threshold.

By default, the behaviour is the same as before. If force-miss-model is
set to 'with-facets', then flow miss handling will always result in the
creation of new facets and flow-eviction-threshold will be ignored. If
force-miss-model is set to 'without-facets', then flow miss handling will never
result in the creation of new facets (effectively the same as setting the
flow-eviction-threshold to 0, which is not currently configurable).

We intend to use this configuration option in the testsuite to force
particular code paths to be used, allowing us to improve test coverage.

Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ovsdb-server: Store databases in shash instead of array.

An upcoming commit provides the ability to add and remove databases.
Having the databases in a shash instead of an array makes it easier
to add and remove databases.

Feature #14595.
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
ovsdb-server: Make database name mandatory when specifying db paths.

Currently, if we have just one database, we can optionally skip the
database name when providing the DB path for certain options (ex:
--remote=db:[db,]table,column). But in case we have multiple databases,
it is mandatory.

With this commit, we make the database name mandatory. This provides
increased flexibility for an upcoming commit that provides the ability
to add and remove databases during run time.

Feature #14595.
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
openflow-common: Change flow removal reason codes.

Swap places of OFPRR_METER_DELETE and OFPRR_EVICTION in enumeration to be
compatible with OpenFlow 1.4.

Prior to OpenFlow 1.4 OFPRR_EVICTION was a Nicira specific flow removal reason
code.  OpenFlow 1.3 added support for meters, which require dependent flow
removal when meters are deleted.  The reason code for this is also added in
OpenFlow 1.4, but OFPRR_METER_DELETE now has the value OVS previously had for
OFPRR_EVICTION.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
INSTALL: Add db name to path in the example.

Signed-off-by: James P. <roampune@gmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
bfd: Fix typo in comment.

Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto: Use OFPRR_EVICTION consistently when evicting flows.

Multiple code paths can evict flows, but before this commit only one of
those code paths used OFPRR_EVICTION as the reason code.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofp-util: Meter fixes.

Validate claimed message length for meter stats in ofp-util.c.
Clean up meters in ofp-util.h.
Fix the impossible duration values in ofp-print.at.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath: Convert IPv6 TCP and UDP port netlink attributes properly.

The code that converts netlink attributes to a flow match always
stored TCP and UDP ports in the IPv4 structure.  This commit
properly puts TCP and UDP traffic into appropriate IPv4 and IPv6
structures.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath: Make GRE support conditional on CONFIG_NET_IPGRE_DEMUX.

Now that GRE support has been upstreamed into Linux, OVS is
using the components in the native kernel when available. However,
this means that it is now dependent on the appropriate kernel
config, which is CONFIG_NET_IPGRE_DEMUX on 2.6.37 and later.

Reported-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
cfm: Reference count 'struct cfm'.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
bfd: Reference count 'struct bfd'.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lacp: Reference count 'struct lacp'.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
bond: Reference count 'struct bond'.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
mac-learning: Reference count 'struct mac_learning".

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif-sflow: Reference count 'struct dpif_sflow'.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif-ipfix: Reference count 'struct dpif_ipfix'.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
ofproto-dpif: Remove 'has_bundle_action'.

It requires ofproto-dpif-xlate to poke into 'struct ofproto-dpif'
which won't be allowed in future patches.  It's also a case of
premature optimization.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>