Closed mpeterv closed 9 years ago
LGTM, nice catch. Waiting on second review.
Same comment as in #220.
LGTM, @mpeterv can you add an entry to doc/ for "tcp and tcp[100] ==1" so that we don't regress? thanks in advance :)
@andywingo sorry, could you add it? On my machine I get different results for BPF pipelines, so if I'd do it it would break on yours.
On Tue 30 Jun 2015 16:47, Peter Melnichenko notifications@github.com writes:
@andywingo sorry, could you add it? On my machine I get different results for BPF pipelines, so if I'd do it it would break on yours.
Sure, no problem.
if A fail fail
can appear when some checks are conflicting, e.g.tcp and tcp[100] == 1
used to compile toNote the path that always returns false. With this change it compiles to
Which is same as code for
tcp[100] == 1
.Some optimizations are also possible for other cases when true and false branches of an
if
are identical, but I couldn't find an example of that.