MCPcopy Create free account
hub / github.com/F-Stack/f-stack / log_unreachable

Function log_unreachable

dpdk/lib/bpf/bpf_validate.c:1932–1948  ·  view source on GitHub ↗

* report unreachable instructions. */

Source from the content-addressed store, hash-verified

1930 * report unreachable instructions.
1931 */
1932static void
1933log_unreachable(const struct bpf_verifier *bvf)
1934{
1935 uint32_t i;
1936 struct inst_node *node;
1937 const struct ebpf_insn *ins;
1938
1939 for (i = 0; i != bvf->prm->nb_ins; i++) {
1940
1941 node = bvf->in + i;
1942 ins = bvf->prm->ins + i;
1943
1944 if (node->colour == WHITE &&
1945 ins->code != (BPF_LD | BPF_IMM | EBPF_DW))
1946 RTE_BPF_LOG(ERR, "unreachable code at pc: %u;\n", i);
1947 }
1948}
1949
1950/*
1951 * report loops detected.

Callers 1

validateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected