summaryrefslogtreecommitdiff
path: root/utilities/ovs-openflowd.c
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2010-06-01 14:20:59 -0700
committerJesse Gross <jesse@nicira.com>2010-06-01 17:27:45 -0700
commit1e82e503c5358f8dce9eb2105448f0ec894d57bc (patch)
treec6b8862ee59ff8e491daef67546c457aecbb9340 /utilities/ovs-openflowd.c
parent61b999dd6fa3a8942b5002f9392a0068324a80b6 (diff)
downloadopenvswitch-1e82e503c5358f8dce9eb2105448f0ec894d57bc.tar.gz
netdev: Remove may_create/may_open flags.
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>
Diffstat (limited to 'utilities/ovs-openflowd.c')
-rw-r--r--utilities/ovs-openflowd.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/utilities/ovs-openflowd.c b/utilities/ovs-openflowd.c
index e84a3999c..ebfc3c33e 100644
--- a/utilities/ovs-openflowd.c
+++ b/utilities/ovs-openflowd.c
@@ -122,14 +122,8 @@ main(int argc, char *argv[])
if (s.ports.n) {
const char *port;
size_t i;
- struct netdev *netdev;
SVEC_FOR_EACH (i, port, &s.ports) {
- error = netdev_open_default(port, &netdev);
- if (error) {
- ovs_fatal(error, "failed to open %s as a device", port);
- }
-
error = dpif_port_add(dpif, port, 0, NULL);
if (error) {
ovs_fatal(error, "failed to add %s as a port", port);