2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

netdev: Make netdev arguments fetchable, and implement for netdev-vport.

This gives network device implementations the opportunity to fetch an
existing device's configuration and store it as their arguments, so that
netdev clients can find out how an existing device is configured.

So far netdev-vport is the only implementation that needs to use this.

The next commit will add use by clients.

Reviewed by Justin Pettit.
This commit is contained in:
Ben Pfaff
2010-12-29 16:02:22 -08:00
parent 9fe3b9a2ee
commit 6d9e6eb44f
7 changed files with 173 additions and 43 deletions

View File

@@ -523,7 +523,7 @@ netdev_linux_create(const struct netdev_class *class,
cache_notifier_refcount++;
netdev_dev = xzalloc(sizeof *netdev_dev);
netdev_dev_init(&netdev_dev->netdev_dev, name, class);
netdev_dev_init(&netdev_dev->netdev_dev, name, args, class);
*netdev_devp = &netdev_dev->netdev_dev;
return 0;
@@ -577,7 +577,7 @@ netdev_linux_create_tap(const struct netdev_class *class OVS_UNUSED,
goto error;
}
netdev_dev_init(&netdev_dev->netdev_dev, name, &netdev_tap_class);
netdev_dev_init(&netdev_dev->netdev_dev, name, args, &netdev_tap_class);
*netdev_devp = &netdev_dev->netdev_dev;
return 0;
@@ -2201,7 +2201,7 @@ netdev_linux_poll_remove(struct netdev_notifier *notifier_)
\
CREATE, \
netdev_linux_destroy, \
NULL, /* reconfigure */ \
NULL, /* set_config */ \
\
netdev_linux_open, \
netdev_linux_close, \