summaryrefslogtreecommitdiff
path: root/utilities/ovs-openflowd.c
Commit message (Collapse)AuthorAgeFilesLines
* ovs-openflowd: Rename test-openflowd and move to "tests" directory.Ben Pfaff2011-06-071-541/+0
| | | | | Too many users thought that they needed to run ovs-openflowd at the same time as ovs-vswitchd. I hope that this change discourages them.
* Merge 'next' into 'master'.Ben Pfaff2011-05-181-15/+7
|\ | | | | | | | | | | | | | | | | | | 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-5/+1
| |\
| * | ofproto: Improve abstraction by adding function ofproto_parse_name().Ben Pfaff2011-05-111-2/+1
| | | | | | | | | | | | | | | This means that ovs-ofctl and ovs-openflowd don't have to use the dpif layer at all, making it easier to change the ofproto implementation.
| * | dpif: Improve abstraction by making 'run' and 'wait' functions per-dpif.Ben Pfaff2011-05-111-2/+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.
| * | bridge: Move packet processing functionality into ofproto.Ben Pfaff2011-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until now, packet processing in ovs-vswitchd has been split between two components: ofproto, for basic OpenFlow functionality, and bridge, for OFPP_NORMAL processing. This architecture will not work as Open vSwitch starts to support a wider variety of underlying hardware, because it imposes a model in which the bridge needs to be able to look at every exact-match flow within a OpenFlow flow, which most hardware doesn't support. Therefore, this commit moves all of the packet processing code in bridge into ofproto, as preparation for generalizing further.
| * | bridge: Eliminate direct dependencies on dpif.Ben Pfaff2011-05-041-11/+6
| | | | | | | | | | | | | | | The 'ofp_portp' argument of the new function ofproto_port_add() is always set to NULL in this commit, but a future commit will use nonnull values.
* | | Consistently write null pointer constants as NULL instead of 0.Ben Pfaff2011-05-161-27/+27
| |/ |/| | | | | Found with sparse.
* | stream-ssl: Improve messages when configuring SSL if it is unsupported.Ben Pfaff2011-05-101-5/+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-20/+24
| | | | | If a daemon doesn't start, we need to know why. Being able to consistently consult the log to find out is helpful.
* ovs-openflowd: Use sset in place of svec.Ben Pfaff2011-03-311-30/+44
| | | | Also deletes svec_split() since this was the only user.
* ofproto: Change string sets in interface from svec to sset.Ben Pfaff2011-03-311-6/+6
|
* ofproto: Remove controller discovery support.Ben Pfaff2011-03-161-41/+4
| | | | | | I've never heard of anyone actually using controller discovery. It adds a great deal of code to the source tree, and a little bit of complication to ofproto, so this commit removes it.
* daemon: Define daemon options enums the same way as other option enums.Ben Pfaff2011-02-071-2/+3
| | | | | | | 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.
* datapath: Make adding and attaching a vport a single step.Ben Pfaff2010-12-031-1/+10
| | | | | | | | | | | | | | | | | | | | For some time now, Open vSwitch datapaths have internally made a distinction between adding a vport and attaching it to a datapath. Adding a vport just means to create it, as an entity detached from any datapath. Attaching it gives it a port number and a datapath. Similarly, a vport could be detached and deleted separately. After some study, I think I understand why this distinction exists. It is because ovs-vswitchd tries to open all the datapath ports before it tries to create them. However, changing it to create them before it tries to open them is not difficult, so this commit does this. The bulk of this commit, however, changes the datapath interface to one that always creates a vport and attaches it to a datapath in a single step, and similarly detaches a vport and deletes it in a single step. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Jesse Gross <jesse@nicira.com>
* ovs-openflowd: Add "exit" unixctl command.Ben Pfaff2010-11-291-1/+19
| | | | This is useful for testing.
* ovs-openflowd: Add ability to run without connecting to controller.Ben Pfaff2010-11-291-2/+8
| | | | | This is useful for testing, for which we may want to simply use tools like ovs-ofctl without maintaining an active connection to a remote controller.
* ovs-openflowd: Improve usage message.Ben Pfaff2010-11-291-2/+3
|
* ovs-openflowd: Add --enable-dummy option.Ben Pfaff2010-11-291-0/+7
|
* ovs-openflowd: Add --unixctl command line option.Ben Pfaff2010-11-291-1/+11
|
* Make installation directories overridable at runtime.Ben Pfaff2010-11-291-2/+2
| | | | | | | | | This makes it possible to run tests that need access to installation directories, such as the rundir, without having access to the actual installation directories (/var/run is generally not world-writable), by setting environment variables. This is not a good way to do things in general--usually it would be better to choose the correct directories at configure time--so for now this is undocumented.
* 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.
* ovs-openflowd: Don't segfault when no controllers specifiedJustin Pettit2010-10-071-5/+3
| | | | | | | | | | If no controllers are specified on the command-line, ovs-openflowd adds a couple of its own. The code that accounts for the controllers correctly allocated space for them, but used the command-line count to determine how many to set. This led to a segfault when later code tried to dereference them. Reported-by: Derek Cormier <derek.cormier@lab.ntt.co.jp>
* Avoid shadowing local variable names.Ben Pfaff2010-09-201-4/+0
| | | | | | | | | | | All of these changes avoid using the same name for two local variables within a same function. None of them are actual bugs as far as I can tell, but any of them could be confusing to the casual reader. The one in lib/ovsdb-idl.c is particularly brilliant: inner and outer loops both using (different) variables named 'i'. Found with GCC -Wshadow.
* Remove vestigial support for Spanning Tree Protocol.Ben Pfaff2010-08-131-20/+0
| | | | | | | | | Open vSwitch has never properly supported IEEE 802.1D Spanning Tree Protocol (STP), but it has various bits and pieces that claim to support it. This commit deletes them, to reduce the amount of dead code in the tree. We can always reintroduce it later if it proves to be a good idea. Bug #1175.
* ofproto: Add support for remote "service controllers".Ben Pfaff2010-08-061-19/+19
| | | | CC: Dan Wendlandt <dan@nicira.com>
* ovs-openflowd: Fix support for multiple controllers.Ben Pfaff2010-08-061-2/+2
| | | | | | The multiple controller support here has apparently never been tested. I still haven't tested it, but I fixed a few obvious problems in the source code and in the manpage.
* vswitchd: Move fail-mode config to Bridge tableJustin Pettit2010-07-301-3/+5
| | | | | | | Configuration of the fail-mode was an attribute of the Controller table. However, it makes more sense as an attribute of the Bridge table, since the behavior defines what a bridge should do if it can't connect to *any* controller. This commit makes the move.
* 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.
* netdev: Remove may_create/may_open flags.Jesse Gross2010-06-011-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most recent revision of the netdev library added may_create and may_open flags to explicitly state the intent of the caller as to whether the device should already be in use. This was simply a sanity check for users of the netdev library and the configuration. At this point the netdev library and its users are well behaved and should no longer need to be checked. Additional checks have also been added for incorrect configuration that mean the netdev library is no longer the primary line of defense. These flags themselves create problems because it is not always easy for a library to know what the state of devices should be. This is particularly a problem for ovs-openflowd, which expects ports to be added by ovs-dpctl. Fixing this either requires that the checks are so permissive to be useless or ugly hacks to get around them. Since they are no longer needed, just remove the checks. This commit restores the previous behavior of ovs-openflowd to not require that ports be specified on the command line or cleaned up after use. Bug #2652 CC: Natasha Gude <natasha@nicira.com> CC: Jean Tourrilhes <jt@hpl.hp.com> CC: 蒲彦 <yan.p.bjtu@gmail.com>
* ovs-openflowd: Prefer --fail=standalone|secure over --fail=open|closed.Ben Pfaff2010-04-201-3/+5
| | | | | | The "standalone" and "secure" terminology is less confusing. This retains support for "open" and "closed" but does not document it.
* Add support for multiple OpenFlow controllers on a single bridge.Ben Pfaff2010-04-201-43/+67
| | | | | | | | | | | | | | | | | With this commit, Open vSwitch permits a bridge to have any number of OpenFlow controllers. When multiple controllers are configured, Open vSwitch connects to all of them simultaneously. Details of configuration are in the vswitch schema documentation. OpenFlow 1.0 does not specify how multiple controllers coordinate in interacting with a single switch, so more than one controller should be specified only if the controllers are themselves designed to coordinate with each other. An upcoming commit will provide a simple means for coordination between multiple controllers. Feature #2495.
* ofproto: Bundle all controller-related settings into a struct.Ben Pfaff2010-04-201-76/+38
| | | | | | | Many ofproto settings are controller-related. Upcoming commits will add to ofproto the ability to support multiple controllers, so it is important to be able to refer to controller settings as a group. Hence, this commit bundles them into a new "struct ofproto_controller".
* ovs-openflowd: Remove documentation for obsolete --mgmt-id option.Ben Pfaff2010-04-201-1/+0
| | | | Also remove unused OPT_MGMT_ID enum.
* ovs-openflowd: Standardize on OpenFlow description optionJustin Pettit2010-02-201-18/+18
| | | | | | | ovs-vswitchd used a slightly different way to set the manufacturer, hardware revision, software revision, serial number, and datapath description than ovs-openflowd. This standardizes on the ovs-vswitch style and describes how to use them in the man page.
* ovs-openflowd: Fix typo in comment describing dp_descJustin Pettit2010-02-201-1/+1
|
* ofproto: Add user-specifiable datapath description (OpenFlow 1.0)Justin Pettit2010-02-201-1/+11
| | | | | | | | | In OpenFlow 1.0, a "dp_desc" character array was added to the ofp_desc_stats structure that allows a human readable description of the datapath to be provided. NOTE: OVS at this point is not wire-compatible with OpenFlow 1.0 until the final commit in this OpenFlow 1.0 set.
* ofproto: Use 64-bit datapath id and management id (OpenFlow 0.9)Justin Pettit2010-02-201-2/+2
| | | | | | | | The length of a datapath was changed from 48 bits to 64 bits in OpenFlow 0.9. For parity, we increased the management id size to match. NOTE: This is the final commit in the OpenFlow 0.9 set. Starting with this commit, OVS is OpenFlow 0.9-compliant.
* ofproto: Remove support for OpenFlow-based management protocol.Ben Pfaff2010-02-011-22/+0
| | | | | | | | | | | | | | | Older versions of Open vSwitch supported a management protocol based on OpenFlow message framing. The current Open vSwitch instead uses the OVSDB protocol for the same purposes. We don't plan to support this older protocol any longer, so this commit deletes support. This commit also deletes the management_id column from the vswitch's database schema. The management_id was used by the older management protocol to match up OpenFlow switch connections to management connections, but the current implementation instead matches up connections based on the datapath IDs exported by the configuration database. In fact, the OpenFlow connections had no way to actually export the management ID, so this just deletes code that was essentially without function anyhow.
* openflowd: Update for changes to dpif and netdev.Jesse Gross2010-01-271-11/+20
| | | | | | Openflowd had been a bit neglected as changes were made to the dpif and netdev interfaces over time. This brings it up to date with all the latest changes.
* dpif: Update dpif interface to match netdev.Jesse Gross2010-01-271-2/+2
| | | | | | | This brings over some features that were added to the netdev interface, most notably the separation between the name and the type. In addition to being cleaner, this also avoids problems where it is expected that the local port has the same name as the datapath.
* 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-1/+1
| | | | | 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.
* vconn: Reimplement in terms of the "stream" abstraction.Ben Pfaff2010-01-061-5/+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.
* ovs-openflowd: Don't pass extra argument to printf().Ben Pfaff2010-01-041-3/+2
|
* ofproto: Drop remote command execution feature.Ben Pfaff2010-01-041-29/+1
| | | | | | | | At one point Nicira had deployment plans for which adding a remote command execution feature to the OpenFlow stack made a lot of sense. We no longer have those plans, as far as I know, and leaving the feature in seems like a huge potential security hole. So this commit blows away the entire feature.