summaryrefslogtreecommitdiff
path: root/vswitchd/ovs-vswitchd.c
Commit message (Collapse)AuthorAgeFilesLines
* Drop spurious 'H' cases from daemon option parsing switch statements.Ben Pfaff2011-08-221-1/+0
| | | | Help is 'h'. I don't see how 'H' can ever happen.
* util: Introduce get_program_version function.Justin Pettit2011-08-041-1/+1
| | | | Useful in an upcoming commit.
* ovs-vswitchd: Make database socket command-line argument optional.Ben Pfaff2011-07-261-10/+19
| | | | | In practice the default location is the only one used, so we might as well make it easy.
* signals: New function signal_unregister().Ben Pfaff2011-06-071-0/+1
| | | | Fixes a very minor memory leak in ovs-vswitchd reported by valgrind.
* Merge 'next' into 'master'.Ben Pfaff2011-05-181-3/+0
|\ | | | | | | | | | | | | | | | | | | I know already that this breaks the statsfixes that were implemented by the following commits: 827ab71c97f "ofproto: Datapath statistics accounted twice." 6f1435fc8f7 "ofproto: Resubmit statistics improperly account during..." These were already broken in a previous merge. I will work on a fix.
| * Merge 'master' into 'next'.Ben Pfaff2011-05-121-6/+1
| |\
| * | dpif: Improve abstraction by making 'run' and 'wait' functions per-dpif.Ben Pfaff2011-05-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | Until now, the dp_run() and dp_wait() functions had to be called at the top level of the program because they applied to every open dpif. By replacing them by functions that take a specific dpif as an argument, we can call them only from ofproto, which is currently the correct layer to deal with dpifs.
* | | Consistently write null pointer constants as NULL instead of 0.Ben Pfaff2011-05-161-7/+7
| |/ |/| | | | | Found with sparse.
* | stream-ssl: Improve messages when configuring SSL if it is unsupported.Ben Pfaff2011-05-101-6/+1
|/ | | | | | | | | | | | | | Previously, if --private-key or another option that requires SSL support was used, but OVS was built without OpenSSL support, then OVS would fail with an error message that the specified option was not supported. This confused users because it made them think that the option had been removed: http://openvswitch.org/pipermail/discuss/2011-April/005034.html This commit improves the error message: OVS will now report that it was built without SSL support. This should be make the problem clear to users. Reported-by: Aaron Rosen <arosen@clemson.edu> Feature #5325.
* daemon: Integrate checking for an existing pidfile into daemonize_start().Ben Pfaff2011-04-041-1/+0
| | | | | | | | | | | | Until now, it has been the responsibility of an individual daemon to call die_if_already_running() at an appropriate time. A long time ago, this had to happen *before* daemonizing, because once the process daemonized itself there was no way to report failure to the process that originally started the daemon. With the introduction of daemonize_start(), this is now possible, but we haven't been taking advantage of it. Therefore, this commit integrates the die_if_already_running() call into daemonize_start() and deletes the calls to it from individual daemons.
* Log anything that could prevent a daemon from starting.Ben Pfaff2011-04-041-2/+2
| | | | | If a daemon doesn't start, we need to know why. Being able to consistently consult the log to find out is helpful.
* Remove /proc/net compatibility support.Ben Pfaff2011-02-111-15/+1
| | | | | | | | This feature was included only to allow Citrix QA to run some tests that interacted directly with the bridge. This feature hasn't been turned on for some time, so it should not be necessary any longer. Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs-vswitchd: Complete daemonization only after initial configuration.Ben Pfaff2011-02-071-3/+1
| | | | | | | Otherwise when we add support for saving and restoring configuration of internal devices around kernel module unload and reload, there's no easy way for the "restore" code to tell when all the interfaces should be set up and ready for configuration.
* daemon: Define daemon options enums the same way as other option enums.Ben Pfaff2011-02-071-1/+2
| | | | | | | Other modules that accept options use this style and I don't see a reason for the daemon code to be different. The style used by the daemon code until now runs the risk of ending up with conflicting values accidentally, which would be confusing.
* ovs-vswitchd: Release most memory on normal exit.Ben Pfaff2010-12-131-0/+2
| | | | | This makes "valgrind --leak-check=full --show-reachable=yes" output much easier to read.
* Implement stress option framework.Ben Pfaff2010-11-301-0/+2
| | | | | | | | | | | | | | | | Stress options allow developers testing Open vSwitch to trigger behavior that otherwise would occur only in corner cases. Developers and testers can thereby more easily discover bugs that would otherwise manifest only rarely or nondeterministically. Stress options may cause surprising behavior even when they do not actually reveal bugs, so they should only be enabled as part of testing Open vSwitch. This commit implements the framework and adds a few example stress options. This commit started from code written by Andrew Lambeth. Suggested-by: Henrik Amren <henrik@nicira.com> CC: Andrew Lambeth <wal@nicira.com>
* Add new "dummy" netdev and dpif implementations for use in unit tests.Ben Pfaff2010-11-291-1/+8
|
* Make the "exit" unixctl command reliable in ovsdb-server, ovs-vswitchd.Ben Pfaff2010-11-161-0/+3
| | | | | | | | | | If "ovs-appctl exit" happens to hit ovsdb-server or ovs-vswitchd at a moment when nothing else is happening to wake the daemon up, it can take a long time for them to exit. This seems to account for occasional "make check" failures on Nicira's internal builds. It probably fixes some Debian automatic build failures as well.
* vlog: Make client supply semicolon for VLOG_DEFINE_THIS_MODULE.Ben Pfaff2010-10-291-1/+1
| | | | | It's kind of odd for VLOG_DEFINE_THIS_MODULE to supply its own semicolon, so this commit switches to the more common form.
* vlog: Introduce VLOG_DEFINE_THIS_MODULE for declaring vlog module in use.Ben Pfaff2010-07-211-2/+2
| | | | | | | Adding a macro to define the vlog module in use adds a level of indirection, which makes it easier to change how the vlog module must be defined. A followup commit needs to do that, so getting these widespread changes out of the way first should make that commit easier to review.
* vlog: Remove explicit calls to vlog_init().Ben Pfaff2010-07-211-1/+0
| | | | This is no longer necessary.
* timeval: Make time_init() static and remove calls to it.Ben Pfaff2010-07-211-1/+0
| | | | | | Since the timeval module now initializes itself on-demand, there is no longer any need to initialize it explicitly, or to provide an interface to do so.
* ovs-vswitchd: Allow bridge code to manage the database connection itself.Ben Pfaff2010-06-231-33/+4
| | | | | | | | | | Until now, the ovs-vswitchd main loop has managed the connection to the database. This worked adequately until now, but upcoming patches will tie the bridge code more tightly to the database, which means that the bridge needs more control over interaction with the database connection and thus that it is better for the bridge to handle that connection itself. This commit makes the latter change, moving the database interaction from the ovs-vswitchd main loop into bridge.c.
* ovsdb-idl: Simplify usage of ovsdb_idl_run().Ben Pfaff2010-06-231-8/+6
| | | | | It makes client code simpler if ovsdb_idl_run() simply lets the caller know whether anything changed.
* ovs-vswitchd: Implement "exit" unixctl command.Ben Pfaff2010-05-051-2/+15
| | | | | | This is useful for profiling, since common profilers do not print anything until the process terminates, and only if the process terminates in the ordinary way by calling exit().
* Merge "citrix" branch into "master".Ben Pfaff2010-03-251-0/+15
|\ | | | | | | | | | | | | | | This merge is long overdue, simply because I forgot that there were outstanding changes on "citrix" that had not yet been merged. The important fix here is the addition of mlockall. This fixes some bugs seen under stressful conditions in XenServer.
| * ovs-vswitchd: Add --mlockall option and enable on XenServer.Ben Pfaff2009-12-011-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On XenServer 5.5 we found that running 4 simultaneous vm-import operations on iSCSI caused so much disk and cache activity that (we suspect) parts of ovs-vswitchd were paged out to disk and were not paged back in for over 10 seconds, causing the XenServer to fall off the network and the XenCenter connection to fail. Locking ovs-vswitchd into memory appears to avoid this problem. Henrik reports that, with memory locking, importing 11 VMs simultaneously completed successfully. Bug #2344.
* | ovsdb: Add simple constraints.Ben Pfaff2010-02-081-0/+1
| |
* | daemon: Make --monitor process change its process title.Ben Pfaff2010-01-261-0/+1
| | | | | | | | | | | | | | | | | | | | When --monitor is used, administrators sometimes become confused about the presence of two copies of each process. This commit attempts to clarify the situation by making the monitoring process change its process name, as seen in /proc/$pid/cmdline and in "ps", to clearly indicate what is going on. CC: Dan Wendlandt <dan@nicira.com>
* | unixctl: Avoid double error reporting.Ben Pfaff2010-01-151-2/+2
| | | | | | | | | | All of these programs were re-reporting an error that unixctl_server_create() had already reported. There's no need for that.
* | Remove "fault" module.Ben Pfaff2010-01-061-2/+0
| | | | | | | | | | | | | | | | | | This module, which catches segmentation faults and prints a backtrace before exiting, was useful for a while, but I believe that it has now outlived its purpose. It is altogether better to have a core dump from which one can extract much more information than a usually-poor backtrace, and core dumps are much better integrated into a typical Unix system. In addition, the "fault" module was of course not all that portable.
* | ovs-vswitchd: Add ability to bootstrap SSL.Ben Pfaff2010-01-061-1/+7
| |
* | vconn: Reimplement in terms of the "stream" abstraction.Ben Pfaff2010-01-061-4/+5
| | | | | | | | | | | | This reduces the amount of redundancy in the source tree, by making all of the current implementations of a vconn simply delegate to the "stream" abstraction.
* | Add SSL support to "stream" library and OVSDB.Ben Pfaff2010-01-061-1/+1
| |
* | daemon: Allow daemon child process to report success or failure to parent.Ben Pfaff2009-12-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are conflicting pressures in startup of a daemon process: * The parent process should exit with an error code if the daemon cannot start up successfully. * Some startup actions must be performed in the child process, not in the parent. The most obvious of these are file locking, since child processes do not inherit locks, and anything that requires knowing the child process's PID (e.g. unixctl sockets). Until now, this conflict has usually been handled by giving up part of the first property, i.e. in some cases the parent process would exit successfully and the child immediately afterward exit with a failure code. This commit introduces a better approach, by allowing daemons to perform startup work in the child and only then signal the parent that they have successfully started. If the child instead exits without signaling success, the parent passes this exit code along to its own parent. This commit also modifies the daemons that can usefully take advantage of this new feature to do so.
* | vswitchd: Initial conversion to database-based configuration.Ben Pfaff2009-12-031-65/+42
| | | | | | | | | | | | This has seen very little testing, so some features are almost certainly busted. Port mirroring is not yet converted, so it will definitely not work.
* | unixctl: Allow passing auxiliary data to unixctl commands.Ben Pfaff2009-10-291-3/+3
| | | | | | | | | | This will allow users of unixctl to avoid using global variables, leading to cleaner code.
* | Merge citrix into master.Ben Pfaff2009-08-191-4/+7
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | This was a somewhat difficult merge since there was a fair amount of superficially divergent development on the two branches, especially in the datapath. This has been build-tested against XenServer 5.5.0 and XenServer 5.7.0 build 15122. It has been booted and connected to XenCenter on 5.5.0. The merge revealed a couple of outstanding bugs, which will be fixed on citrix and then merged back into master.
| * netdev: Implement an abstract interface to network devices.Ben Pfaff2009-07-301-0/+3
| | | | | | | | | | | | | | | | | | This new abstraction layer allows multiple implementations of network devices in a single running process. This will be useful, for example, to support network devices that are simulated entirely in the running process or that communicate with other processes over Unix domain sockets, etc. The reimplemented tap device support in this commit has not been tested.
| * vswitchd: Avoid netdev_nodev_set_policing().Ben Pfaff2009-07-301-3/+0
| | | | | | | | | | | | The netdev_nodev_*() functions have always been a bit of a kluge. It's better to keep a network device open than to open it every time that it is needed.
| * dpif: Add new functions dp_run() and dp_wait().Ben Pfaff2009-07-061-0/+3
| | | | | | | | | | The upcoming netdev-based dpif needs a hook where it can process packets and throw them against the flow table, and this provides a suitable place.
| * Merge commit 'origin/citrix'Justin Pettit2009-07-011-1/+3
| |\
| * | Remove references to Open vSwitch being a "virtual" switchJustin Pettit2009-06-231-1/+1
| | | | | | | | | | | | | | | The Open vSwitch system is not limted to being a virtual switch. This commit removes these references. We are now a "versatile" switch!
* | | vswitchd: Initialize cfg properly and check return valuesJustin Pettit2009-08-031-1/+5
| |/ |/| | | | | | | | | A previous checkin added the cfg_init() function, so we now call it. We also check the return value of the initial call to cfg_read(), since if it fails, there's not much point in continuing.
* | vswitchd: Reduce number of calls to reconfigure() during mgmt updatesJustin Pettit2009-06-191-1/+3
|/ | | | | | | | When we receive an OpenFlow management protocol Config Update, we immediately force the switch to reconfigure itself. This is functionally correct, but it can cause long delays before return control back to the switch. We now keep track of whether there were any changes and then only force a reconfigure once per management run.
* Update primary code license to Apache 2.0.Ben Pfaff2009-06-151-20/+9
|
* Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.v0.90.0Ben Pfaff2009-07-081-0/+255