git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
netdev: Decouple creating and configuring network devices.
[sliver-openvswitch.git]
/
lib
/
netdev-linux.c
diff --git
a/lib/netdev-linux.c
b/lib/netdev-linux.c
index
ac511f0
..
05b830c
100644
(file)
--- a/
lib/netdev-linux.c
+++ b/
lib/netdev-linux.c
@@
-516,18
+516,12
@@
netdev_linux_cache_cb(const struct rtnetlink_link_change *change,
/* Creates system and internal devices. */
static int
/* Creates system and internal devices. */
static int
-netdev_linux_create(const struct netdev_class *class,
- const char *name, const struct shash *args,
- struct netdev_dev **netdev_devp)
+netdev_linux_create(const struct netdev_class *class, const char *name,
+ struct netdev_dev **netdev_devp)
{
struct netdev_dev_linux *netdev_dev;
int error;
{
struct netdev_dev_linux *netdev_dev;
int error;
- if (!shash_is_empty(args)) {
- VLOG_WARN("%s: arguments for %s devices should be empty",
- name, class->type);
- }
-
if (!cache_notifier_refcount) {
error = rtnetlink_link_notifier_register(&netdev_linux_cache_notifier,
netdev_linux_cache_cb, NULL);
if (!cache_notifier_refcount) {
error = rtnetlink_link_notifier_register(&netdev_linux_cache_notifier,
netdev_linux_cache_cb, NULL);
@@
-539,7
+533,7
@@
netdev_linux_create(const struct netdev_class *class,
netdev_dev = xzalloc(sizeof *netdev_dev);
netdev_dev->change_seq = 1;
netdev_dev = xzalloc(sizeof *netdev_dev);
netdev_dev->change_seq = 1;
- netdev_dev_init(&netdev_dev->netdev_dev, name,
args,
class);
+ netdev_dev_init(&netdev_dev->netdev_dev, name, class);
*netdev_devp = &netdev_dev->netdev_dev;
return 0;
*netdev_devp = &netdev_dev->netdev_dev;
return 0;
@@
-553,8
+547,7
@@
netdev_linux_create(const struct netdev_class *class,
* be unavailable to other reads for tap devices. */
static int
netdev_linux_create_tap(const struct netdev_class *class OVS_UNUSED,
* be unavailable to other reads for tap devices. */
static int
netdev_linux_create_tap(const struct netdev_class *class OVS_UNUSED,
- const char *name, const struct shash *args,
- struct netdev_dev **netdev_devp)
+ const char *name, struct netdev_dev **netdev_devp)
{
struct netdev_dev_linux *netdev_dev;
struct tap_state *state;
{
struct netdev_dev_linux *netdev_dev;
struct tap_state *state;
@@
-562,10
+555,6
@@
netdev_linux_create_tap(const struct netdev_class *class OVS_UNUSED,
struct ifreq ifr;
int error;
struct ifreq ifr;
int error;
- if (!shash_is_empty(args)) {
- VLOG_WARN("%s: arguments for TAP devices should be empty", name);
- }
-
netdev_dev = xzalloc(sizeof *netdev_dev);
state = &netdev_dev->state.tap;
netdev_dev = xzalloc(sizeof *netdev_dev);
state = &netdev_dev->state.tap;
@@
-593,7
+582,7
@@
netdev_linux_create_tap(const struct netdev_class *class OVS_UNUSED,
goto error;
}
goto error;
}
- netdev_dev_init(&netdev_dev->netdev_dev, name,
args,
&netdev_tap_class);
+ netdev_dev_init(&netdev_dev->netdev_dev, name, &netdev_tap_class);
*netdev_devp = &netdev_dev->netdev_dev;
return 0;
*netdev_devp = &netdev_dev->netdev_dev;
return 0;
@@
-2252,8
+2241,8
@@
netdev_linux_change_seq(const struct netdev *netdev)
\
CREATE, \
netdev_linux_destroy, \
\
CREATE, \
netdev_linux_destroy, \
+ NULL, /* get_config */ \
NULL, /* set_config */ \
NULL, /* set_config */ \
- NULL, /* config_equal */ \
\
netdev_linux_open, \
netdev_linux_close, \
\
netdev_linux_open, \
netdev_linux_close, \