LGTM, Acked-by: Jarno Rajahalme <jrajaha...@nicira.com>
On Jan 30, 2015, at 1:36 PM, Ben Pfaff <b...@nicira.com> 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 華 <k940...@hotmail.com> > Signed-off-by: Ben Pfaff <b...@nicira.com> > --- > 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 j...@ev0.net > John Darrington j...@darrington.wattle.id.au > John Galgay j...@galgay.net > John Hurley john.hur...@netronome.com > +K 華 k940...@hotmail.com > Kevin Mancuso kevin.manc...@rackspace.com > Kiran Shanbhog ki...@vmware.com > 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 > dev@openvswitch.org > http://openvswitch.org/mailman/listinfo/dev _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev