#include "binding.h"
#include "lib/bitmap.h"
+#include "lib/hmap.h"
#include "lib/sset.h"
#include "lib/util.h"
#include "lib/vswitch-idl.h"
}
}
+static void
+add_local_datapath(struct hmap *local_datapaths,
+ const struct sbrec_port_binding *binding_rec)
+{
+ struct hmap_node *ld;
+ ld = hmap_first_with_hash(local_datapaths,
+ binding_rec->datapath->tunnel_key);
+ if (!ld) {
+ ld = xmalloc(sizeof *ld);
+ hmap_insert(local_datapaths, ld,
+ binding_rec->datapath->tunnel_key);
+ }
+}
+
void
binding_run(struct controller_ctx *ctx, const struct ovsrec_bridge *br_int,
const char *chassis_id, struct simap *ct_zones,
- unsigned long *ct_zone_bitmap)
+ unsigned long *ct_zone_bitmap, struct hmap *local_datapaths)
{
const struct sbrec_chassis *chassis_rec;
const struct sbrec_port_binding *binding_rec;
/* Add child logical port to the set of all local ports. */
sset_add(&all_lports, binding_rec->logical_port);
}
+ add_local_datapath(local_datapaths, binding_rec);
if (binding_rec->chassis == chassis_rec) {
continue;
}