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
simap: New data structure for string-to-integer maps.
[sliver-openvswitch.git]
/
lib
/
learning-switch.c
diff --git
a/lib/learning-switch.c
b/lib/learning-switch.c
index
4e7ceda
..
595b7f0
100644
(file)
--- a/
lib/learning-switch.c
+++ b/
lib/learning-switch.c
@@
-37,6
+37,7
@@
#include "poll-loop.h"
#include "rconn.h"
#include "shash.h"
#include "poll-loop.h"
#include "rconn.h"
#include "shash.h"
+#include "simap.h"
#include "timeval.h"
#include "vconn.h"
#include "vlog.h"
#include "timeval.h"
#include "vconn.h"
#include "vlog.h"
@@
-125,12
+126,12
@@
lswitch_create(struct rconn *rconn, const struct lswitch_config *cfg)
hmap_init(&sw->queue_numbers);
shash_init(&sw->queue_names);
if (cfg->port_queues) {
hmap_init(&sw->queue_numbers);
shash_init(&sw->queue_names);
if (cfg->port_queues) {
- struct s
hash
_node *node;
+ struct s
imap
_node *node;
- S
HASH
_FOR_EACH (node, cfg->port_queues) {
+ S
IMAP
_FOR_EACH (node, cfg->port_queues) {
struct lswitch_port *port = xmalloc(sizeof *port);
hmap_node_nullify(&port->hmap_node);
struct lswitch_port *port = xmalloc(sizeof *port);
hmap_node_nullify(&port->hmap_node);
- port->queue_id =
(uintptr_t)
node->data;
+ port->queue_id = node->data;
shash_add(&sw->queue_names, node->name, port);
}
}
shash_add(&sw->queue_names, node->name, port);
}
}