[ovs-dev] [PATCH 06/16] netdev: Add function netdev_is_open().

Ben Pfaff blp at nicira.com
Tue Apr 13 17:24:05 UTC 2010

On Tue, Apr 13, 2010 at 10:41:08AM -0400, Jesse Gross wrote:
> Add netdev_is_open(), which checks to see if a given netdev is
> currently open.  It will be used to assist in cleaning up old ports
> that are no longer in use.

Can a netdev and a netdev_dev have different names?  If not, then can we
just use the netdev_dev's reference count?  (If so, then when does this

Several netdevs can have the same name, right, because they are all open
copies of a given netdev_dev?  Then shash may not be the right data
structure, since all of the netdevs with a single name will end up in
the same hash bucket.  (If we expect a given netdev_dev to only be open
once or twice or maybe three times, I guess that's OK, since
netdev_is_open() is presumably not called often.)

More information about the dev mailing list