2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 13:58:14 +00:00
Commit Graph

1135 Commits

Author SHA1 Message Date
Ben Pfaff
2c999774c1 vswitchd: Always configure a default queue for QoS.
When an interface has QoS configured but no default queue (queue 0), OVS
has until now installed that QoS configuration literally, which causes all
packets destined for this default queue to be dropped.  This behavior is
usually both unexpected and undesirable.

This commit changes behavior so that, when no default queue is configured,
OVS uses a default "empty" configuration for the default queue.  This
behavior should be more acceptable when QoS is slightly misconfigured.

I tested that, without this patch, configuring only queue 1 causes "tc
class show" to show only queue 1 (handle 1:2) for linux-htb and linux-hfsc,
and that with this patch it shows configurations for both queue 0 (handle
1:1) and queue 1.

Bug #5583.
Feature #7413.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-16 16:33:14 -08:00
Ben Pfaff
b850dc6dd5 vswitchd: Remove never-implemented table and column for capabilities.
Not only have we never implemented this, no one has ever asked for it to
the best of my knowledge.

This increments the middle part of the schema version number instead of the
first part on the grounds that removing something that is unused is
unlikely to break anything.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-16 11:06:37 -08:00
Ethan Jackson
c5dada75bb bond: Remove stale documentation.
The process_flow() function no longer exists.  It seems safest to
remove reference to the function altogether as it's likely to
become stale again.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-02-13 14:20:25 -08:00
Ben Pfaff
9886b6620e vswitchd: Add "enable-async-messages" setting for controllers.
An OpenFlow connection can start receiving asynchronous messages such as
"packet-ins" immediately at connect time.  If there is a lot of traffic on
the network then this can swamp the controller before it gets a chance to
set up an initial flow table.  This setting overrides this OpenFlow
behavior, changing it so that the connection initially enables no
asynchronous messages at all.  The controller can enable any messages that
it actually wants when it is ready for them.

Feature #7086.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-09 14:07:08 -08:00
Ethan Jackson
b93803967e cfm: Expose detailed fault status in the database.
The cfm_fault column of the database is the logical OR of a number
of reasons that CFM can be in a faulted state.  A controller may
want to have more specific information in which case it can look at
the cfm_fault_status column which this patch adds.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-02-08 21:26:29 -08:00
Ethan Jackson
9cc6bf75e8 vswitch.xml: Remove trailing whitespace.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-02-08 21:26:29 -08:00
Ethan Jackson
a7aa2d3cab cfm: Support high priority CCM broadcasts.
Bug #9015.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-02-02 19:45:40 -08:00
Ethan Jackson
d7243b9362 cfm: Allow manual override of CFM fault status.
This can be useful when testing.

Suggested-by: Reid Price <reid@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-02-02 16:56:09 -08:00
Ben Pfaff
ebb6535454 vswitch.xml: More readably indent one section.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-02 12:54:29 -08:00
Ben Pfaff
e764773ccb vswitchd: Make the MAC entry aging time configurable.
NICS-11.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-01 15:04:51 -08:00
Ben Pfaff
254750ceb2 Add support for limiting the number of flows in an OpenFlow flow table.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-01 14:15:17 -08:00
Ethan Jackson
bc1b010c2b bond: Allow users to disable rebalancing.
Bond rebalances come with a risk of packet reordering which some
users may find unacceptable.

Requested-by: Ben Basler <bbasler@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-30 13:04:41 -08:00
Ethan Jackson
fe4a02e4fa stp: Allow manual topology change events.
Users may want to force the network to flush its MAC tables by
manually triggering a topology change event due to some event in
the system.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-25 13:11:07 -08:00
Ethan Jackson
9dc114749e vswitchd: Stop documenting nonexistent "min-rate" QoS.
There are no known implementations of the "min-rate" QoS algorithm
documented on ovs-vswitchd.conf.db.  This patch removes its
documentation pending an implementation.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-24 18:09:32 -08:00
Ethan Jackson
96e466a3c6 ofproto: Optionally flush all learning tables with appctl.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-24 14:51:22 -08:00
Ethan Jackson
bdebeece55 lacp: Require successful LACP negotiations when configured.
In the original Open vSwitch LACP implementation, when no slaves
found a LACP partner, the LACP module would attach all of them.
This allowed the LACP bond to fall back to a standard bond when
partnered with a non-LACP switch.  In practice, this has caused
confusion with marginal benefit, so this feature is removed with
this patch.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-23 14:29:11 -08:00
Andrew Lambeth
3542148e54 Add cmdline arg to specify unix domain control socket.
This is useful for sandboxing multiple instances of the daemon for
testing purposes.

