1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
12 #include <rte_common.h>
18 rte_bpf_destroy(struct rte_bpf *bpf)
21 if (bpf->jit.func != NULL)
22 munmap(bpf->jit.func, bpf->jit.sz);
28 rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit)
30 if (bpf == NULL || jit == NULL)
38 bpf_jit(struct rte_bpf *bpf)
42 #if defined(RTE_ARCH_X86_64)
43 rc = bpf_jit_x86(bpf);
44 #elif defined(RTE_ARCH_ARM64)
45 rc = bpf_jit_arm64(bpf);
51 RTE_BPF_LOG(WARNING, "%s(%p) failed, error code: %d;\n",
56 RTE_LOG_REGISTER_DEFAULT(rte_bpf_logtype, INFO);