2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 05:47:55 +00:00

1135 Commits

Author SHA1 Message Date
Jesse Gross
6802c96db8 tunnel: Remove references to multicast tunnels in schema documentation.
The vestigal multicast support in tunnels has been removed at this
point, so this deletes the remaining references in the documentation.

Reported-by: Guangvy <1965837689@qq.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-03-13 08:54:40 -07:00
Justin Pettit
df867eda40 bridge: Store the 'mac_in_use' for interfaces in OVSDB.
It can be useful to remotely determine the MAC addresses of attached
interfaces without going through OpenFlow.  This adds the MAC address to
a new 'mac_in_use' column on the Interface table.

Feature #15551

Requested-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-03-12 15:14:46 -07:00
Justin Pettit
8d6db33e35 bridge: Minor style fix.
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2013-03-12 15:13:57 -07:00
Ben Pfaff
d0db8de278 bridge: Minor style fix.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-03-12 13:13:46 -07:00
Ben Pfaff
3634eb9929 vswitch.xml: Document iface-status behavior for intra-hypervisor migration.
Based on a face-to-face discussion.

CC: Natasha Gude <natasha@nicira.com>
CC: Andrew Lambeth <wal@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-03-12 12:27:41 -07:00
Ben Pfaff
4cd9ab26c3 bridge: Fix interpretation of 'health' member of struct ofproto_cfm_status.
Commit 9a9e3786b3a8 (ofproto: Merge all the CFM query functions into one.)
mistakenly interpreted struct ofproto_cfm_status as always being in the
range [0,100].  It can in fact take the value -1 if the health status is
not currently well-defined.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-03-06 16:23:28 -08:00
Ben Pfaff
18637fdc2e bridge: Fix remote_opstate bug recently introduced.
Commit 9a9e3786b3a8 (ofproto: Merge all the CFM query functions into one.)
mistakenly transformed a tristate variable into a Boolean one.  This commit
fixes the problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-03-06 16:23:27 -08:00
Ben Pfaff
9a9e3786b3 ofproto: Merge all the CFM query functions into one.
This eliminates several function calls and in particular several
hash table lookups to find structures corresponding to a port
number from iface_refresh_cfm_stats().

This does not seem to reduce CPU use, but the code is shorter
and more readable.

Bug #15171.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-03-06 09:25:40 -08:00
Lorand Jakab
a6ae068b7b Add support for LISP tunneling
LISP is an experimental layer 3 tunneling protocol, described in RFC
6830.  This patch adds support for LISP tunneling.  Since LISP
encapsulated packets do not carry an Ethernet header, it is removed
before encapsulation, and added with hardcoded source and destination
MAC addresses after decapsulation.  The harcoded MAC chosen for this
purpose is the locally administered address 02:00:00:00:00:00.  Flow
actions can be used to rewrite this MAC for correct reception.  As such,
this patch is intended to be used for static network configurations, or
with a LISP capable controller.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Signed-off-by: Kyle Mestery <kmestery@cisco.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-02-25 15:55:46 -08:00
Lorand Jakab
238bc9785a vxlan: new draft revision
The VXLAN draft just got updated from -02 to -03, with no major changes.
Update documentation to reflect the change.

Signed-off-by: Lorand Jakab <lojakab@cisco.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2013-02-25 08:46:04 -08:00
Pravin B Shelar
09538fdc57 datapath: Remove CAPWAP tunneling support.
The CAPWAP implementation is just the encapsulation format and
therefore really not the full protocol.  While there were some
uses of it (primarily hardware support and UDP transport).  But
these are most likely better provided by VXLAN.

Following patch removes CAPWAP tunneling support.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2013-02-19 12:45:57 -08:00
Ben Pfaff
4b95a9e9bb Revert "vswitchd: Require "target" column to be unique in OVS database."
This reverts commit 41219e63a02bd315e7066145d72798f7a4204566.

In fact, the "target" column cannot be made unique within the
Controller table, because different bridges are allowed to have
the same target.  OVSDB does not have a way to express this
constraint, so it must be omitted entirely.

Reported-by: Saul St. John <sstjohn@cs.wisc.edu>
CC: Natasha Gude <natasha@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-12 11:40:21 -08:00
Ben Pfaff
f4f1ea7eac ofp-util: Simplify struct ofputil_role_request.
It makes more sense to use enum ofp12_controller_role here than
to use enum nx_role, because the former is a superset of the latter and
we can then get rid of a bool member too.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-11 23:55:31 -08:00
Ben Pfaff
41219e63a0 vswitchd: Require "target" column to be unique in OVS database.
Commit cc7ecee48 (vswitchd: Add unique indexes for some columns.) says,
in part:

    With this commit, the database server itself rejects attempts to add
    Port or Interface records with duplicate names or Controller or
    Manager records with duplicate targets.

