eal: disable syslog and dlopen on Windows
[dpdk.git] / lib / librte_bpf / bpf.c
index d7f68c0..7e1879f 100644 (file)
@@ -16,7 +16,7 @@
 
 int rte_bpf_logtype;
 
-__rte_experimental void
+void
 rte_bpf_destroy(struct rte_bpf *bpf)
 {
        if (bpf != NULL) {
@@ -26,7 +26,7 @@ rte_bpf_destroy(struct rte_bpf *bpf)
        }
 }
 
-__rte_experimental int
+int
 rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit)
 {
        if (bpf == NULL || jit == NULL)
@@ -41,17 +41,21 @@ bpf_jit(struct rte_bpf *bpf)
 {
        int32_t rc;
 
+#if defined(RTE_ARCH_X86_64)
+       rc = bpf_jit_x86(bpf);
+#elif defined(RTE_ARCH_ARM64)
+       rc = bpf_jit_arm64(bpf);
+#else
        rc = -ENOTSUP;
+#endif
+
        if (rc != 0)
                RTE_BPF_LOG(WARNING, "%s(%p) failed, error code: %d;\n",
                        __func__, bpf, rc);
        return rc;
 }
 
-RTE_INIT(rte_bpf_init_log);
-
-static void
-rte_bpf_init_log(void)
+RTE_INIT(rte_bpf_init_log)
 {
        rte_bpf_logtype = rte_log_register("lib.bpf");
        if (rte_bpf_logtype >= 0)