X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ofproto%2Fconnmgr.c;fp=ofproto%2Fconnmgr.c;h=75d616cfca805248b984807165734179f323f145;hb=7d78f21c057ff50a823220d809ac38c3d907243c;hp=383fbdacce219b0dda9b3adb0bf09a1d97613eb7;hpb=8d25251929c8f325bed0fff24192d5a87034b32e;p=sliver-openvswitch.git diff --git a/ofproto/connmgr.c b/ofproto/connmgr.c index 383fbdacc..75d616cfc 100644 --- a/ofproto/connmgr.c +++ b/ofproto/connmgr.c @@ -41,6 +41,8 @@ #include "vconn.h" #include "vlog.h" +#include "bundles.h" + VLOG_DEFINE_THIS_MODULE(connmgr); static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); @@ -129,6 +131,9 @@ struct ofconn { * contains an update event of type NXFME_ABBREV and false otherwise.. */ struct list updates OVS_GUARDED_BY(ofproto_mutex); bool sent_abbrev_update OVS_GUARDED_BY(ofproto_mutex); + + /* Active bundles. Contains "struct ofp_bundle"s. */ + struct hmap bundles; }; static struct ofconn *ofconn_create(struct connmgr *, struct rconn *, @@ -1136,6 +1141,13 @@ ofconn_add_opgroup(struct ofconn *ofconn, struct list *ofconn_node) { list_push_back(&ofconn->opgroups, ofconn_node); } + +struct hmap * +ofconn_get_bundles(struct ofconn *ofconn) +{ + return &ofconn->bundles; +} + /* Private ofconn functions. */ @@ -1163,6 +1175,8 @@ ofconn_create(struct connmgr *mgr, struct rconn *rconn, enum ofconn_type type, hmap_init(&ofconn->monitors); list_init(&ofconn->updates); + hmap_init(&ofconn->bundles); + ofconn_flush(ofconn); return ofconn; @@ -1263,6 +1277,8 @@ ofconn_destroy(struct ofconn *ofconn) hmap_remove(&ofconn->connmgr->controllers, &ofconn->hmap_node); } + ofp_bundle_remove_all(ofconn); + hmap_destroy(&ofconn->monitors); list_remove(&ofconn->node); rconn_destroy(ofconn->rconn); @@ -2105,7 +2121,7 @@ ofmonitor_report(struct connmgr *mgr, struct rule *rule, ovs_mutex_unlock(&rule->mutex); if (flags & NXFMF_ACTIONS) { - struct rule_actions *actions = rule_get_actions(rule); + const struct rule_actions *actions = rule_get_actions(rule); fu.ofpacts = actions->ofpacts; fu.ofpacts_len = actions->ofpacts_len; } else {