but in fact didn't change the Controller table as described.  This commit
fixes that.

This commit updates the schema version number's major version, because this
is a potentially non-backward compatible change, if some user depended on
the ability to add Controller records with duplicate targets.  However, if
anyone thinks this is a bad idea, then I'm open to discussion.

Reported-by: Natasha Gude <natasha@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-11 13:46:42 -08:00
Pavithra Ramesh
2c487bc808 stream-unix: Use rundir as root for relative paths.
Until now, "unix:" and "punix:" paths that are not absolute have
been considered relative to the current working directory.  It
is more useful to consider them relative to the rundir, so this
commit makes that change to the C and Python implementations of
the stream code.

This commit also relaxes the whitelist check in the bridge code
so that any name that does not contain a "/" is considered OK.

Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-02-11 11:18:58 -08:00
Ethan Jackson
df53d41c6d bond: Remove stable bond mode.
Stable bond mode, along with autopath, were trying to implement
functionality close to what we get from the bundle action.
Unfortunately, they are quite clunky, and generally less useful
than bundle, so they're being removed.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-02-05 12:50:15 -08:00
Ben Pfaff
0d7bb1b4f4 bridge: Rename iface_create() variable to avoid hiding parameter.
This function has a parameter 'ofp_port' and a local variable 'ofp_port',
so rename the local variable to reduce confusion.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-02-01 14:26:54 -08:00
Ben Pfaff
4a1d4e86fc bridge: Fix bug in equal_pathnames().
Reported-by: Pavithra Ramesh <paramesh@vmware.com>
Acked-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-01-23 15:12:10 -08:00
Ben Pfaff
3e6c955de6 Remove useless use of <assert.h>.
These files #included <assert.h> but didn't ever use assert.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-16 16:03:55 -08:00
Ben Pfaff
cb22974d77 Replace most uses of assert by ovs_assert.
This is a straight search-and-replace, except that I also removed #include
<assert.h> from each file where there were no assert calls left.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-16 16:03:37 -08:00
Pavithra Ramesh
329e34620e bridge: Remove restriction on socket name.
Following patch removes restriction on the listening socket name that gets
configured as bridge controller. Currently, we only connect to sockets in a
specific directory with the name of the bridge. This patch removes the
restriction on the bridge name, keeping the directory restriction.

Bug #14029.
Signed-off-by: Pavithra Ramesh <paramesh@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-01-16 11:50:40 -08:00
Ethan Jackson
9b9f4d6007 tunnels: Remove support for df_inherit from userspace.
This will be required to support flow based tunneling.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-15 16:21:09 -08:00
Ben Pfaff
d2cb6c956b manpages: Put version number instead of date at bottom of page.
We're really good about keeping manpages up to date, but terrible at
updating the dates at the bottom of the manpages.  So, instead of using
manually updated dates, this commit switches to using automatically updated
version numbers.

We can only use automatically updated version numbers for manpages that
we preprocess, that is, the manpages whose sources end with ".in".  This
excludes a couple of manpages that don't actually get installed with OVS,
such as the manpages for ovs-ctl and ovsdb-idlc.  This commit doesn't
change those manpages.  It does change the ovs-bugtool manpage to one that
is preprocessed so that we can use the version there.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2013-01-04 09:02:06 -08:00
Ethan Jackson
6f74491cda vswitch: Remove PMTUD support from userspace.
This patch removes path MTU discovery from userspace.  The feature
still exists in the kernel where it will need to be removed in the
future.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-03 16:55:55 -08:00
Ethan Jackson
275707c33f netdev: Rename get_drv_info() to get_status().
get_status() is a much more intuitive name since "status" is what
the database column is called.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-03 16:55:43 -08:00
Ethan Jackson
fded7f983c bridge: Log version number precisely once.
Before this patch, ovs-vswitchd logged its version number every
time the database changed.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2013-01-02 13:48:37 -08:00
Pravin B Shelar
5ca1ba484b openvswitch: Remove Linux bridge compatibility.
Currently brcompat does not work on master due to recent
datapath changes. We have decided to remove it as it is
not used very widely.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2012-12-27 13:48:51 -08:00
Pravin B Shelar
a8643e4476 brcompat: Mark ovs-brcompat as deprecated.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
bug #14341
2012-12-27 13:30:59 -08:00
Ben Pfaff
8b6ff72912 ovs-vswitch: Make OpenFlow "dp_desc" configurable.
Signed-off-by: Felician Nemeth <nemethf@tmit.bme.hu>
[blp@nicira.com refactored the code that this was based on and revised the
 patch accordingly]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-26 15:03:22 -08:00
