]> git.proxmox.com Git - mirror_ovs.git/commit - tests/test-classifier.c
classifier: Refactor interface for classifier_remove().
authorBen Pfaff <blp@ovn.org>
Tue, 30 Jan 2018 21:00:31 +0000 (13:00 -0800)
committerBen Pfaff <blp@ovn.org>
Wed, 31 Jan 2018 19:19:21 +0000 (11:19 -0800)
commit46ab60bfe562f3ee6cde94888930e9ef9130831f
tree7424408bea0389686c26e14d9290236d51025587
parent186667a83c2b09ed9ae08b35c596987cf7d33cfb
classifier: Refactor interface for classifier_remove().

Until now, classifier_remove() returned either null or the classifier rule
passed to it, which is an unusual interface.  This commit changes it to
return true if it succeeds or false on failure.

In addition, most of classifier_remove()'s callers know ahead of time that
it must succeed, even though most of them didn't bother with an assertion,
so this commit adds a classifier_remove_assert() function as a helper.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Tested-by: Yifeng Sun <pkusunyifeng@gmail.com>
Reviewed-by: Yifeng Sun <pkusunyifeng@gmail.com>
lib/classifier.c
lib/classifier.h
lib/ovs-router.c
lib/tnl-ports.c
ofproto/ofproto.c
tests/test-classifier.c
tests/test-ovn.c
utilities/ovs-ofctl.c