classifier: Make traversing identical rules robust.
authorJarno Rajahalme <jrajahalme@nicira.com>
Thu, 11 Jun 2015 22:53:42 +0000 (15:53 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Thu, 11 Jun 2015 22:53:42 +0000 (15:53 -0700)
commit8f8023b3eee4f1b633f16fa9ea31a14eac2445f8
tree4767a5473de1b4a9e64086a56c7f21820e709571
parent48954dab23eecfe895d7cb34c26587f400297618
classifier: Make traversing identical rules robust.

The traversal of the list of identical rules from the lookup threads
is fragile if the list head is removed during the list traversal.

This patch simplifies the implementation of that list by making the
list NULL terminated, singly linked RCU-protected list.  By having the
NULL at the end there is no longer a possiblity of missing the point
when the list wraps around.  This is significant when there can be
multiple elements with the same priority in the list.

This change also decreases the size of the struct cls_match back
pre-'visibility' attribute size.

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/classifier-private.h
lib/classifier.c
tests/test-classifier.c