ofproto-dpif-xlate: Fix fin_timeout to make rules expirable.
authorBen Pfaff <blp@nicira.com>
Mon, 26 Aug 2013 20:08:30 +0000 (13:08 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 27 Aug 2013 20:23:01 +0000 (13:23 -0700)
commit994c997345100f1868d8fbee508443475c556439
tree70e0b15e376ed3688ffb7281f6e6888e067aa821
parentb2c1f00b730c3b92e8c1ff37b7d0f8c7a9a44934
ofproto-dpif-xlate: Fix fin_timeout to make rules expirable.

In an Open vSwitch flow table that has a configured maximum number of
flows, flows that have an idle or hard timeout, or both, are expirable,
and flows with neither are permanent.  The fin_timeout action can change
a flow that has no idle or hard timeout into one that has either one or
both, which should make a permanent flow into an expirable one, but the
implementation was buggy and did not actually make the flow expirable.
This commit fixes the problem.

This commit also moves most of the implementation of fin_timeout from
ofproto-dpif-xlate into ofproto, because this seems to better respect the
layering.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto-dpif-xlate.c
ofproto/ofproto-provider.h
ofproto/ofproto.c