[ovs-dev] [PATCH 1/4] expr: Simplify "x == 0/0" into 1.
azhou at ovn.org
Mon Oct 10 23:47:01 UTC 2016
On Thu, Oct 6, 2016 at 8:30 PM, Ben Pfaff <blp at ovn.org> wrote:
> An expression like "x == 0/0" does not test any actual bits in field x,
> so it resolves to true, but expr_simplify() was not smart enough to see
> This goes beyond an optimization, to become a bug fix, because
> expr_normalize() will assert-fail for expressions that become trivial
> when this simplification is omitted. For example:
> $ echo 'eth.dst == 0/0 && eth.dst == 0/0' | tests/ovstest test-ovn
> test-ovn: ../include/openvswitch/list.h:245: assertion
> !ovs_list_is_empty(list) failed in ovs_list_front()
> Aborted (core dumped)
> This commit fixes this and related problems.
> The test added by this commit is very specific to the particular problem,
> whereas a more general test would be better. A later commit adds the
> general test.
> Signed-off-by: Ben Pfaff <blp at ovn.org>
Acked-by: Andy Zhou <azhou at ovn.org>
More information about the dev