Signed-off-by: Andrew Lambeth <wal@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-19 10:30:25 -08:00
Ben Pfaff
0cbfe35d74 dummy: Make --enable-dummy=override replace all dpifs, netdevs by dummies.
Plain "--enable-dummy" just creates new dummy dpif and netdev classes.
This commit makes "--enable-dummy=override" go a step farther and actually
delete and replace all the existing dpif and netdev classes by copies of
the dummy class.

This is useful for testing in an environment where changing the classes in
Bridge or Interface records is challenging.

Requested-by: Andrew Lambeth <wal@nicira.com>
Tested-by: Andrew Lambeth <wal@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-19 10:24:46 -08:00
Ethan Jackson
4df08875a5 bond: Change default bond_mode to active-backup.
As promised, post version 1.4 the default bond_mode is changing to
active-backup with this commit.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-16 18:14:56 -08:00
Ethan Jackson
a9bf011b82 lacp: Enforce valid lacp-system-id configuration.
With this patch, when a user attempts to configure LACP with an
invalid system ID, OVS will fail to create the bond and warn.
This behavior seems safer then defaulting to the bridge Ethernet
address which may surprise users.

Bug #8710.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-16 18:14:56 -08:00
Ethan Jackson
c33a8a251b bond: Support ovs-appctl bond/show without arguments.
Similarly to lacp/show and cfm/show, the bond/show ovs-appctl
command now shows all bonds when given no arguments.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-16 18:14:55 -08:00
Ethan Jackson
69822b3c5a vswitchd: Document maximum queue_id for Linux QoS.
The code enforces an exclusive maximum of 0xf000 on queue_ids for
Linux queueing disciplines, but the documentation doesn't mention
this limitation.

Reported-by: Michael Mao <mmoa@nicira.com>
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-01-11 14:26:41 -08:00
Ben Pfaff
45c580a348 vswitchd: Also consider access port VLANs as "in use" for VLAN splinters.
It's natural to add an access port to a bridge and expect that trunk ports
will then immediately start to work properly with that VLAN without
additional configuration.  This change makes that happen.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-01-03 13:34:47 -08:00
Ansis Atteka
5bd3162068 vswitchd: fix "implicit declaration of function" build warning.
Included stream.h header file for connmgr.c and bridge.c files.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Reported-by: Ben Pfaff <blp@nicira.com>
2011-12-21 10:06:54 -08:00
Ben Pfaff
88f69f88b8 vswitchd: Document what changes to the database flush the flow table.
Requested-by: Hao Zheng <hzheng@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-20 16:50:17 -08:00
Ansis Atteka
ac4c900d4b vswitchd: In-band rules for Controller are missing after executing force-reload-kmod command
In current implementation vswitchd adds Controller in-band rules only if
there is a route in kernel routing table that might route traffic to the
Controller. But, when executing force-reload-kmod command, network
configuration (e.g. assigned IP addresses, routes) are flushed away,
hence Controller in-band rules are not added.

This commit fixes this limitation and allows vswitchd to add Controller
in-band rules even if there are no routes in the kernel routing table.

Issue: #8625

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2011-12-19 17:54:13 -08:00
Ben Pfaff
0e15264f96 unixctl: Implement quoting.
The protocol used by ovs-appctl has a long-standing bug that there
is no way to distinguish "ovs-appctl a b c" from "ovs-appctl 'a b c'".
This isn't a big deal because none of the current commands really
want to accept arguments that include spaces, but it's kind of a silly
limitation.

