diff options
| author | Jesse Gross <jesse@nicira.com> | 2010-01-12 16:01:43 -0500 |
|---|---|---|
| committer | Jesse Gross <jesse@nicira.com> | 2010-01-15 11:34:34 -0500 |
| commit | 149f577a25508779b756515be1f1bdcefa3710fa (patch) | |
| tree | e88ab9ea3f6667839fa59c23a7b0cf381eda8f33 /utilities/ovs-dpctl.c | |
| parent | b4182c7f2d25110c2edaf96d33dd081257fa253b (diff) | |
| download | openvswitch-149f577a25508779b756515be1f1bdcefa3710fa.tar.gz | |
netdev: Fully handle netdev lifecycle through refcounting.
This builds on earlier work that implemented netdev object refcounting.
However, rather than requiring explicit create and destroy calls,
these operations are now performed automatically based on the referenece
count. This is important because in certain situations it is not
possible to know whether a netdev has already been created. A
workaround existed (which looked fairly similar to this paradigm) but
introduced it's own issues. This simplifies and unifies the API.
Diffstat (limited to 'utilities/ovs-dpctl.c')
| -rw-r--r-- | utilities/ovs-dpctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index 5e50d72a5..ee545a61a 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009 Nicira Networks. + * Copyright (c) 2008, 2009, 2010 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -166,7 +166,7 @@ static int if_up(const char *netdev_name) struct netdev *netdev; int retval; - retval = netdev_open(netdev_name, NETDEV_ETH_TYPE_NONE, &netdev); + retval = netdev_open_default(netdev_name, &netdev); if (!retval) { retval = netdev_turn_flags_on(netdev, NETDEV_UP, true); netdev_close(netdev); |
