Home
last modified time | relevance | path

Searched refs:bpf (Results 1 – 25 of 28) sorted by relevance

12

/dpdk/lib/bpf/
H A Dbpf.c14 rte_bpf_destroy(struct rte_bpf *bpf) in rte_bpf_destroy() argument
16 if (bpf != NULL) { in rte_bpf_destroy()
17 if (bpf->jit.func != NULL) in rte_bpf_destroy()
18 munmap(bpf->jit.func, bpf->jit.sz); in rte_bpf_destroy()
19 munmap(bpf, bpf->sz); in rte_bpf_destroy()
26 if (bpf == NULL || jit == NULL) in rte_bpf_get_jit()
29 jit[0] = bpf->jit; in rte_bpf_get_jit()
34 bpf_jit(struct rte_bpf *bpf) in bpf_jit() argument
39 rc = bpf_jit_x86(bpf); in bpf_jit()
41 rc = bpf_jit_arm64(bpf); in bpf_jit()
[all …]
H A Dbpf_load.c19 struct rte_bpf *bpf; in bpf_load() local
24 bsz = sizeof(bpf[0]); in bpf_load()
32 bpf = (void *)buf; in bpf_load()
33 bpf->sz = sz; in bpf_load()
35 memcpy(&bpf->prm, prm, sizeof(bpf->prm)); in bpf_load()
43 return bpf; in bpf_load()
84 struct rte_bpf *bpf; in rte_bpf_load() local
105 if (bpf == NULL) { in rte_bpf_load()
112 bpf_jit(bpf); in rte_bpf_load()
113 if (mprotect(bpf, bpf->sz, PROT_READ) != 0) in rte_bpf_load()
[all …]
H A Dbpf_exec.c48 __func__, bpf, \
49 (uintptr_t)(ins) - (uintptr_t)(bpf)->prm.ins); \
141 __func__, bpf, mb, off, len, in bpf_ld_mbuf()
151 for (ins = bpf->prm.ins; ; ins++) { in bpf_exec()
213 BPF_DIV_ZERO_CHECK(bpf, reg, ins, uint32_t); in bpf_exec()
217 BPF_DIV_ZERO_CHECK(bpf, reg, ins, uint32_t); in bpf_exec()
332 BPF_LD_ABS(bpf, reg, ins, uint8_t, NOP); in bpf_exec()
342 BPF_LD_IND(bpf, reg, ins, uint8_t, NOP); in bpf_exec()
467 __func__, bpf, ins->code, in bpf_exec()
491 rc[i] = bpf_exec(bpf, reg); in rte_bpf_exec_burst()
[all …]
H A Dbpf_pkt.c30 struct rte_bpf *bpf; member
121 bc->bpf = NULL; in bpf_eth_cbi_cleanup()
201 rte_bpf_exec_burst(bpf, dp, rc, num); in pkt_filter_vm()
271 pkt_filter_vm(cbi->bpf, pkt, nb_pkts, 1) : in bpf_rx_callback_vm()
446 rte_bpf_destroy(bc->bpf); in bpf_eth_cbi_unload()
497 struct rte_bpf *bpf; in bpf_eth_elf_load() local
521 if (bpf == NULL) in bpf_eth_elf_load()
524 rte_bpf_get_jit(bpf, &jit); in bpf_eth_elf_load()
529 rte_bpf_destroy(bpf); in bpf_eth_elf_load()
542 bc->bpf = bpf; in bpf_eth_elf_load()
[all …]
H A Dbpf_load_elf.c273 struct rte_bpf *bpf; in bpf_load_elf() local
287 bpf = rte_bpf_load(&np); in bpf_load_elf()
289 bpf = NULL; in bpf_load_elf()
294 return bpf; in bpf_load_elf()
302 struct rte_bpf *bpf; in rte_bpf_elf_load() local
318 bpf = bpf_load_elf(prm, fd, sname); in rte_bpf_elf_load()
321 if (bpf == NULL) { in rte_bpf_elf_load()
331 __func__, fname, sname, bpf, bpf->jit.func, bpf->jit.sz); in rte_bpf_elf_load()
332 return bpf; in rte_bpf_elf_load()
H A Drte_bpf.h116 rte_bpf_destroy(struct rte_bpf *bpf);
167 rte_bpf_exec(const struct rte_bpf *bpf, void *ctx);
184 rte_bpf_exec_burst(const struct rte_bpf *bpf, void *ctx[], uint64_t rc[],
199 rte_bpf_get_jit(const struct rte_bpf *bpf, struct rte_bpf_jit *jit);
H A Dbpf_impl.h20 extern int bpf_validate(struct rte_bpf *bpf);
22 extern int bpf_jit(struct rte_bpf *bpf);
H A Dbpf_jit_arm64.c118 for (i = 0; i != bpf->prm.nb_ins; i++) { in jump_offset_init()
1100 ins = bpf->prm.ins + i; in check_program_has_call()
1140 ins = bpf->prm.ins + i; in emit()
1382 __func__, bpf, ins->code, i); in emit()
1395 bpf_jit_arm64(struct rte_bpf *bpf) in bpf_jit_arm64() argument
1405 rc = jump_offset_init(&ctx, bpf); in bpf_jit_arm64()
1410 check_program_has_call(&ctx, bpf); in bpf_jit_arm64()
1413 rc = emit(&ctx, bpf); in bpf_jit_arm64()
1427 rc = emit(&ctx, bpf); in bpf_jit_arm64()
1440 bpf->jit.func = (void *)ctx.ins; in bpf_jit_arm64()
[all …]
H A Dbpf_jit_x86.c1290 st->ldmb.stack_ofs = bpf->stack_sz; in emit()
1292 emit_prolog(st, bpf->stack_sz); in emit()
1294 for (i = 0; i != bpf->prm.nb_ins; i++) { in emit()
1299 ins = bpf->prm.ins + i; in emit()
1481 __func__, bpf, ins->code, i); in emit()
1493 bpf_jit_x86(struct rte_bpf *bpf) in bpf_jit_x86() argument
1508 for (i = 0; i != bpf->prm.nb_ins; i++) in bpf_jit_x86()
1517 rc = emit(&st, bpf); in bpf_jit_x86()
1529 rc = emit(&st, bpf); in bpf_jit_x86()
1538 bpf->jit.func = (void *)st.ins; in bpf_jit_x86()
[all …]
H A Dmeson.build10 sources = files('bpf.c',
H A Dbpf_validate.c2304 bpf_validate(struct rte_bpf *bpf) in bpf_validate() argument
2310 if (bpf->prm.prog_arg.type != RTE_BPF_ARG_RAW && in bpf_validate()
2311 bpf->prm.prog_arg.type != RTE_BPF_ARG_PTR && in bpf_validate()
2313 bpf->prm.prog_arg.type != RTE_BPF_ARG_PTR_MBUF)) { in bpf_validate()
2319 bvf.prm = &bpf->prm; in bpf_validate()
2320 bvf.in = calloc(bpf->prm.nb_ins, sizeof(bvf.in[0])); in bpf_validate()
2337 bpf->stack_sz = bvf.stack_sz; in bpf_validate()
2341 bpf->stack_sz = RTE_ALIGN_CEIL(bpf->stack_sz + in bpf_validate()
/dpdk/drivers/common/cnxk/
H A Droc_nix_bpf.c115 bpf->cir_mantissa, bpf->pebs_mantissa); in nix_lf_bpf_dump()
117 bpf->peir_mantissa, bpf->cbs_exponent); in nix_lf_bpf_dump()
119 bpf->cir_exponent, bpf->pebs_exponent); in nix_lf_bpf_dump()
125 bpf->band_prof_id); in nix_lf_bpf_dump()
127 bpf->rc_action); in nix_lf_bpf_dump()
129 bpf->yc_action, bpf->gc_action); in nix_lf_bpf_dump()
131 bpf->adjust_mantissa, bpf->adjust_exponent); in nix_lf_bpf_dump()
134 bpf->lmode); in nix_lf_bpf_dump()
138 bpf->pe_accum); in nix_lf_bpf_dump()
144 (uint64_t)bpf->red_pkt_pass); in nix_lf_bpf_dump()
[all …]
/dpdk/drivers/net/af_xdp/
H A Dmeson.build15 bpf_dep = cc.find_library('bpf', required: false) build
20 if bpf_dep.found() and cc.has_header('bpf/bpf.h')
34 elif bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('bpf/bpf.h')
/dpdk/examples/bpf/
H A DREADME1 This folder contains example BPF programs for use with the DPDK bpf
6 for execution on a packet stream. See `bpf-load` and `bpf-unload`
/dpdk/app/test-pmd/
H A Dbpf_cmd.c56 cmdline_fixed_string_t bpf; member
122 bpf, "bpf-load");
154 cmdline_fixed_string_t bpf; member
178 bpf, "bpf-unload");
H A Dmeson.build44 deps += 'bpf'
/dpdk/drivers/net/tap/
H A Dtap_flow.c160 struct bpf { struct
161 struct tc_act_bpf bpf; member
164 } bpf; member
948 tap_nlattr_add32(&msg->nh, TCA_ACT_BPF_FD, adata->bpf.bpf_fd); in add_action()
950 strlen(adata->bpf.annotation) + 1, in add_action()
951 adata->bpf.annotation); in add_action()
953 sizeof(adata->bpf.bpf), in add_action()
954 &adata->bpf.bpf); in add_action()
2147 .bpf = { in rss_add_actions()
2150 .bpf = { in rss_add_actions()
/dpdk/lib/pdump/
H A Dmeson.build12 deps += ['ethdev', 'bpf', 'pcapng']
/dpdk/app/dumpcap/
H A Dmeson.build17 deps += ['ethdev', 'pdump', 'pcapng', 'bpf']
/dpdk/app/test/
H A Dtest_bpf.c3205 struct rte_bpf *bpf; in run_test() local
3212 if (bpf == NULL) { in run_test()
3242 rte_bpf_destroy(bpf); in run_test()
3314 bpf = rte_bpf_load(prm); in test_bpf_match()
3315 if (bpf == NULL) { in test_bpf_match()
3325 if (bpf) in test_bpf_match()
3326 rte_bpf_destroy(bpf); in test_bpf_match()
3433 bpf = rte_bpf_load(prm); in test_bpf_filter()
3434 if (bpf == NULL) { in test_bpf_filter()
3441 if (bpf) in test_bpf_filter()
[all …]
/dpdk/doc/guides/nics/
H A Daf_xdp.rst48 LIBXDP_OBJECT_PATH to be set to the location of where libxdp placed its bpf
49 object files. This is usually in /usr/local/lib/bpf or /usr/local/lib64/bpf.
H A Dtap.rst255 clang -O2 -emit-llvm -c tap_bpf_program.c -o - | llc -march=bpf \
271 Please refer to ``iproute2`` package file ``lib/bpf.c`` function
/dpdk/lib/
H A Dmeson.build30 'bpf',
60 'pdump', # pdump lib depends on bpf
/dpdk/doc/api/
H A Ddoxy-api.conf.in33 @TOPDIR@/lib/bpf \
/dpdk/doc/guides/linux_gsg/
H A Dsys_reqs.rst92 * libelf: to compile and use the bpf library.

12