At the same time, the internal API is awkward because every user is
stuck doing its own argument parsing, which is no fun.

This commit fixes both problems, by adding shell-like quoting to the
protocol and modifying the internal API from one that passes a string
to one that passes in an array of pre-parsed strings.  Command
implementations may now specify how many arguments they expect.  This
simplifies some command implementations significantly.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-19 14:53:34 -08:00
Ethan Jackson
4c57c3bcfc bond: Warn of imminent default bond_mode change.
Post version 1.4.*, we are planning to change the default bond_mode
from balance-slb to active-backup.  This commit warns users of the
change so that they can prepare.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2011-12-16 12:50:09 -08:00
Ben Pfaff
acaf148661 bridge: Enable support for access and native VLAN ports on bonds.
Since Open vSwitch's inception we've disabled the use of bonds as access
ports, for no particularly good reason.  This also unintentionally
prevented bonds from being used as native VLAN ports.

This commit removes the code that prevented using bonds these ways

Reported-and-tested-by: "Michael A. Collins" <mike.a.collins@ark-net.org>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-12 14:44:23 -08:00
Ben Pfaff
7c70698f01 bridge: Avoid use-after-free with VLAN splinters and multiple bridges.
The VLAN splinters feature uses a "pool" to track and free allocated
blocks.  There's only one pool, but the implementation was freeing all of
the blocks in it for every bridge during reconfiguration, not just once for
each reconfiguration, so caused a use-after-free when there was more than
one bridge and a bridge other than the last one in the list of bridges had
a VLAN splinter port.

Bug #8671.
Reported-by: Michael Mao <mmao@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-12-09 20:47:27 -08:00
Luca Giraudo
733adf2aaf ofproto-dpif-sflow: allow sFlow to infer the agent device.
Bug #2407.
2011-12-06 13:01:27 -08:00
Ethan Jackson
96ada1a43f vswitch.xml: Fix bond-hash-basis documentation placement.
The bond-hash-basis other_config column was documented under "LACP
Configuration".  Instead it should be documented as general bonding
configuration.
2011-12-01 11:05:57 -08:00
Ethan Jackson
69fdadb1a9 lacp: Require non-zero system ID.
It's a bug if LACP is configured with a system ID of zero.  This
patch assert fails in this case.
2011-11-30 14:52:00 -08:00
Ethan Jackson
e567943d3b bridge: Honor lacp-system-id other_config setting.
The bridge code was completely ignoring the lacp-system-id setting.

Future patches will add tests which would have caught this issue.

Bug #8516.
2011-11-30 13:44:08 -08:00
Ben Pfaff
f145afdc20 bridge: Configure datapath ID earlier.
The design intent is for LACP ports to use the datapath ID as the default
system ID when none is specifically configured.  However, the datapath ID
is not available that early.  This commit makes it available earlier.

This commit does not fix another bug that prevents the LACP system ID from
being set properly (nothing sets it at all, in fact, so it always uses 0).

Build and unit tested only.
2011-11-30 13:25:36 -08:00
Ethan Jackson
4bee05c217 bridge: Remove redundant newline. 2011-11-30 11:20:52 -08:00
Ben Pfaff
5fcc0d004a ofproto: Add "fast path".
The key to getting good performance on the netperf CRR test seems to be to
handle the first packet of each new flow as quickly as possible.  Until
now, we've only had one opportunity to do that on each trip through the
main poll loop.  One way to improve would be to make that poll loop
circulate more quickly.  My experiments show, however, that even just
commenting out the slower parts of the poll loop yield minimal improvement.

This commit takes another approach.  Instead of making the poll loop
overall faster, it invokes the performance-critical parts of it more than
once during each poll loop.