Ethan Jackson
11f8bde38c xenserver: Downgrade not on XenServer warning to DBG.
This log message is annoying and of questionable usefulness.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-12-21 15:24:21 -08:00
Ben Pfaff
ed36537ebf packets: Change IP_ARGS interface to take an ovs_be32 instead of a pointer.
An ovs_be32 is a more obvious way to represent an IP address than a
pointer to one.  It is also more type-safe, especially since "sparse" is
able to check that the argument is in network byte order.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2012-12-12 15:26:21 -08:00
Ed Maste
8c0f519f6e vswitchd: Avoid writing to const struct
When built with Clang, vswitchd segfaulted in ovsrec_open_vswitch_init,
from calling memset() on a const struct.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-12-08 15:26:14 -08:00
Ben Pfaff
c406951260 vswitchd: Make the maximum size of MAC learning tables user-configurable.
We've had a couple of requests for this over the years.  It's easy to do,
so let's implement it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Kyle Mestery <kmestery@cisco.com>
2012-12-08 12:33:30 -08:00
Kyle Mestery
79f827fa8b datapath: Add support for VXLAN tunnels to Open vSwitch
Add support for VXLAN tunnels to Open vSwitch. Add support
for setting the destination UDP port on a per-port basis.
This is done by adding a "dst_port" parameter to the port
configuration. This is only applicable currently to VXLAN
tunnels.

Please note this currently does not implement any sort of multicast
learning. With this patch, VXLAN tunnels must be configured similar
to GRE tunnels (e.g. point to point). A subsequent patch will implement
a VXLAN control plane in userspace to handle multicast learning.

This patch set is based on one posted by Ben Pfaff on Oct. 12, 2011
to the ovs-dev mailing list:

http://openvswitch.org/pipermail/dev/2011-October/012051.html

The patch has been maintained, updated, and freshened by me and a
version of it is available at the following github repository:

https://github.com/mestery/ovs-vxlan/tree/vxlan

I've tested this patch with multiple VXLAN tunnels between hosts
using different UDP port numbers. Performance is on par (though
slightly faster) than comparable GRE tunnels.

See the following IETF draft for additional information about VXLAN:
http://tools.ietf.org/html/draft-mahalingam-dutt-dcops-vxlan-02

Signed-off-by: Kyle Mestery <kmestery@cisco.com>
[jesse: simplify error path in vxlan_tunnel_setup, don't print default VXLAN port,
        and remove dead code]
Signed-off-by: Jesse Gross <jesse@nicira.com>
2012-12-05 18:11:06 -08:00
Justin Pettit
51b67a1038 bridge: Set mac address when no physical ports attached.
Commit 1a8cfb41(bridge: Drop warning about thedefault bridge Ethernet
address.) attempted to reduce unnecessary logging, but deleted some code
that was necessary to set the mac address on local ports when no
physical ports were attached.

Signed-off-by: Justin Pettit <jpettit@nicira.com>

Issue #14126
2012-12-03 21:23:55 -08:00
Ben Pfaff
1a8cfb4106 bridge: Drop warning about the default bridge Ethernet address.
This information is also available via ovs-ofctl and through other means,
and it's not really anything we need to warn about anyhow.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2012-11-29 08:57:06 -08:00
Jarno Rajahalme
2e1ae2005e Initial OpenFlow 1.3 support
Initial OpenFlow 1.3 support with new include/openflow/openflow-1.3.h.
Most of the messages that differ from 1.2 are implemented. OFPT_SET_ASYNC
is implemented via NX_SET_ASYNC_CONFIG, other new message types are yet to
be implemented. Stats replies that add duration fields are implemented at
encode/decode level only. Test cases for implemented features are included.
Remaining FIXME:s should not cause runtime aborts. Make check comes out
clean.

Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-11-27 09:37:50 -08:00
Gurucharan Shetty
558e2cc58e vswitchd: Make Interface's ofport a persistent column.
Currently, the 'ofport' column in Interface table is
ephemeral and is populated by vswitchd everytime it is
started or when a new interface is created with vswitchd
running.

