1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Intel Corporation
9 #include <rte_common.h>
14 rte_bpf_destroy(struct rte_bpf *bpf)
17 if (bpf->jit.func != NULL)
18 munmap(bpf->jit.func, bpf->jit.sz);
24 rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit)
26 if (bpf == NULL || jit == NULL)
34 bpf_jit(struct rte_bpf *bpf)
38 #if defined(RTE_ARCH_X86_64)
39 rc = bpf_jit_x86(bpf);
40 #elif defined(RTE_ARCH_ARM64)
41 rc = bpf_jit_arm64(bpf);
47 RTE_BPF_LOG(WARNING, "%s(%p) failed, error code: %d;\n",
52 RTE_LOG_REGISTER_DEFAULT(rte_bpf_logtype, INFO);