My measurements show that this commit improves netperf CRR performance by
24% versus the previous commit, for an overall improvement of 87% versus
the baseline just before the commit that removed the poll_fd_woke().  With
this commit, ovs-benchmark performance has also improved by 13% overall
since that baseline.
2011-11-28 10:35:15 -08:00
Justin Pettit
9d24de3bca ovs-vswitchd: Track packet and byte statistics sent on mirrors.
This commit adds support for tracking the number of packets and bytes
sent through a mirror.  The numbers are kept in the new "statistics"
column on the mirror table in the "tx_packets" and "tx_bytes" keys.
2011-11-23 23:22:53 -08:00
Justin Pettit
9ae7ddc082 mirroring: Use more generic terms for mirroring. 2011-11-23 23:08:10 -08:00
Ben Pfaff
52a90c29ab Implement new "VLAN splinters" feature.
The "VLAN splinters" feature works around buggy device drivers in old Linux
versions.

This feature is deprecated.  When broken device drivers are no longer in
widespread use, we will delete this feature.

I tested earlier versions of this commit, but I have not tested this
version.

See ovs-vswitchd.conf.db(5) for more information.
2011-11-23 17:03:31 -08:00
Ben Pfaff
03eae5f86c vswitchd: Remove special case for VLAN devices.
We introduced this special case before the XenServer integration was
complete.  At that point, we were using VLAN devices on XenServer, with a
separate bridge for each VLAN, so we needed this special case.  But no
version of OVS for any supported XenServer version uses VLAN devices this
way, so we can delete the special case.
2011-11-23 13:19:53 -08:00
Ben Pfaff
a70e4b2a0a bridge: Fix incorrect comments. 2011-11-23 13:19:53 -08:00
Ben Pfaff
5490f250fd bridge: Avoid reading other_config columns with ovsdb_idl_get().
ovsdb_idl_get() doesn't work with synthetic records.  Upcoming commits
will start synthesizing more ports and interfaces, so we should avoid
using ovsdb_idl_get().

In the long term it's probably a good idea to come up with a better way
to do synthetic database records, one that causes less trouble.

Bug #8457.
2011-11-23 13:17:38 -08:00
Ethan Jackson
8b36f51e0f vswitch: Implement dscp column of the Queue table.
The dscp column of the queue table instructs Open vSwitch to mark
all traffic egressing the queue with the given DSCP bits in its tos
field.

Bug #7046.
2011-11-23 12:06:54 -08:00
Ethan Jackson
579a77e024 tests: Allow unit tests to run as root.
The unit tests did not allow users to run them as root because
ovs-vswitchd would destroy all of the existing 'system' datapaths.
This patch prevents ovs-vswitchd from registering 'system'
datapaths when running unit tests preventing the issue.
2011-11-18 13:48:57 -08:00
Ben Pfaff
5e9ceccdb6 Implement a new port setting "other-config:priority-tags".
Linux hosts (and probably others) tend to ignore priority-tagged frames, so
this new setting allows Open vSwitch to suppress sending them.

Reported-by: Michael Mao <mmao@nicira.com>
Bug #8320.
2011-11-17 17:11:53 -08:00
Ben Pfaff
653fe3a3f5 ofproto-dpif: Do not output RSPAN packets to SPAN ports.
It's always been my intention that ports used as port mirroring
destinations (SPAN) be reserved solely for that purpose.  When SPAN and
RSPAN are both configured, however, RSPAN mirror packets could get directed
to SPAN ports, which was unintentional.

This commit also updates the documentation to make it clear (if that is
even necessary) that this behavior is intentional.

Found by inspection.
2011-11-17 10:11:52 -08:00
Justin Pettit
80740385d2 stp: Track BPDU tx and rx counts.
When debugging spanning tree, it's useful to have counters about how
many BPDUs have been sent and received.  This commit keeps track of
these counters and stores them in a new "statistics" column of the Port
table.

Feature #8103
2011-11-15 09:29:08 -08:00
Ben Pfaff
0c41f08fbe docs: Always build ovs-vswitchd.conf.db.5 in srcdir.
Otherwise we build it in the build directory by default, which breaks the
Debian package build (unless we're working from a "make dist" created
tarball since that has ovs-vswitchd.conf.db.5 in the srcdir as part of
the distribution).

Reported-by: Ansis Atteka <aatteka@nicira.com>
Tested-by: Ansis Atteka <aatteka@nicira.com>
2011-11-11 15:10:55 -08:00
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