2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00
Commit Graph

1135 Commits

Author SHA1 Message Date
Ben Pfaff
7dea6ace33 vswitch.xml: Suggest secure fail-mode to avoid loops with multiple uplinks.
EXT-186.
Reported-by: Rob Sherwood <rob.sherwood@bigswitch.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-14 14:11:18 -07:00
Ben Pfaff
7a7708a055 ovs-vswitchd: Document some limits.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-14 12:24:20 -07:00
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ben Pfaff
612ca9c5d7 vswitch.xml: Document more details of CFM intervals.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 14:29:37 -07:00
Ben Pfaff
a5f607bc89 coverage: Make ovs-appctl command more useful and less alarming.
I've had a few complaints that ovs-vswitchd logs its coverage counters
at WARN level, but this is mainly wrong: ovs-vswitchd only logs coverage
counters at WARN level when the "coverage/log" command is used through
ovs-appctl.  This was even documented.

The reason to log at such a high level was to make it fairly certain that
these messages specifically requested by the admin would not be filtered
out before making it to the log.  But it's even better if the admin just
gets the coverage counters as a reply to the ovs-appctl command.  So that
is what this commit does.

This commit also improves the documentation of the ovs-appctl command.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-26 14:07:29 -07:00
Ben Pfaff
cc0864659f vswitchd: Clean up iface_create().
iface_create() did its work in an order that meant it had to do a lot more
cleanup on error paths than is otherwise needed.  This commit reorders the
work to avoid this extra cleanup.

bridge_ofproto_port_del() is no longer used after the refactoring so this
commit deletes it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 18:08:44 -07:00
Ben Pfaff
5344c1ac92 vswitchd: Make reconfiguration update port configuration again.
Commit bae7208e91 (bridge: Refactor bridge_reconfigure().) introduced
a regression in bridge reconfiguration.  Previously, reconfiguration would
update the configuration of each bridge port, so that if the controller
(or the admin) changed a port's options, then that change would propagate
to the datapath.  Following that commit, that no longer happened.

This commit restores that feature.

Bug #10972.
Reported-by: Michael Hu <mhu@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 18:08:43 -07:00
Ben Pfaff
01546f5d07 vswitchd: Make iface_create() return an indication of success.
This is the minimal change that gets the job done.  There are much nicer
ways to do this, but I'll leave that refactoring for later in the series.

The return value will have its first user in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 18:08:42 -07:00
Ben Pfaff
2a485ee87c vswitchd: Factor code to configure netdevs out of iface_create().
An upcoming patch will need the same code in another function.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 18:08:41 -07:00
Ben Pfaff
b54441b366 vswitchd: Refactor iface_refresh_type() into iface_get_type().
The calculation that this function does will need to be used in a
context where no "struct iface" is available in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 18:08:40 -07:00
Ben Pfaff
7f81a52a98 vswitchd: Drop 'need_refresh' member from struct iface.
It's no longer useful.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 18:08:39 -07:00
Ben Pfaff
8b5da7a613 vswitchd: Push ofproto_port declaration down to inner blocks.
Just a tiny code cleanup.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 18:08:38 -07:00
Ethan Jackson
93f331d30d bridge: Ignore null interfaces as required.
This issue has been around for quite some time.  It doesn't really
cause problems beyond some spurious warnings.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-23 09:30:33 -07:00
Ben Pfaff
5167b8709e vswitchd: Report actual port number, not -1, in "added interface" message.
CC: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 11:06:44 -07:00
Ben Pfaff
cf9deac507 vswitch.xml: Document Interface external-ids:iface-status.
This has been implemented for a long time but we forgot to document it.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-24 10:30:30 -07:00
Ethan Jackson
bae7208e91 bridge: Refactor bridge_reconfigure().
The existing bridge_reconfigure() implementation is suboptimal.
When adding lots of new ports, on every pass through the run loop
it allocates a bunch of "struct iface"s and "struct port"s, only to
destroy them when out of time.  Additionally, when there are errors
adding or deleting ports, it can fail to converge.  Instead it will
attempt and fail to add the same set of ports forever.

This patch rewrites bridge_reconfigure() using a new strategy.
Whenever the database changes, some initial bookkeeping is done,
and a list of future work is compiled.  The bridge begins whittling
down this list, and stops processing database changes until
finished.

Bug #10902.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-23 03:07:59 -07:00
Ethan Jackson
f5787280d4 vswitchd: Remove unused 'tag' from 'struct iface'.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-23 03:07:42 -07:00
Ben Pfaff
8a899ac445 vswitchd: Make "cfm_health" column ephemeral.
There's no need to log this to the on-disk database.

Spotted while examining "ovsdb-tool show-log" output.

