diff options
author | Guy Harris <gharris@sonic.net> | 2021-02-02 21:48:45 -0800 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-02-02 21:48:59 -0800 |
commit | cf4263cabfffd1e185d76dbff5d1180321cfb22c (patch) | |
tree | a41a416c97a8786f7c73c02d0d6cb7e97b62f0c5 /gencode.c | |
parent | a6c4141ab3a3e0b47984a82b989a337fd98a8198 (diff) |
Expand a comment. [skip ci]
Diffstat (limited to 'gencode.c')
-rw-r--r-- | gencode.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -6080,7 +6080,18 @@ gen_protochain(compiler_state_t *cstate, bpf_u_int32 v, int proto) if (cstate->off_linkpl.is_variable) bpf_error(cstate, "'protochain' not supported with variable length headers"); - cstate->no_optimize = 1; /* this code is not compatible with optimizer yet */ + /* + * To quote a comment in optimize.c: + * + * "These data structures are used in a Cocke and Shwarz style + * value numbering scheme. Since the flowgraph is acyclic, + * exit values can be propagated from a node's predecessors + * provided it is uniquely defined." + * + * "Acyclic" means "no backward branches", which means "no + * loops", so we have to turn the optimizer off. + */ + cstate->no_optimize = 1; /* * s[0] is a dummy entry to protect other BPF insn from damage |