Making it persistent lets vswitchd try and assign the
same ofport number to a particular interface across
restarts. This is just a fallback option when
'ofport_request' column is empty.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-11-26 11:16:58 -08:00
Ben Pfaff
ee4dd8eb94 bridge: Fix typo in comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-11-20 14:17:05 -08:00
Simon Horman
7beaa082d7 vswitchd: Configuration of allowed OpenFlow versions
Versions may be configured using the protocols column of
the bridge table. The protocols column is a set which accepts zero
or more of the values: 'OpenFlow10' and 'OpenFlow12'.

If the protocols column is empty, then OpenFlow10 is used.
This default is consistent with the behaviour of ovs-vswtichd
prior to this patch.

Signed-off-by: Simon Horman <horms@verge.net.au>
[blp@nicira.com adjusted comments and documentation]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-11-19 13:04:11 -08:00
Justin Pettit
bef071a5fd bridge: Always "up" internal devices.
The kernel datapath automatically "up"s internal devices, but this
wasn't happening for the userspace datapath.  This change has the bridge
module always "up" them.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-11-16 12:35:55 -08:00
Justin Pettit
05ba03e000 bridge: Introduce iface_is_internal() function.
This will have an additional caller in the future.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-11-16 12:35:55 -08:00
Justin Pettit
b4f4b737f9 bridge: Open internal ports with the correct type.
Use the new ofproto function that returns how a port should be opened
based on the datapath type.  This fixes a problem with internal ports
being attached to userspace datapaths.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-11-16 12:35:55 -08:00
Simon Horman
1d9ffc175a ofproto, connmgr: Parameterise OpenFlow versions for adding controller
Allow allowed Open Flow versions to be passed rather
than relying on hard-coded defaults.

This is in preparation for allowing configuration of the
allowed OpenFlow versions.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-11-12 09:44:23 -08:00
Ethan Jackson
b099cd5f55 bridge: Fix a segmentation fault in bridge_init_ofproto().
When the database is initially created there may no be rows in the
Open_vSwitch table.  In this case, the ovsrec_open_vswitch passed
to bridge_init_ofproto() is NULL and causes a segmentation fault.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-11-06 12:40:05 -08:00
Pravin B Shelar
05a9d485c0 datapath: Remove tunnel header caching.
Tunnel caching was added to reduce CPU utilization on TX path
by caching packet header, So performance gain is directly proportional
to number of skbs transferred.  But with help of offloads skb are getting
larger. So there are less number of skbs.  Therefore header caching does
not shows similar gains we seen in past.  And now kernel 3.6 has removed
dst caching from networking which makes header caching even more tricky.
So this commit removes header caching from OVS tunnelling.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2012-11-05 13:44:00 -08:00
Pravin B Shelar
1280bf0e51 netdev: Deprecate CAPWAP support.
The CAPWAP implementation is just the encapsulation format and
therefore really not the full protocol.  While there were some
uses of it (primarily hardware support and UDP transport).  But
these are most likely better provided by VXLAN.  As a result,
CAPWAP will be removed no earlier than February 2013.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
2012-11-05 13:40:17 -08:00
Ben Pfaff
d02a5f8ea4 ofproto: Report 0 Mbps when speed not available instead of 100 Mbps.
When a link is down, or when a link has no speed because it is not a
physical interface, Open vSwitch previously reported that its rate is 100
Mbps as a default.  This is counterintuitive, however, so this commit
changes Open vSwitch behavior to report 0 Mbps when a link is down or its
speed is otherwise unavailable.

Bug #13388.
Reported-by: Hiroshi Tanaka <htanaka@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-11-03 18:00:39 -07:00
Justin Pettit
acf6085512 ofproto-dpif: Use a single underlying datapath across multiple bridges.
This commit switches to using a single backing datapath (called
"ovs-datapath") for all bridges of that datapath's type.  Previously,
resources couldn't be shared across bridges, since each was in its own
datapath.  This change will allow sharing of tunnels and cheaper patch
ports to be added in the future.

Since bridges share a common datapath, the ovs-dpctl commands won't
provide bridge-specific information.  Users wishing to have that
information should use the new "ovs-appctl dpif/*" commands as
documented in ovs-vswitchd(8).

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-11-01 22:54:28 -07:00
Justin Pettit
11a574a737 ofproto: Add type "run", "run_fast", and "wait" provider methods.
Add the ability for ofproto providers to have top-level "run",
"run_fast", and "wait" methods, similar to the current ofproto ones.
There are no current users, but this will be useful in a future commit.

Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-11-01 22:54:27 -07:00