* report loops detected. */
| 1951 | * report loops detected. |
| 1952 | */ |
| 1953 | static void |
| 1954 | log_loop(const struct bpf_verifier *bvf) |
| 1955 | { |
| 1956 | uint32_t i, j; |
| 1957 | struct inst_node *node; |
| 1958 | |
| 1959 | for (i = 0; i != bvf->prm->nb_ins; i++) { |
| 1960 | |
| 1961 | node = bvf->in + i; |
| 1962 | if (node->colour != BLACK) |
| 1963 | continue; |
| 1964 | |
| 1965 | for (j = 0; j != node->nb_edge; j++) { |
| 1966 | if (node->edge_type[j] == BACK_EDGE) |
| 1967 | RTE_BPF_LOG(ERR, |
| 1968 | "loop at pc:%u --> pc:%u;\n", |
| 1969 | i, node->edge_dest[j]); |
| 1970 | } |
| 1971 | } |
| 1972 | } |
| 1973 | |
| 1974 | /* |
| 1975 | * First pass goes though all instructions in the set, checks that each |