Reported-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-20 11:12:46 -07:00
Ben Pfaff
597f98ccb5 vswitchd: Make "cfm_fault_status" column ephemeral.
There's no need to log this to the on-disk database.

Spotted while examining "ovsdb-tool show-log" output.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-20 11:07:33 -07:00
Ben Pfaff
72d32ac0b3 netlink-socket: Make caller provide message receive buffers.
Typically an nl_sock client can stack-allocate the buffer for receiving
a Netlink message, which provides a performance boost.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-18 20:28:48 -07:00
Ethan Jackson
b20a8f7c11 lacp: Remove heartbeat mode.
The LACP heartbeat mode was used to monitor interfaces for
connectivity.  It turns out that LACP is inferior to CFM for this
purpose.  For the sake of simplicity this patch removes the
feature.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-17 13:36:32 -07:00
Ethan Jackson
bf83f7c82f lacp: Remove custom transmission intervals.
Open vSwitch allowed users to set a custom LACP PDU transmission
interval.  This turned out to be an ill conceived idea which was
more confusing than useful.  This patch reverts Open vSwitch to the
behavior supported in the LACP specification: two transmission
intervals, fast and slow.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-17 13:36:32 -07:00
Ethan Jackson
cea1576889 vswitch: Use consistent representation of DSCP bits.
There are two sensible ways to represent the 6 DSCP bits of an IP
packet.  One could represent them as an integer in the range 0 to
63.  Or one could represent them as they would appear in the tos
field (0 to 63) << 2.  Before this patch, OVS had used the former
method for the DSCP bits in the Queue Table, and the latter for the
DSCP in the Controller and Manager tables.  Since the ability to
set DSCP bits in the Controller and Manager tables is so new that
it hasn't been released yet, this patch changes it to use the
existing style employed in the Queue table.  Hopefully this should
make the code and configuration less confusing.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-17 13:36:01 -07:00
Ethan Jackson
c7e7bb21ff bridge: Rate limit port creations and deletions.
In some datapaths, adding or deleting OpenFlow ports can take quite
a bit of time.  If there are lots of OpenFlow ports which needed to
be added in a run loop, this can cause Open vSwitch to lock up and
stop setting up flows while trying to catch up.  This patch lessons
the severity of the problem by only doing a few OpenFlow port adds
or deletions per run loop allowing other work to be done in
between.

Bug #10672.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-11 13:46:04 -07:00
Ethan Jackson
7e041ba514 bridge: Rate limit default address warnings.
This information is typically not more useful if displayed more
often.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-11 13:01:47 -07:00
Ben Pfaff
854a94d9d2 ovsdb-idl: Simplify transaction retry.
Originally the IDL transaction state machine had a return value
TXN_TRY_AGAIN to signal the client to wait for a change in the database and
then retry its transaction.  However, this logic was incomplete, because
it was possible for the database to change before the reply to the
transaction RPC was received, in which case the client would wait for a
further change.  Commit 4fdfe5ccf8 (ovsdb-idl: Prevent occasional hang
when multiple database clients race.) fixed the problem by breaking
TXN_TRY_AGAIN into two status codes, TXN_AGAIN_WAIT that meant to wait for
a further change and TXN_AGAIN_NOW that meant that a change had already
occurred so try again immediately.

This is correct enough, but it is more complicated than necessary.  It is
simpler and just as correct to use a single "try again" status that
requires the client to wait for a change relative to the database contents
*before* the transaction was committed.  This commit makes that change.
It also changes ovsdb_idl_run()'s return type from bool to void because
its return type is hardly useful anymore.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-12 08:19:01 -07:00
Ansis Atteka
a65084987b vswitchd: Remove port from datapath if it becomes non-operational
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>
2012-04-09 10:19:42 -07:00
Mehak Mahajan
2b540ecba2 Added handling of previously ignored cfm faults.
The CFM packets that are out of sequence or contain invalid cfm_interval were
previously not ignored. The behavior is changed with this patch to not
process those CFM frames.

Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-04-06 11:59:46 -07:00
Mehak Mahajan
3967a833e4 Granular link health statistics for cfm.
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>
2012-04-05 14:41:37 -07:00
Mehak Mahajan
222d3ba460 Revert "Granular link health statistics for cfm."
Missed commiting one line of change.
This reverts commit c75b7e39d9.

