ofproto: Reinterpret meaning of OpenFlow hard timeouts with OFPFC_MODIFY.
authorBen Pfaff <blp@nicira.com>
Fri, 19 Aug 2011 17:33:09 +0000 (10:33 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 13 Sep 2011 18:46:09 +0000 (11:46 -0700)
commit308881afb61e292c629b36a357cfc37153884000
tree7492c8e508f19bd39a35fd873aaceb0368fda73c
parenta75531e53e03d9fe9915f8041759601c07e47914
ofproto: Reinterpret meaning of OpenFlow hard timeouts with OFPFC_MODIFY.

I finally found a good use for hard timeouts in OpenFlow, but they require
a slight reinterpretation of the meaning of hard timeouts.  Until now, a
hard timeout meant that a flow would be removed the specified number of
seconds after a flow was created.  Intervening modifications with
OFPFC_MODIFY(_STRICT) had no effect on the hard timeout; the flow would
still be deleted the specified number of seconds after its original
creation.

This commit changes the effect of OFPFC_MODIFY(_STRICT).  Now, modifying
a flow resets its hard timeout counter.  A flow will time out the specified
number of seconds after creation or after the last time it is modified,
whichever comes later.
ofproto/ofproto-dpif.c
ofproto/ofproto-provider.h
ofproto/ofproto.c