FAQ: Add entry describing upgrade order between userspace and kernel.

There will be significant changes for tunneling between 1.9 and 1.10
so this describes how to smoothly upgrade.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
datapath: Remove support for Don't Fragment inheritance.

Inheritance of the Don't Fragment bit in tunnels will not be
supported with flow based tunneling and has already been removed
from userspace.  This removes the corresponding kernel support.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
datapath: Remove tunnel path MTU discovery support.

Path MTU discovery can improve tunnel performance in some cases
but is non-standard and can introduce problems in others.  As a
result it has already been deprecated and removed from userspace.
This removes the corresponding kernel support to simplify the
code.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
datapath: Remove vport MAC address configuration.

The ability to retrieve and set MAC addresses on vports is only
necessary for tunnel ports (the addresses for actual devices can be
retrieved through direct Linux mechanisms).  Tunnel ports only used
the information for the purpose of generating path MTU discovery
packets, which has now been removed.  Current userspace code already
reflects these changes, so this drops the functionality from the
kernel.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
datapath: Remove tunnel configuration sequence number.

When tunnel header caching was in use, it was necessary to detect
configuration changes that would invalidate the cache.  This was
done using a sequence number on the configuration.  However, now
that header caching has been removed the sequence number is no
longer necessary.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
datapath: Remove compatibility GRE identifier.

We want to move the GRE vport ID into the upstream range but in
order to ease the transition kept the old ID around for one release.
This removes the old value.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
datapath: Remove kernel patch ports.

Now that userspace implements patch ports completely internally,
it's possible to remove the kernel implementation of them.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
route-table: Add route_table_wait() to the stub implementation.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto-dpif: Use ofproto_receive() in update_stats().

This removes a bit of duplicate code, and will be necessary to
support future patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto-dpif: Require an in_port when tracing datapath flows.

All datapath flows should have an in_port, so it doesn't make a lot
of sense to allow omitting it when tracing.  If a user wants to
trace a flow which has no in_port, they can use the OpenFlow syntax
which doesn't go through ofproto_receive().

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ofproto-dpif: Install drops for flows from invalid in_ports.

Before this patch, if a packet came in on a port which userspace
doesn't know about, it would be silently dropped without installing
a drop flow.  Historically, this has been fine because this
situation could only occur during transient reconfiguration
periods.  However, in future, this could occur when the tunneling
code decides to reject a packet due to invalid headers.  In this
case, it's preferable to drop the packet in the kernel to avoid a
high bandwidth stream of invalid packets DoSing the switch.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
dpif-netdev: Allow stub interfaces on the dummy datapath.

Future patches will need to add netdevs to the dummy datapath which
can't actually send or receive packets.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
packets: Create global helper is_ip_any().

Used outside of meta-flow in future patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
netdev: New function netdev_get_dpif_port().

In future patches, a netdev's datapath port name may not
necessarily be the same as its device name. This patch prepares for
this by making the distinction in the netdev and dpif layers.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
tunnel: Userspace implementation of tunnel manipulation.

The kernel tunneling code currently needs to handle a large number
of operations when tunnel packets are encapsulated and
decapsulated.  Some examples of this are: finding the correct
tunnel port on receive, TTL and ToS inheritance, ECN handling, etc.
All of these can be done on a per-flow basis in userspace now that
we have both the inner and outer header information, which allows
us to both simplify the kernel and take advantage of userspace's
information.  Once tunnel packets are redirected into this code,
the redundant pieces can be removed from other places.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
lib: Switch to flow based tunneling.

With this patch, ovs-vswitchd uses flow based tunneling
exclusively.  I.E. each kind of tunnel shares a single tunnel
backer in the datapath.  Tunnel headers are set by userspace using
the ipv4_tunnel datapath action.  And, the configuration of
individual tunnels is now a userspace responsibility, so
netdev-vport no longer marshals and unmarshals Netlink attributes
for tunnel configuration, instead only storing the configuration
internally.  There are still some significant pieces of work to do,
but the basic building blocks are there to begin testing.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
Co-authored-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
tests: Add tunnel unit tests.

This commit adds unit tests which exercise the flow based
tunneling code added in previous patches.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
netdev-vport: Build on all platforms.

This patch removes the final bit of linux specific code which
prevents building netdev-vport everywhere.  With this, other
platforms automatically get access to patch ports, and (if their
datapath supports it), flow based tunneling.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
ovs-ctl: Fix a couple of typos.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
meta-flow: Avoid null pointer dereference in mf_format_frag_string().

The 'maskp' parameter to this function can be NULL, but the function
always dereferenced it.  This commit fixes the problem.

This commit also fixes the order in which the value and mask were adjusted
to correctly discard 1-bits outside of FLOW_NW_FRAG_MASK.

Found by Coverity.

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