From: Ben Pfaff Date: Tue, 10 Mar 2009 17:12:40 +0000 (-0700) Subject: classifier: New enum CLS_INC_ALL, for convenience. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcaa9495118d22f93dca030fb1beda70402ee9d7;p=openvswitch classifier: New enum CLS_INC_ALL, for convenience. --- diff --git a/lib/classifier.h b/lib/classifier.h index f660483f..1afebede 100644 --- a/lib/classifier.h +++ b/lib/classifier.h @@ -149,7 +149,8 @@ typedef void cls_cb_func(struct cls_rule *, void *aux); enum { CLS_INC_EXACT = 1 << 0, /* Include exact-match flows? */ - CLS_INC_WILD = 1 << 1 /* Include flows with wildcards? */ + CLS_INC_WILD = 1 << 1, /* Include flows with wildcards? */ + CLS_INC_ALL = CLS_INC_EXACT | CLS_INC_WILD }; void classifier_for_each(const struct classifier *, int include, cls_cb_func *, void *aux); diff --git a/secchan/ofproto.c b/secchan/ofproto.c index c30e6874..0ee8346e 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -1916,7 +1916,7 @@ table_id_to_include(uint8_t table_id) { return (table_id == TABLEID_HASH ? CLS_INC_EXACT : table_id == TABLEID_CLASSIFIER ? CLS_INC_WILD - : CLS_INC_EXACT | CLS_INC_WILD); + : CLS_INC_ALL); } static int @@ -2280,7 +2280,7 @@ modify_flows_loose(struct ofproto *p, const struct ofp_flow_mod *ofm, cbdata.command = command; cls_rule_from_match(&target, &ofm->match, 0); - classifier_for_each_match(&p->cls, &target, CLS_INC_WILD | CLS_INC_EXACT, + classifier_for_each_match(&p->cls, &target, CLS_INC_ALL, modify_flows_cb, &cbdata); return 0; } diff --git a/tests/test-classifier.c b/tests/test-classifier.c index a43217d6..9df259f3 100644 --- a/tests/test-classifier.c +++ b/tests/test-classifier.c @@ -405,7 +405,7 @@ free_rule(struct cls_rule *cls_rule, void *cls) static void destroy_classifier(struct classifier *cls) { - classifier_for_each(cls, CLS_INC_WILD | CLS_INC_EXACT, free_rule, cls); + classifier_for_each(cls, CLS_INC_ALL, free_rule, cls); classifier_destroy(cls); }