debian: Fix debian packaging build failures due to dot-files in tree.

openvswitch/* no longer matches all the files since commit 826bc7b61345a5d
(build: Add travis continuous integration support) added files with names
beginning with ".".

VMware-BZ: #1298353
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
debian: Ignore openvswitch-vtep directory generated during packaging.

Signed-off-by: Ben Pfaff <blp@nicira.com>
odp-util: Initialize tun_key and tun_key_mask

tun_key_to_attr() accesses tp_src and tp_dst which are currently
uinitialized.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
debian: Really fix packaging given new dot-files.

commit a5c1096abb1 (debian: Fix debian packaging build failures due to
dot-files in tree.) contained an error that I've made before and should
have noticed.  This commit should really fix the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
miniflow: Remove unused values_inline branch from miniflow_move()

The branch is unused as size < sizeof dst->inline_values must
always be true for inlined values. Hitting the branch would lead
to corruption as inline_values is accessed out of bounds.

Remove branch and add assertion.

Cc: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
json: Fix leaked nodes in json_hash_object()

nodes is allocated through shash_sort() but never freed.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
vswitch.xml: Fix a typo.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
test-controller: Rename to ovs-testcontroller, again install.

mininet uses the Open vSwitch controller by default, for testing.

CC: 757761@bugs.debian.org
Reported-at: https://bugs.debian.org/757761
Requested-by: Tomasz Buchert <tomasz.buchert@inria.fr>
Requested-by: Dariusz Dwornikowski <dariusz.dwornikowski@cs.put.poznan.pl>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
build: Use errtrace to simplify travis-ci failure detection

Causes the build script to fail if any command inside the
script returns nonzero.

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
odp-util: Only add recirc_id mask to Netlink message if mask is provided

Current unconditional call may result in NULL being passed to
nl_msg_put_u32().

Cc: Andy Zhou <azhou@nicira.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
dpif-netdev: Fix leaked port, port->rxq, port->type in error path

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
[blp@nicira.com added free of port->type]
Signed-off-by: Ben Pfaff <blp@nicira.com>
debian: Fix cross build.

Cross-building openvswitch with debuild -aARCH (or equivalent) fails
because the target architecture is not getting passed to configure.
Thus binaries like ovs-appctl get built using the build host
architecture.

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS: Add Ed Swierk.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Revert "miniflow: Remove unused values_inline branch from miniflow_move()"

This reverts commit 29d2aa3aa74ab97df0f00af5bddaa12485c1d39a.

Turns out the code was correct but the dynamic nature of miniflow
inline storage was poorly documented.  A following patch fixes the
documentation.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
lib/flow.h: Improve struct miniflow comment and definition.

Miniflows can nowadays be dynamically allocated to different inline
sizes, as done by lib/classifier.c, but this had not been documented
at the struct miniflow definition.

Also, MINI_N_INLINE had a different value for 32-bit and 64-bit builds
due to a historical reason.  Now we use 8 for both.

Finally, use change the storage type of 'values_inline' to uint8_t, as
uint64_t looks kind of wide for a boolean, even though we intend the
bit be carved out from the uint64_t where 'map' resides.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
datapath: Fix recirc bug where skb is double freed.

If recirc action is the last action of a action list, the SKB triggers
the recirc will be freed twice. This patch fixes this bug.

Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
tests: Fix race conditions.

These tests had the potential to fail due to statistics not updating
before the test script retrieves them. Fix them by waiting until the
next revalidation cycle.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
userspace: add support for pop_eth and push_eth actions

These actions will allow L2->L3 and L3->L2 switching, and are supposed
to be added to flows installed in the datapath transparently by
ovs-vswitchd.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
userspace: add layer 3 flow and switching support

This commit relaxes the assumption that all packets have an Ethernet
header, and adds support for layer 3 flows.  For each packet received on
the Linux kernel datapath the l2 and l3 members of struct ofpbuf are
intialized appropriately, and some functions now expect this (notably
flow_extract()), in order to differentiate between layer 2 and layer 3
packets.  struct flow has now a new 'base_layer' member, because we
cannot assume that a flow has no Ethernet header when eth_src and
eth_dst are 0.  For layer 3 packets, the protocol type is still stored
in the eth_type member.

Switching L2->L3 and L3->L2 are both implemented by adding the pop_eth
and push_eth actions respectively when a transition is detected.  The
push_eth action puts 0s on both source and destination MACs.  These
addresses can be modified with mod_dl_dst and mod_dl_src actions.

Added new prerequisite MFP_ETHERNET for fields MFF_ETH_SRC, MFF_ETH_DST,
MFF_VLAN_TCI, MFF_DL_VLAN, MFF_VLAN_VID and MFF_DL_VLAN_PCP.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
datapath: add layer 3 flow/port support

Implementation of the pop_eth and push_eth actions in the kernel, and
layer 3 flow support.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>