If kernel module rejects config changes then vswitchd sets the ofport
column to -1, but does not remove the non-operational port from the
datapath. This patch fixes this problem.
ovs-vsctl add-br ovsbr
ovs-vsctl add-port ovsbr p1
ovs-vsctl add-port ovsbr p2
ovs-vsctl set Interface p1 options:remote_ip=2.1.1.1 options:key=123 type=gre
ovs-vsctl set Interface p2 options:remote_ip=1.1.1.1 options:key=123 type=gre
ovs-vsctl set Interface p2 options:remote_ip=2.1.1.1 options:key=123 type=gre
ovs-dpctl show #observe that p2 does not appear here anymore
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
The changes display the cfm_health of an interface. The cfm_health
is an exponential weighted moving average of the health of all
remote_mpids. The value can vary from 0 to 100, 100 being very healthy
and 0 being unhealthy.
Feature #10363
Requested-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
The changes display the cfm_health of an interface. The cfm_health
is an exponential weighted moving average of the health of all
remote_mpids. The value can vary from 0 to 100, 100 being very healthy
and 0 being unhealthy.
Feature #10363
Requested-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
valgrind's memory leak detector considers a pointer to the head of a memory
block to be "definitely" a pointer to that memory block but a pointer to
the interior of a memory block only "possibly" a pointer to that memory
block. Open vSwitch hmap_node and list data structures can go anywhere
inside a structure; if they are in the middle of a structure then valgrind
considers pointers to them to be possible leaks. Therefore, this commit
moves some of these from the middle of data structures to the head, to
reduce valgrind's uncertainty.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Codes that uses #include "vswitch-idl.h" can get an older version of this
header, because this header file moved from vswitchd/ to lib/ and the
older generated file might still be present.
This helps out two ways:
* "make clean" will delete the generated files from their old
locations.
* Use #include "lib/vswitch-idl.h" to explicitly avoid including the
files from their old locations.
Reported-by: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
The changes allow the user to specify a separate dscp value for the
controller connection and the manager connection. The value will take
effect on resetting the connections. If no value is specified a default
value of 192 is chosen for each of the connections.
Feature #10074
Requested-by: Rajiv Ramanathan <rramanathan@nicira.com>
Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
There is no need to refresh status and stats for existing devices
if iface mtu is missing in ovs-db as missing MTU could just mean
error in last MTU read for that device.
So we can refresh stats for devices which are just created.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
CCM PDUs may take a different path through the network depending on
the VLAN tag they carry. In order to exercise these paths, it
may be advantageous to use a random VLAN tag.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
netdev_get_features() and other functions have always used OpenFlow 1.0
"enum ofp_port_features" bits as part of their interface. This commit
switches over to using an internally defined interface that is not tied
directly to any OpenFlow version, making evolution of each side of the
interface easier in the future.
Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
The reconfiguration code only deleted unwanted ports for bridges that had
been created in previous (re)configurations. In fact, we should run this
step even for bridges that are newly added, e.g. to delete ports that
were added by a previous run of ovs-vswitchd and deleted from the database
between runs.
Before this commit, the following left "int" in datapath br0. After this
commit, "int" is properly deleted:
1. With ovs-vswitchd running:
# ovs-vsctl add-br br0
# ovs-vsctl add-port br0 int -- set interface int type=internal
2. Kill ovs-vswitchd, then:
# ovs-vsctl --no-wait -- del-port br0 int
3. Restart ovs-vswitchd.
Bug #9957.
Reported-by: Hiroshi Tanaka <htanaka@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Apparently we're planning to use this configuration regularly at Nicira.
Bug #7413.
Requested-by: Bryan Fulton <bryan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
The unixctl library had used the vde2 management protocol since the
early days of Open vSwitch. As Open vSwitch has matured, several
Python daemons have been added to the code base which would benefit
from a unixctl implementations. Instead of implementing the old
unixctl protocol in Python, this patch changes unixctl to use JSON
RPC for which we already have an implementation in both Python and
C. Future patches will need to implement a unixctl library in
Python on top of JSON RPC.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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.
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.
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.
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.
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.
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