Signed-off-by: Mehak Mahajan <mmahajan@nicira.com>
2012-04-05 14:40:52 -07:00
Mehak Mahajan
c75b7e39d9 Granular link health statistics for cfm.
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>
2012-04-05 13:34:47 -07:00
Ben Pfaff
6e492d8145 Rearrange structures to better fit valgrind's memory leak heuristics.
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>
2012-03-28 14:55:27 -07:00
Ben Pfaff
eaa67ba8d5 Avoid possibly including an old vswitch-idl.h.
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>
2012-03-27 15:57:52 -07:00
Mehak Mahajan
f125905cdd Allow configuring DSCP on controller and manager connections.
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>
2012-03-23 18:13:08 -07:00
Pravin B Shelar
c1f15723c0 vswitchd: Do not refresh existing iface on new device addition.
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>
2012-03-23 14:14:24 -07:00
Ethan Jackson
f67f13545e idl: New helpers for accessing string maps.
This removes some boilerplate from the bridge.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-22 16:27:04 -07:00
Ethan Jackson
0acaddd05f bridge: Shorten long lines.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-22 11:28:58 -07:00
Pravin B Shelar
2c2ea5a88a netdev: Rename netdev->get_status() to netdev->get_drv_info().
get_status actually returns driver information, so get_drv_info()
is better name.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
2012-03-22 10:58:32 -07:00
Ethan Jackson
189cb9e468 cfm: Support random VLAN tag for CCM PDUs.
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>
2012-03-19 18:03:36 -07:00
Ethan Jackson
6e037e3ca6 idl: Move vswitch-idl to libopenvswitch.
This is cleaner then having multiple programs build the idl
independently.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-03-19 10:52:53 -07:00
Ben Pfaff
8a07709cb8 configure: Remove --with-build-number.
From early days, Nicira used the --with-build-number option to configure to
stamp our internal builds.  We've since switched to another scheme, so
this option is obsolete.

Good riddance.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-19 10:07:09 -07:00
Chris Wright
d8965755e7 configure: add configure option to disable building brcompat
This adds ability to do:

  ./configure --disable-brcompat

to disable building userspace and kernel module associated with
providing linux bridge compatibility.  Sources should still be
distributed w/ make dist.

While there, update comment referring to long removed veth driver
which is now relevant for brcompat module.

Cc: Jesse Gross <jesse@nicira.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2012-03-13 16:50:42 -07:00
Chris Wright
9b80f761be datapath: omit _mod from module names
This renames the datapath modules:

  openvswitch_mod -> openvswitch
  brcompat_mod -> brcompat

The first makes the module name consistent with upstream, and the latter
is just for internal consistency.  This makes tools, and documentation
refer to a common module name regardless if it's coming from upstream
linux or built from datapath/ as part of a local build.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Jesse Gross <jesse@nicira.com>
2012-03-09 11:20:54 -08:00
Ben Pfaff
6c0386119d netdev: Abstract "features" interface away from OpenFlow 1.0.
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>
2012-03-07 14:05:09 -08:00
Ben Pfaff
87ea5e5e26 Begin breaking openflow-1.0.h into common and version-specific definitions.
The intention is that, as each OpenFlow 1.1 and 1.2 feature is added to Open
vSwitch, the corresponding protocol definitions will be broken up this way:

  - Definitions that are the same in OF1.0 and OF1.1 will retain the "OFP"
    or "ofp" prefix and move to openflow-common.h.

  - Definitions that are specific to OF1.0 will be renamed with an "OFP10"
    or "ofp10" prefix and stay in openflow-1.0.h.

  - Definitions that are specific to OF1.1 or to OF1.1 and OF1.2 will be
    renamed with an "OFP11" or "ofp11" prefix and move to openflow-1.1.h.

  - Definitions that are specific to OF1.2 will be renamed with an "OFP12"
    or "ofp12" prefix and move to openflow-1.2.h.

This commit starts this process with some basic OpenFlow definitions.

Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-07 14:05:04 -08:00
Gurucharan Shetty
c473936b9a xenserver: Add vm-id to the external_ids.
The vm-id external id in the interface table will uniquely identify a VM
that is connected to a bridge through that interface.

In xenserver, this will have the same value as the external id - xs-vm-uuid
and can be overridden by setting the nicira-vm-id key in the other_config
field of VM record of XAPI.

Bug #10020.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-03-06 14:26:09 -08:00
Ben Pfaff
7be6d701fc vswitchd: Document behavior of 802.1p priorities with VLAN splinters.
Reported-by: likunyun <kunyunli@hotmail.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-03-05 13:37:03 -08:00
Ben Pfaff
e56365a56e bridge: Remove unwanted ports at time of ofproto creation.
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>
2012-03-05 13:08:35 -08:00
Ben Pfaff
8bddb894d9 bridge: Drop log message when a QoS record lacks a default queue.
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>
2012-02-29 10:43:50 -08:00
Ethan Jackson
bde9f75de1 unixctl: New JSON RPC back-end.
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>
2012-02-21 00:02:20 -08:00