X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=ofproto%2Fin-band.c;h=444e69d4f27ddfee812c2e1c37273a639e01320a;hb=b9f9f37fb7a85dbe58a260f6e1b745a17db66dd5;hp=82e51c726897cba787bbb834d9523fc8c3a4151b;hpb=0ade584ebe8ca1a1de92fb7422566726f276918c;p=openvswitch diff --git a/ofproto/in-band.c b/ofproto/in-band.c index 82e51c72..444e69d4 100644 --- a/ofproto/in-band.c +++ b/ofproto/in-band.c @@ -175,11 +175,6 @@ * problems and amount of processing, we decided to hold off for * the time-being. * - * - Multiple Controllers. There is nothing intrinsic in the high- - * level design that prevents using multiple (known) controllers, - * however, the current implementation's data structures assume - * only one. - * * - Differing Controllers for Switches. All switches must know * the L3 addresses for all the controllers that other switches * may use, since rules need to be set up to allow traffic related @@ -697,8 +692,11 @@ void in_band_run(struct in_band *ib) { struct in_band_remote *r; + bool local_change, remote_change; - if (!refresh_local(ib) && !refresh_remotes(ib)) { + local_change = refresh_local(ib); + remote_change = refresh_remotes(ib); + if (!local_change && !remote_change) { /* Nothing changed, nothing to do. */ return; } @@ -745,10 +743,12 @@ in_band_wait(struct in_band *in_band) } } +/* ofproto has flushed all flows from the flow table and it is calling us back + * to allow us to reinstall the ones that are important to us. */ void in_band_flushed(struct in_band *in_band) { - clear_rules(in_band); + add_rules(in_band); } int