2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00
Commit Graph

4763 Commits

Author SHA1 Message Date
Ansis Atteka
7a6c067d1a datapath: Release rtnl_lock if ovs_vport_cmd_build_info() failed
This patch fixes a possible lock-up bug where rtnl_lock might not
get released.

Acked-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2012-05-03 17:13:13 -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
Justin Pettit
b0a5c43bd7 ofproto: Rate-limit STP status errors on non-existent ports.
As part of the bridge's main loop, it queries the STP status of all
ports.  If the port doesn't exist, log files can become filled with
warning messages.  This situation is very unusual, since system devices
do not normally disappear, but it's easy enough to rate-limit these
messages.

Bug #10936

Reported-by: Reid Price <reid@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
2012-05-02 10:20:07 -07:00
Ben Pfaff
f66b87de59 DESIGN: Document uses for flow cookies.
The paragraph near the end that starts out "However, unlike OpenFlow 1.1,
..." seems to correctly document OVS behavior, but it also seems like
pretty lousy behavior.  Justin says that he's going to fix it before we
put out an OVS release version with this behavior.

CC: Justin Pettit <jpettit@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 16:24:09 -07:00
Ben Pfaff
2dc7590de5 ovs-ctl: Make "force-reload-kmod" warn when DHCP clients must be restarted.
This should make it more obvious when the admin needs to restart a DHCP
client (or other daemon).  Without this, unless the admin carefully reads
the documentation, the first notice he gets about a need to restart the
DHCP client can easily be when the lease expires and the machine drops off
the network.

Bug #5391.
Tested-by: Gurucharan Shetty <gshetty@nicira.com>
Suggested-by: Duffie Cooley <dcooley@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 15:36:44 -07:00
Ben Pfaff
99811d070e tests: Fix typo in comment.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 15:34:01 -07:00
Ben Pfaff
e063192769 ovs-ofctl: Document padding in "note" actions.
Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 15:28:08 -07:00
Ben Pfaff
b9718b7ba7 ofp-print: Add some more white space to flow dumps.
Before idle_age and hard_age were added, in the absence of timeouts there
was a space between the statistics for a flow and the start of the flow
match.  This restores that space.

Requested-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 15:21:39 -07:00
Ben Pfaff
4530afbaf4 ovs-ofctl: Document importance of priorities.
Multiple users have asked me about this.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 14:29:39 -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
300d3e95f9 ovs-appctl: Point to individual daemon manpages in docs.
Sometimes users seem surprised that appctl commands are documented.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 14:29:37 -07:00
Ben Pfaff
33f1ff8464 netdev: Document use for get_etheraddr member of struct netdev_class.
This has confused developers adding hardware support, e.g.:
http://openvswitch.org/pipermail/dev/2012-April/016350.html

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-01 14:29:35 -07:00
Ben Pfaff
1ea9e60979 connmgr: Log when controllers are added and removed.
Otherwise occasionally during debugging it can hard to figure out why a
controller connection seemed to drop for a while (when in fact it happened
because the configuration changed).

Suggested-by: Natasha Gude <natasha@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-30 14:05:10 -07:00
Ben Pfaff
f8f26e9865 INSTALL.Linux: Document use of "sparse" with Open vSwitch.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-30 14:00:51 -07:00
Ben Pfaff
56eb405ae4 cfm: Avoid constructing log message that will be dropped by rate-limiting.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-30 13:02:00 -07:00
Ben Pfaff
e09616c6c9 ovs-bugtool: Add "ovs-vsctl show" output to bugtool.
The information output by "ovs-vsctl show" is a subset of that available
elsewhere in bugtool output, but it is human-readable instead of needing
to be processed through ovsdb-server or ovsdb-tool, so it is much more
convenient for basic diagnosis.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-30 11:38:59 -07:00
Ben Pfaff
e2dfe6d3a8 ovs-bugtool: Add "ovs-appctl coverage/show" output to bugtool.
This can be useful for diagnosis.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-30 11:38:59 -07:00
Ben Pfaff
b74aec2f36 debian: Install ovs-bugtool scripts by wildcard to openvswitch-common.
Same for debian/copyright.

