Home
last modified time | relevance | path

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

123

/f-stack/dpdk/lib/librte_bpf/
H A Dbpf.c18 rte_bpf_destroy(struct rte_bpf *bpf) in rte_bpf_destroy() argument
20 if (bpf != NULL) { in rte_bpf_destroy()
21 if (bpf->jit.func != NULL) in rte_bpf_destroy()
22 munmap(bpf->jit.func, bpf->jit.sz); in rte_bpf_destroy()
23 munmap(bpf, bpf->sz); in rte_bpf_destroy()
30 if (bpf == NULL || jit == NULL) in rte_bpf_get_jit()
33 jit[0] = bpf->jit; in rte_bpf_get_jit()
38 bpf_jit(struct rte_bpf *bpf) in bpf_jit() argument
43 rc = bpf_jit_x86(bpf); in bpf_jit()
45 rc = bpf_jit_arm64(bpf); in bpf_jit()
[all …]
H A Dbpf_load.c27 struct rte_bpf *bpf; in bpf_load() local
32 bsz = sizeof(bpf[0]); in bpf_load()
40 bpf = (void *)buf; in bpf_load()
41 bpf->sz = sz; in bpf_load()
43 memcpy(&bpf->prm, prm, sizeof(bpf->prm)); in bpf_load()
51 return bpf; in bpf_load()
92 struct rte_bpf *bpf; in rte_bpf_load() local
113 if (bpf == NULL) { in rte_bpf_load()
120 bpf_jit(bpf); in rte_bpf_load()
121 if (mprotect(bpf, bpf->sz, PROT_READ) != 0) in rte_bpf_load()
[all …]
H A Dbpf_exec.c54 __func__, bpf, \
147 __func__, bpf, mb, off, len, in bpf_ld_mbuf()
157 for (ins = bpf->prm.ins; ; ins++) { in bpf_exec()
219 BPF_DIV_ZERO_CHECK(bpf, reg, ins, uint32_t); in bpf_exec()
223 BPF_DIV_ZERO_CHECK(bpf, reg, ins, uint32_t); in bpf_exec()
338 BPF_LD_ABS(bpf, reg, ins, uint8_t, NOP); in bpf_exec()
348 BPF_LD_IND(bpf, reg, ins, uint8_t, NOP); in bpf_exec()
473 __func__, bpf, ins->code, in bpf_exec()
474 (uintptr_t)ins - (uintptr_t)bpf->prm.ins); in bpf_exec()
497 rc[i] = bpf_exec(bpf, reg); in rte_bpf_exec_burst()
[all …]
H A Dbpf_pkt.c42 struct rte_bpf *bpf; member
136 bc->bpf = NULL; in bpf_eth_cbi_cleanup()
216 rte_bpf_exec_burst(bpf, dp, rc, num); in pkt_filter_vm()
286 pkt_filter_vm(cbi->bpf, pkt, nb_pkts, 1) : in bpf_rx_callback_vm()
461 rte_bpf_destroy(bc->bpf); in bpf_eth_cbi_unload()
512 struct rte_bpf *bpf; in bpf_eth_elf_load() local
536 if (bpf == NULL) in bpf_eth_elf_load()
539 rte_bpf_get_jit(bpf, &jit); in bpf_eth_elf_load()
544 rte_bpf_destroy(bpf); in bpf_eth_elf_load()
557 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.h24 extern int bpf_validate(struct rte_bpf *bpf);
26 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.c1295 st->ldmb.stack_ofs = bpf->stack_sz; in emit()
1297 emit_prolog(st, bpf->stack_sz); in emit()
1299 for (i = 0; i != bpf->prm.nb_ins; i++) { in emit()
1304 ins = bpf->prm.ins + i; in emit()
1486 __func__, bpf, ins->code, i); in emit()
1498 bpf_jit_x86(struct rte_bpf *bpf) in bpf_jit_x86() argument
1513 for (i = 0; i != bpf->prm.nb_ins; i++) in bpf_jit_x86()
1522 rc = emit(&st, bpf); in bpf_jit_x86()
1534 rc = emit(&st, bpf); in bpf_jit_x86()
1543 bpf->jit.func = (void *)st.ins; in bpf_jit_x86()
[all …]
H A Dmeson.build4 sources = files('bpf.c',
/f-stack/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`
/f-stack/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.build60 deps += 'bpf'
/f-stack/dpdk/drivers/net/af_xdp/
H A Dmeson.build8 bpf_dep = cc.find_library('bpf', required: false) build
11 if bpf_dep.found() and cc.has_header('bpf/xsk.h') and cc.has_header('linux/if_xdp.h')
/f-stack/freebsd/arm/conf/
H A DIMX5340 # The `bpf' device enables the Berkeley Packet Filter.
42 # Note that 'bpf' is required for DHCP.
43 device bpf # Berkeley packet filter
H A DEFIKA_MX53 # The `bpf' device enables the Berkeley Packet Filter.
55 # Note that 'bpf' is required for DHCP.
56 device bpf # Berkeley packet filter
/f-stack/dpdk/drivers/net/tap/
H A Dtap_flow.c160 struct bpf { struct
161 struct tc_act_bpf bpf; argument
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()
2144 .bpf = { in rss_add_actions()
2147 .bpf = { in rss_add_actions()
/f-stack/freebsd/mips/conf/
H A DBERI_NETFPGA_MDROOT22 device bpf
H A DBERI_DE4_BASE31 device bpf
H A DMT7620A_FDT72 device bpf
/f-stack/freebsd/amd64/conf/
H A DMINIMAL132 # The `bpf' device enables the Berkeley Packet Filter.
134 # Note that 'bpf' is required for DHCP.
135 device bpf # Berkeley packet filter
/f-stack/freebsd/i386/conf/
H A DMINIMAL132 # The `bpf' device enables the Berkeley Packet Filter.
134 # Note that 'bpf' is required for DHCP.
135 device bpf # Berkeley packet filter
/f-stack/tools/netstat/
H A DMakefile6 unix.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c common.c nhops.c nhgrp.c \
/f-stack/tools/compat/include/net/
H A Dbpf.h435 bpf_peers_present(struct bpf_if *bpf) in bpf_peers_present() argument
439 ext = (struct bpf_if_ext *)bpf; in bpf_peers_present()
/f-stack/freebsd/net/
H A Dbpf.h436 bpf_peers_present(struct bpf_if *bpf) in bpf_peers_present() argument
440 ext = (struct bpf_if_ext *)bpf; in bpf_peers_present()

123