ofproto: New function ofproto_refresh_rule().
authorJoe Stringer <joestringer@nicira.com>
Tue, 4 Mar 2014 01:23:12 +0000 (17:23 -0800)
committerJoe Stringer <joestringer@nicira.com>
Fri, 18 Apr 2014 00:04:06 +0000 (12:04 +1200)
commit1ebeaaa7f0c3f0f94f28377404c52a11cca50d86
treede33787a9687de1ed22c3ecffe2cdf6ac64518c5
parent79428250c2b2b51f233d2c3f74560190ff9fb325
ofproto: New function ofproto_refresh_rule().

This function checks for a rule in the classifier:
* If the rule exists, reset its modified time.
* If an equivalent rule exists, reset that rule's modified time.
* If no rule exists, re-install the rule and reset its modified time.
* Finally, return the rule that was modified.

This function will be used to ensure that hard timeouts for learnt rules
are refreshed if traffic consistently hits a rule with a learn action in
it. The first user will be the next commit.

Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
---
v2: Acked.
v1: Ensure rule->modified is updated correctly.
RFC: First post.
ofproto/ofproto-dpif.c
ofproto/ofproto-dpif.h
ofproto/ofproto-provider.h
ofproto/ofproto.c