| 2250 | } |
| 2251 | |
| 2252 | static void |
| 2253 | log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins, |
| 2254 | uint32_t pc, int32_t loglvl) |
| 2255 | { |
| 2256 | const struct bpf_eval_state *st; |
| 2257 | const struct bpf_reg_val *rv; |
| 2258 | |
| 2259 | rte_log(loglvl, rte_bpf_logtype, "%s(pc=%u):\n", __func__, pc); |
| 2260 | |
| 2261 | st = bvf->evst; |
| 2262 | rv = st->rv + ins->dst_reg; |
| 2263 | |
| 2264 | rte_log(loglvl, rte_bpf_logtype, |
| 2265 | "r%u={\n" |
| 2266 | "\tv={type=%u, size=%zu, buf_size=%zu},\n" |
| 2267 | "\tmask=0x%" PRIx64 ",\n" |
| 2268 | "\tu={min=0x%" PRIx64 ", max=0x%" PRIx64 "},\n" |
| 2269 | "\ts={min=%" PRId64 ", max=%" PRId64 "},\n" |
| 2270 | "};\n", |
| 2271 | ins->dst_reg, |
| 2272 | rv->v.type, rv->v.size, rv->v.buf_size, |
| 2273 | rv->mask, |
| 2274 | rv->u.min, rv->u.max, |
| 2275 | rv->s.min, rv->s.max); |
| 2276 | } |
| 2277 | |
| 2278 | /* |
| 2279 | * compare two evaluation states. |