2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-29 15:28:56 +00:00
Commit Graph

686 Commits

Author SHA1 Message Date
Ethan Jackson
75a4ead16d cfm: Support tagged CCM PDUs.
This patch also causes eth_compose() to set the l2 and l3 pointers
of the packets which it modifies.
2011-11-03 14:01:33 -07:00
Ansis Atteka
f0a3aa2ecf ovs-appctl: Add fdb/flush command
Added a new command that will allow to flush particular bridge's
MAC learning table.

Issue #7819
2011-11-01 16:33:35 -07:00
Edward Tomasz Napierała
6ca00f6f17 Fix build on FreeBSD.
Patch below fixes build on FreeBSD; tested on 10.0-CURRENT.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-11-01 09:11:52 -07:00
Ben Pfaff
6ca376775e Implement automatic dependency generation for manpages.
This ensures that manpages actually get rebuilt if any of the lib/*.man
fragments that they depend upon are modified.
2011-10-26 16:06:37 -07:00
Ethan Jackson
06b592bcbe vswitch: Don't update STP on synthetic ports.
This can cause ovs-vswitchd to crash.

Bug #8007.
Reported-by: Krishna Miriyala <krishna@nicira.com>
2011-10-26 11:50:56 -07:00
Ben Pfaff
b37e6334fd datapath: Add multicast tunnel support.
Something like this, on two separate vswitches, works to try it out:
    route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
    ovs-vsctl \
        -- add-port br0 gre0 \
        -- set interface gre0 type=gre options:remote_ip=224.0.0.1

Runtime tested on Linux 3.0, build tested on Linux 2.6.18, both i386.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2011-10-24 12:27:36 -07:00
Justin Pettit
21f7563cef ovs-vswitchd: Add support for 802.1D STP.
Still alpha quality, since only tested for interoperability with Linux
bridge's STP implementation.
2011-10-22 16:16:08 -07:00
Ben Pfaff
cb4ef1ea12 bridge: Allow specially named "unix:" controllers.
Some users want to use Unix domain socket controllers, so this relaxes the
restriction.

Requested-by: Jari Sundell <sundell.software@gmail.com>
2011-10-18 08:57:37 -07:00
Ethan Jackson
65c3058c22 vswitchd: New column "link_resets".
An interface's 'link_resets' column represents the number of times
Open vSwitch has observed its link_state change.
2011-10-17 15:03:03 -07:00
Ethan Jackson
70aa337d73 vswitchd: Update link_state instantly.
With this patch, instead of updating an interface's link_state once
every 5 seconds, it's updated immediately when changed.  To avoid
stressing the database, these updates are rate limited to once per
second.
2011-10-17 15:03:03 -07:00
Ethan Jackson
15236eb49d vswitchd: Cleanup rate limited DB writes.
The code to write the 'lacp_current' flag to the database was
unnecessarily complicated.  Future patches will directly benefit
from this refactoring.
2011-10-17 15:03:03 -07:00
Ethan Jackson
a5d6fc245e vswitchd: Remove iface_get_carrier().
It has only one caller, and doesn't improve the code's readability.
2011-10-17 15:03:03 -07:00
Ben Pfaff
5af5b5324c bridge: Forbid '/' in bridge names to prevent arbitrary directory access. 2011-10-17 09:05:15 -07:00
Ben Pfaff
89a1c6d0a5 vswitch.xml: Correct CAPWAP minimum Linux kernel version. 2011-10-12 15:33:09 -07:00
Ben Pfaff
dae57238bc ovs.db.types: Consistently use commas in formatting large numbers.
Suggested-by: Justin Pettit <jpettit@nicira.com>
2011-10-12 10:20:37 -07:00
Ben Pfaff
f9e5e5b383 vswitchd: Document constraints on keys.
Suggested-by: Justin Pettit <jpettit@nicira.com>
2011-10-12 10:14:10 -07:00
Ethan Jackson
86dc65011b cfm: New 'cfm_opstate' setting.
In some cases, a controller may want to take an interface down for
forwarding purposes, but avoid completely deconfiguring CFM and
thus lose all connectivity monitoring.  The new 'cfm_opstate'
setting is a way to achieve this behavior.
2011-10-11 16:48:41 -07:00
Ethan Jackson
167e393b39 vswitch.xml: Annotate 'false' keyword in CFM documentation. 2011-10-11 16:48:23 -07:00
Ben Pfaff
44ff0707f0 vswitch.ovsschema: Mark more CFM columns ephemeral.
I spotted these being logged to the database.  That doesn't match up with
our usual model, so mark them ephemeral.
2011-10-07 09:04:55 -07:00
Justin Pettit
0dfd1cb487 bridge: Fix comment describing iface_refresh_cfm_stats(). 2011-10-04 19:03:39 -07:00
Ben Pfaff
3fd8d44544 vswitchd: Document map members as separate columns
The OVS configuration database now has numerous columns that contain fixed
key-value pairs.  Currently there's no way to see these at a glance,
because they are not presented in the summary tables just before the
detailed descriptions.

This commit extends the XML format so that keys within a column can be
described individually, and rearranges and rewrites vswitch.xml to take
advantage of this feature.
2011-10-04 10:52:02 -07:00
Ben Pfaff
3021ea6074 vconn: Remove unnecessary forward declarations and #includes from header.
This required fix-ups in a few other files that accidentally depended upon
vconn.h including those other headers.
2011-10-04 09:09:03 -07:00
Justin Pettit
b674c3f9ed ovs-vswitchd: Document "coverage/log" in man page. 2011-09-29 18:52:28 -07:00
Justin Pettit
5dab8eced8 lacp: Make argument to ovs-appctl "lacp/show" command optional.
If an argument isn't passed to "lacp/show", it will print information
about all interfaces with LACP enabled.
2011-09-29 18:52:28 -07:00
Justin Pettit
ae75dae345 cfm: Make argument to ovs-appctl "cfm/show" command optional.
If an argument isn't passed to "cfm/show", it will print information
about all interfaces with CFM enabled.
2011-09-29 18:52:28 -07:00
Justin Pettit
7ff2009a95 ovs-appctl: Print command arguments for "help". 2011-09-29 18:52:28 -07:00
Ben Pfaff
3fc5a86ab3 bridge: Clear out all Interface fields when an interface cannot be created.
When an Interface record is invalid (for example, when the interface that
it specifies does not exist and cannot be created), ovs-vswitchd would
leave any pre-existing data in its columns, except that it would set the
ofport column to -1 to indicate the error.  This was sometimes confusing
because, for example, the lacp_current field could still be set to "true"
if LACP has previously been active and up-to-date.

This commit changes ovs-vswitchd to reset all such data to its default
values when an interface is invalid.

Bug #7450.
Reported-by: Duffie Cooley <dcooley@nicira.com>
Bug #7491.
Reported-by: Ethan Jackson <ethan@nicira.com>
Release Notes #7500.
Reported-by: Keith Amidon <keith@nicira.com>
2011-09-29 09:18:12 -07:00
Ben Pfaff
ecac4ebf93 Implement "native VLAN" feature.
Significant updates by Ben Pfaff, including:

* Comment, coding style, indentation updates.
* Documentation improved.
* Added tests.
* Dropped PORT_VLAN_EMPTY.
2011-09-26 13:15:56 -07:00
Simon Horman
5b44dc995c Include sys/wait.h for WIFEXITED
This appears to be required when building using the Android NDK r6b
(Android API level 13).
2011-09-23 09:10:27 -07:00
Ethan Jackson
a5faa982dc cfm: Update cfm_remote_mpids documentation. 2011-09-16 13:14:54 -07:00
Ethan Jackson
2ee6545f2b notifiers: Create and destroy nln_notifiers.
This patch changes the interface of netlink-notifier and
rtnetlink-link.  Now nln_notifiers are allocated and destroyed by
the module instead of passed in by callers.  This allows the
definition of nln_notifier to be hidden, and generally cleans up
the code.
2011-09-16 11:22:30 -07:00
Ethan Jackson
18a2378164 notifiers: Rename run and wait functions.
It makes more sense to call nln_notifier_run() and
nln_notifier_wait() simply nln_run() and nln_wait() since they
don't operate on notifiers but the entire nln object.  This patch
changes the nln and the rtnetlink-link modules to the new
convention.
2011-09-16 11:22:30 -07:00
Ben Pfaff
9ed3ba29b3 ovs-brcompatd: Delete ports when netdevs on fake bridges disappear.
Until now, when a network device disappeared, netdev_changed_cb() passed
the name of the bridge that contained the network device to ovs-vsctl as
part of the "del-port" command.  However, when the network device was
actually a "fake bridge", it would pass the name of the real bridge, which
ovs-vsctl rejected as wrong (expecting the name of the fake bridge) and
not remove the port.

This fixes the problem by dropping the bridge name, which is simpler than
trying to get the name of the fake bridge in this case.

Reported-by: Tyler Coumbes <coumbes@gmail.com>
Tested-by: Tyler Coumbes <coumbes@gmail.com>
2011-09-15 15:55:45 -07:00
Ethan Jackson
21d486606d bridge: Don't update CFM on synthetic interfaces.
Synthetic interfaces don't have database records so it doesn't make
sense to update them.  In some situations this could cause a
segmentation fault.

Reported-by: Paul Ingram <paul@nicira.com>

Bug #7278.
2011-09-12 22:39:01 -07:00
Pravin Shelar
9b02078077 datapath: Strip down vport interface : OVS_VPORT_ATTR_MTU
There is no need to have vport attribute MTU (OVS_VPORT_ATTR_MTU) as
linux net-dev-ioctl can be used to get/set MTU for linux device.
Following patch removes OVS_VPORT_ATTR_MTU from datapath protocol.

This patch also adds netdev_set_mtu interface. So that MTU adjustments
can be done from OVS userspace. get_mtu() interface is also changed, now
get_mtu() returns EOPNOTSUPP rather than returning 0 and setting *pmtu
to INT_MAX in case there is no MTU attribute for given device.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
2011-09-12 17:12:52 -07:00
Valient Gough
40a751774f datapath: add key support to CAPWAP tunnel
Add tunnel key support to CAPWAP vport.  Uses the optional WSI field in a
CAPWAP header to store a 64bit key.  It can also be used without keys, in which
case it is backward compatible with the old code.  Documentation about the
WSI field format is in CAPWAP.txt.

Signed-off-by: Valient Gough <vgough@pobox.com>
[horms@verge.net.au: Various minor fixes (v4.1)]
Signed-off-by: Simon Horman <horms@verge.net.au>
[jesse: Additional parsing fixes]
Signed-off-by: Jesse Gross <jesse@nicira.com>
2011-09-09 19:29:46 -07:00
Ben Pfaff
0d1fe4a362 bridge: Avoid reading uninitialized data in bridge_pick_local_hw_addr().
Commit 3a48ace3 "bridge: Make bridge_pick_local_hw_addr() easier to reason"
didn't initialize 'ea' before trying to compare against it.  We need to
check that an address has been found.

Found by valgrind.
2011-09-09 16:40:16 -07:00
Ethan Jackson
1de11730e6 cfm: Write remote MPIDs to the database.
A controller may want to know which MPIDs are reachable from an
interface configured with CFM.  This patch regularly writes this
information to the database.

Bug #7014.
2011-09-09 14:11:14 -07:00
Ethan Jackson
348f01e3e3 cfm: Eight byte MPIDs in extended mode.
802.1ag only allows for MPIDs in the range [1, 8191].  This is
restrictive enough to make assignment of MPIDs to instances of OVS
awkward.  This patch allows eight byte MPIDs when running in
extended mode.

Bug #7014.
2011-09-09 14:11:14 -07:00
Ethan Jackson
de72402954 cfm: Allow accurate transmission intervals in extended mode.
The standard CFM protocol only allows a handful of transmission
rates.  This is particularly problematic if you want to support a
transmission rate slower than 100 ms and faster than 1000 ms.

This patch allows arbitrary transmission rates (between 1 ms and
65535 ms).  It does this by commandeering parts of a reserved
"zero" field in the ccm message.  This breaks wire compatibility
with standard 802.1ag implementations, and thus is only supported
in extended mode.

Bug #7014.
2011-09-09 14:11:14 -07:00
Ethan Jackson
ef9819b5f1 cfm: New cfm extended mode.
The new extended mode introduced in this patch will be used for
features which break wire compatibility with 802.1ag compliant
implementations.

Bug #7014.
2011-09-09 14:11:14 -07:00
Ethan Jackson
144216a335 cfm: Remove cfm_remote_mpid configuration.
According to the 802.1ag specification, users should be able to
configure the CFM module with a list of remote endpoints with which
the local endpoint should have connectivity.  Commit 93b8df3853
"cfm: Remove Maintenance_Point and Monitor tables." changed the
behavior so that only one remote endpoint could be specified.  This
commit takes it further, by disallowing specification of any
remote endpoints.

Due to this change, the semantics of the fault flag are slightly
different.  Before, a fault was triggered if any of the configured
remote endpoints were unreachable (or with RDI), or if any
unconfigured remote endpoints were reachable.  Now a fault is
triggered if no remote endpoints are reachable at all, or if
reachable endpoints have set their RDI.

Bug #7014.
2011-09-09 14:11:14 -07:00
Ethan Jackson
0f0d2ae5da bridge: Clear fault when CFM is not configured. 2011-09-09 14:11:14 -07:00
Ethan Jackson
8f3fe84406 bridge: Write CFM changes more aggressively.
This patch no longer rate limits database updates due to CFM
changes.  Due to recent changes, the fault status of CFM only
changes once per 3.5 tx_interval seconds.  There doesn't seem to be
a good reason to add an additional rate limit on top of this.
2011-09-09 14:11:14 -07:00
Ethan Jackson
b4117094e5 bridge: ovsdb_idl_omit_alert() on additional columns.
The bridge owns the lacp_current and cfm_fault columns and should
not be alerted when they change.
2011-09-09 14:11:13 -07:00
Ethan Jackson
7588b57175 vswitch.xml: Whitespace cleanup. 2011-09-08 17:22:31 -07:00
Ethan Jackson
0a811051ff netlink-notifier: Rename rtnetlink code.
This patch renames the rtnetlink module's code to "nln" for
"netlink notifier".  Callers are now required to pass in the
netlink protocol to he newly renamed nln_create() function.
2011-09-01 17:18:52 -07:00
Ethan Jackson
45c8d3a189 lib: Rename rtnetlink.[ch] files.
The only rtnetlink specific functionality contained in the
rtnetlink module is the use of the NETLINK_ROUTE protocol.  This
can easily be passed in by callers.

In preparation for generalization, this patch renames
rtnetlink.[ch] to netlink-notifier.[ch].  Future patches will
complete the transition.
2011-09-01 17:18:51 -07:00
Ethan Jackson
dc533f4ecb lacp: Clarify documentation.
Requested-by: Dan Wendlandt <dan@nicira.com>
2011-09-01 12:53:42 -07:00
Justin Pettit
3a48ace3e4 bridge: Make bridge_pick_local_hw_addr() easier to reason.
The use of eth_addr_is_multicast() to see if a reasonable address was
found always caused me momentary confusion.  This commit uses a flag
instead, and also saves a bit of unnecessary array reading and writing.
2011-08-26 15:24:17 -07:00