LGTM, Acked-by: Jarno Rajahalme <[email protected]>
On Jan 30, 2015, at 1:36 PM, Ben Pfaff <[email protected]> wrote: > Until now, when the sFlow selection probability changed, OVS failed to > immediately revalidate the flow table, delaying the new probability taking > effect. This commit fixes the problem. > > Reported-by: K 華 <[email protected]> > Signed-off-by: Ben Pfaff <[email protected]> > --- > AUTHORS | 1 + > ofproto/ofproto-dpif.c | 5 ++++- > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/AUTHORS b/AUTHORS > index 366ad9b..0ac1a74 100644 > --- a/AUTHORS > +++ b/AUTHORS > @@ -259,6 +259,7 @@ Joan Cirer [email protected] > John Darrington [email protected] > John Galgay [email protected] > John Hurley [email protected] > +K 華 [email protected] > Kevin Mancuso [email protected] > Kiran Shanbhog [email protected] > Kirill Kabardin > diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c > index 1b4ad12..b909fd9 100644 > --- a/ofproto/ofproto-dpif.c > +++ b/ofproto/ofproto-dpif.c > @@ -1894,6 +1894,7 @@ set_sflow(struct ofproto *ofproto_, > struct dpif_sflow *ds = ofproto->sflow; > > if (sflow_options) { > + uint32_t old_probability = ds ? dpif_sflow_get_probability(ds) : 0; > if (!ds) { > struct ofport_dpif *ofport; > > @@ -1901,9 +1902,11 @@ set_sflow(struct ofproto *ofproto_, > HMAP_FOR_EACH (ofport, up.hmap_node, &ofproto->up.ports) { > dpif_sflow_add_port(ds, &ofport->up, ofport->odp_port); > } > - ofproto->backer->need_revalidate = REV_RECONFIGURE; > } > dpif_sflow_set_options(ds, sflow_options); > + if (dpif_sflow_get_probability(ds) != old_probability) { > + ofproto->backer->need_revalidate = REV_RECONFIGURE; > + } > } else { > if (ds) { > dpif_sflow_unref(ds); > -- > 2.1.3 > > _______________________________________________ > dev mailing list > [email protected] > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