This reduces the number of files to update when we add bugtool plugins.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-30 10:29:58 -07:00
Gurucharan Shetty
43d3667854 xenserver: Update Open vSwitch post upgrade instructions.
Currently, when we upgrade the userspace rpm for XenServer,
we print a message asking users to reboot the hypervisor.
This is not needed. The reboot of hypervisor is needed when
we upgrade the rpm containing the kernel module.  This
reboot can sometimes be avoided by running a
"service openvswitch force-reload-kmod".

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-04-27 15:26:56 -07:00
Ben Pfaff
b5a36e3878 meta-flow: Correctly set destination MAC in mf_set_flow_value().
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-27 12:46:01 -07:00
Ethan Jackson
acb9da4022 rconn: Simplify rconn_send() semantics.
Before this patch, rconn_send() would delete 'b' on success, and
not on error.  This is confusing and error-prone.  This patch
causes rconn_send() to always delete 'b'.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-04-26 00:44:07 -07:00
Ansis Atteka
47284b1fc6 nicira-ext: Support masking of nd_target field
This commit adds support to specify a mask in CIDR format for
the nd_target field.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
2012-04-26 15:22:48 -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
275a506cbe coverage: Rate-limit logging coverage information.
I'd always assumed that the exponentially weighted moving average code in
timeval was enough rate-limiting, but I actually encountered a pathological
case some time ago that forced this coverage information to print once a
second or so, which seems too often.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-26 14:07:16 -07:00
Ben Pfaff
c563de0e38 timeval: Rate-limit logging rusage information.
I'd always assumed that the exponentially weighted moving average code
here was sufficient rate-limiting, but I actually encountered a
pathological case some time ago that forced this rusage information to
print once a second or so, which seems too often.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-26 14:06:27 -07:00
Ben Pfaff
906bb3d008 cfm: Log fault status changes more informatively.
Until now, fault status changes just log the new status.  This means that
the administrator has to find two consecutive status change messages to
see what actually changed.

This commit changes the log message format to prefix new faults with '+'
and faults that disappeared with '-'.  Existing faults that are still
present are not prefixed.

This also simplifies the code a little by making ds_put_cfm_fault()
put spaces before fault names instead of after.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-26 13:57:12 -07:00
Ben Pfaff
c640c04f64 json: Correct position tracking in JSON parser implementations.
When json_lex_input() returns false, the parser does not consume the byte
passed in.  That byte will get processed again in the next iteration of
the json_parser_feed() loop.  Therefore, until now, this code has
double-counted bytes that cause a false return from json_lex_input().

This fixes the problem.  Every input byte is now counted only once.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-26 09:48:28 -07:00
Ben Pfaff
3a4548cfb2 jsonrpc: Keep jsonrpc_recv() from taking over the CPU.
jsonrpc_recv() could take an unbounded amount of CPU time as long as data
kept arriving, preventing other work from taking place.  This limits the
amount of work to processing at most 25 kB of received data and then
yielding to the caller.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-25 15:17:31 -07:00
Ben Pfaff
896b32721d Fix memory leaks.
Found by valgrind.

Reported-by: Ethan Jackson <ethan@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-25 14:38:10 -07:00
Simon Horman
36f3999b70 Add OXM data to mf_fields
Add oxm_name and oxm_header elements to struct mf_field
and populate those entries for fields that are present
in both NXM and the OXM basic class.

This implementation was suggested by Ben Pfaff.

This does not address any possible differences in the NXM and
OXM basic class fields, for instance different maskability.
That may be addressed later as needed.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-25 10:04:04 -07:00
Simon Horman
cb6e2b0178 Add OXM_OF_* definitions
These oxm_type definitions values will may be used
when parsing serialising OXM TLVs.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-25 10:03:17 -07:00
Simon Horman
7132cc8426 Correct OFPXMC12_{OPENFLOW_BASIC,EXPERIMENTER} definitions
This corrects errors that appear to have been included
by me in the original version.

Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-25 10:02:22 -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
56e9c3b998 DESIGN: Describe principles of in-band control.
These principles are drawn from an email I sent to the openflow-spec list
long ago.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-23 14:15:32 -07:00
Ben Pfaff
83664f72d3 tests: Generalize 'sed' calls in MAC learning test to more than one digit.
With "check-valgrind" the test can take more than 10 seconds to run, so
replacing only a single trailing digit with ? ends up with 1? which causes
the test to fail.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-23 14:11:19 -07:00
Ben Pfaff
34a5710475 tests: Avoid daemon race between pidfile creation and parent notification.
This was causing "check-valgrind" to sometimes fail in this test.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-23 14:11:19 -07:00
Ben Pfaff
7436ed8071 ofproto: Fix use-after-free error when ports disappear.
update_port() can delete the port for which it is called, if the underlying
network device has been destroyed, so HMAP_FOR_EACH is unsafe in
ofproto_run().

Less obviously, update_port() can delete unrelated ports.  For example,
suppose that initially device A is port 1 and device B is port 2.  If
update_port("A") runs just after this, then it will ofport_remove() both
ports, then ofport_install() A as the new port 2.

So this commit first assembles a list of ports to update, then updates them
in a separate loop.

Without this commit, running "ovs-dpctl del-dp" while ovs-vswitchd is
running consistently causes a crash for me within a few seconds.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-04-23 09:16:18 -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