diff options
author | Ben Pfaff <blp@nicira.com> | 2010-12-03 14:41:38 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-12-03 14:41:38 -0800 |
commit | c3827f619a38d3d202020838e1f92860046a3dbe (patch) | |
tree | 7f4b1c921a95a62ebbbc80ec1af04ae246a9d1fc /lib/netdev-provider.h | |
parent | 94903c989826268a7fab3c730cd7d0b35ef423d5 (diff) |
datapath: Make adding and attaching a vport a single step.
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>
Diffstat (limited to 'lib/netdev-provider.h')
-rw-r--r-- | lib/netdev-provider.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index 170136d4..d955bb17 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -552,8 +552,10 @@ struct netdev_class { int netdev_register_provider(const struct netdev_class *); int netdev_unregister_provider(const char *type); +const struct netdev_class *netdev_lookup_provider(const char *type); extern const struct netdev_class netdev_linux_class; +extern const struct netdev_class netdev_internal_class; extern const struct netdev_class netdev_tap_class; #ifdef __cplusplus |