X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fclassifier.c;h=556278f3d745920fc8aa220fac3373eccb5d6260;hb=6b900de4efd368be88ef3db88b1eff8f835a7cf7;hp=a717bd347177fedc319f6075812e4c8c6ff2d067;hpb=85606e05b691be7c2f2d4bcf0e91170b71ec8fbb;p=sliver-openvswitch.git diff --git a/lib/classifier.c b/lib/classifier.c index a717bd347..556278f3d 100644 --- a/lib/classifier.c +++ b/lib/classifier.c @@ -25,6 +25,7 @@ #include "odp-util.h" #include "ofp-util.h" #include "packets.h" +#include "ovs-thread.h" static struct cls_table *find_table(const struct classifier *, const struct minimask *); @@ -143,6 +144,7 @@ classifier_init(struct classifier *cls) cls->n_rules = 0; hmap_init(&cls->tables); list_init(&cls->tables_priority); + ovs_rwlock_init(&cls->rwlock); } /* Destroys 'cls'. Rules within 'cls', if any, are not freed; this is the @@ -157,6 +159,7 @@ classifier_destroy(struct classifier *cls) destroy_table(cls, table); } hmap_destroy(&cls->tables); + ovs_rwlock_destroy(&cls->rwlock); } }