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
vswitchd: Use wdp functions instead of xfif ones for enumerating bridges.
[sliver-openvswitch.git]
/
vswitchd
/
bridge.c
diff --git
a/vswitchd/bridge.c
b/vswitchd/bridge.c
index
45ce727
..
c2b1257
100644
(file)
--- a/
vswitchd/bridge.c
+++ b/
vswitchd/bridge.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2008, 2009, 2010 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010
, 2011
Nicira Networks
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-46,6
+46,7
@@
#include "ofpbuf.h"
#include "ofproto/netflow.h"
#include "ofproto/ofproto.h"
#include "ofpbuf.h"
#include "ofproto/netflow.h"
#include "ofproto/ofproto.h"
+#include "ofproto/wdp.h"
#include "ovsdb-data.h"
#include "packets.h"
#include "poll-loop.h"
#include "ovsdb-data.h"
#include "packets.h"
#include "poll-loop.h"
@@
-299,7
+300,7
@@
bridge_configure_once(const struct ovsrec_open_vswitch *cfg)
{
static bool already_configured_once;
struct svec bridge_names;
{
static bool already_configured_once;
struct svec bridge_names;
- struct svec
xfif_names, xfif
_types;
+ struct svec
wdp_names, wdp
_types;
size_t i;
/* Only do this once per ovs-vswitchd run. */
size_t i;
/* Only do this once per ovs-vswitchd run. */
@@
-317,46
+318,46
@@
bridge_configure_once(const struct ovsrec_open_vswitch *cfg)
}
svec_sort(&bridge_names);
}
svec_sort(&bridge_names);
- /* Iterate over all system
xfif
s and delete any of them that do not appear
+ /* Iterate over all system
wdp
s and delete any of them that do not appear
* in 'cfg'. */
* in 'cfg'. */
- svec_init(&
xfif
_names);
- svec_init(&
xfif
_types);
-
xf_enumerate_types(&xfif
_types);
- for (i = 0; i <
xfif
_types.n; i++) {
- struct
xfif *xfif
;
+ svec_init(&
wdp
_names);
+ svec_init(&
wdp
_types);
+
wdp_enumerate_types(&wdp
_types);
+ for (i = 0; i <
wdp
_types.n; i++) {
+ struct
wdp *wdp
;
int retval;
size_t j;
int retval;
size_t j;
-
xf_enumerate_names(xfif_types.names[i], &xfif
_names);
+
wdp_enumerate_names(wdp_types.names[i], &wdp
_names);
- /* For each
xfif
... */
- for (j = 0; j <
xfif
_names.n; j++) {
- retval =
xfif_open(xfif_names.names[j], xfif_types.names[i], &xfif
);
+ /* For each
wdp
... */
+ for (j = 0; j <
wdp
_names.n; j++) {
+ retval =
wdp_open(wdp_names.names[j], wdp_types.names[i], &wdp
);
if (!retval) {
struct svec all_names;
size_t k;
/* ...check whether any of its names is in 'bridge_names'. */
svec_init(&all_names);
if (!retval) {
struct svec all_names;
size_t k;
/* ...check whether any of its names is in 'bridge_names'. */
svec_init(&all_names);
-
xfif_get_all_names(xfif
, &all_names);
+
wdp_get_all_names(wdp
, &all_names);
for (k = 0; k < all_names.n; k++) {
if (svec_contains(&bridge_names, all_names.names[k])) {
goto found;
}
}
for (k = 0; k < all_names.n; k++) {
if (svec_contains(&bridge_names, all_names.names[k])) {
goto found;
}
}
- /* No. Delete the
xfif
. */
-
xfif_delete(xfif
);
+ /* No. Delete the
wdp
. */
+
wdp_delete(wdp
);
found:
svec_destroy(&all_names);
found:
svec_destroy(&all_names);
-
xfif_close(xfif
);
+
wdp_close(wdp
);
}
}
}
svec_destroy(&bridge_names);
}
}
}
svec_destroy(&bridge_names);
- svec_destroy(&
xfif
_names);
- svec_destroy(&
xfif
_types);
+ svec_destroy(&
wdp
_names);
+ svec_destroy(&
wdp
_types);
}
/* Attempt to create the network device 'iface_name' through the netdev
}
/* Attempt to create the network device 'iface_name' through the netdev