[ovs-dev] [PATCH] ovs-ofctl, ovs-controller: Disable flow idle timeout by default.

Vishal Swarankar vishal.swarnkar at gmail.com
Thu Sep 16 06:01:57 UTC 2010


- Adding another case.

I have experienced that if I shutdown my controller, the flow goes away from
the switch's flowtable. Is this expected behaviour ?

thanks
Vishal

On Thu, Sep 16, 2010 at 4:05 AM, Ben Pfaff <blp at nicira.com> wrote:

> Thanks, pushed.
>
> On Wed, Sep 15, 2010 at 03:25:39PM -0700, Justin Pettit wrote:
> > Looks good.
> >
> > --Justin
> >
> >
> > On Sep 15, 2010, at 3:21 PM, Ben Pfaff wrote:
> >
> > > Until now, flows set up by ovs-ofctl and by "ovs-controller
> --with-flows"
> > > by default expired after 60 seconds of inactivity.  This was
> surprising,
> > > especially in the latter case where one is normally trying to set up
> > > permanent flows.  Even in the former case, however, we can't think of a
> > > good reason that flows added by ovs-ofctl should expire by default.  So
> > > this commit make flows permanent by default.
> > >
> > > Reported-by: Michael Mao <mmao at nicira.com>
> > > ---
> > > lib/ofp-parse.c          |    4 +---
> > > utilities/ovs-ofctl.8.in |    4 ++--
> > > 2 files changed, 3 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
> > > index 06d5bd1..405008c 100644
> > > --- a/lib/ofp-parse.c
> > > +++ b/lib/ofp-parse.c
> > > @@ -33,8 +33,6 @@
> > >
> > > VLOG_DEFINE_THIS_MODULE(ofp_parse)
> > >
> > > -#define DEFAULT_IDLE_TIMEOUT 60
> > > -
> > > static uint32_t
> > > str_to_u32(const char *str)
> > > {
> > > @@ -402,7 +400,7 @@ parse_ofp_str(char *string, struct ofp_match
> *match, struct ofpbuf *actions,
> > >         *priority = OFP_DEFAULT_PRIORITY;
> > >     }
> > >     if (idle_timeout) {
> > > -        *idle_timeout = DEFAULT_IDLE_TIMEOUT;
> > > +        *idle_timeout = OFP_FLOW_PERMANENT;
> > >     }
> > >     if (hard_timeout) {
> > >         *hard_timeout = OFP_FLOW_PERMANENT;
> > > diff --git a/utilities/ovs-ofctl.8.in b/utilities/ovs-ofctl.8.in
> > > index 7de788e..bbe747b 100644
> > > --- a/utilities/ovs-ofctl.8.in
> > > +++ b/utilities/ovs-ofctl.8.in
> > > @@ -495,8 +495,8 @@ optional fields:
> > > .TP
> > > \fBidle_timeout=\fIseconds\fR
> > > Causes the flow to expire after the given number of seconds of
> > > -inactivity.  A value of 0 prevents a flow from expiring due to
> > > -inactivity.  The default is 60 seconds.
> > > +inactivity.  A value of 0 (the default) prevents a flow from expiring
> due to
> > > +inactivity.
> > > .
> > > .IP \fBhard_timeout=\fIseconds\fR
> > > Causes the flow to expire after the given number of seconds,
> > > --
> > > 1.7.1
> > >
> > >
> > > _______________________________________________
> > > dev mailing list
> > > dev at openvswitch.org
> > > http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
> >
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100916/3fe1ca40/attachment-0003.html>


More information about the dev mailing list