Home
last modified time | relevance | path

Searched refs:BPF_SIZE (Results 1 – 25 of 29) sorted by relevance

12

/Linux-v6.6/tools/testing/selftests/bpf/
Ddisasm.c208 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
216 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
227 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
229 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
235 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
236 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
243 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
244 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
253 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
269 bpf_ldst_string[BPF_SIZE(insn->code) >> 3] : in print_bpf_insn()
[all …]
/Linux-v6.6/kernel/bpf/
Ddisasm.c208 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
216 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
227 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
229 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
235 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
236 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
243 BPF_SIZE(insn->code) == BPF_DW ? "64" : "", in print_bpf_insn()
244 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
253 bpf_ldst_string[BPF_SIZE(insn->code) >> 3], in print_bpf_insn()
269 bpf_ldst_string[BPF_SIZE(insn->code) >> 3] : in print_bpf_insn()
[all …]
Dcore.c2091 if (BPF_SIZE(insn->code) == BPF_W) \ in ___bpf_prog_run()
2099 if (BPF_SIZE(insn->code) == BPF_W) \ in ___bpf_prog_run()
2119 if (BPF_SIZE(insn->code) == BPF_W) in ___bpf_prog_run()
2129 if (BPF_SIZE(insn->code) == BPF_W) in ___bpf_prog_run()
Dcgroup.c2219 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in sysctl_convert_ctx_access()
2259 read_size = bpf_size_to_bytes(BPF_SIZE(si->code)); in sysctl_convert_ctx_access()
2261 BPF_SIZE(si->code), si->dst_reg, si->dst_reg, in sysctl_convert_ctx_access()
Dverifier.c3032 return BPF_SIZE(code) == BPF_DW; in is_reg64()
3044 return BPF_SIZE(code) == BPF_DW; in is_reg64()
6701 if (BPF_SIZE(insn->code) != BPF_W && BPF_SIZE(insn->code) != BPF_DW) { in check_atomic()
6766 BPF_SIZE(insn->code), BPF_READ, -1, true, false); in check_atomic()
6769 BPF_SIZE(insn->code), BPF_READ, load_reg, in check_atomic()
6776 BPF_SIZE(insn->code), BPF_WRITE, -1, true, false); in check_atomic()
14284 if (BPF_SIZE(insn->code) != BPF_DW) { in check_ld_imm()
14413 BPF_SIZE(insn->code) == BPF_DW || in check_ld_abs()
16558 insn->off, BPF_SIZE(insn->code), in do_check()
16596 insn->off, BPF_SIZE(insn->code), in do_check()
[all …]
/Linux-v6.6/samples/bpf/
Dbpf_insn.h111 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \
121 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \
131 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \
154 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_ATOMIC, \
167 .code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \
/Linux-v6.6/tools/include/linux/
Dfilter.h136 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \
146 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_IND, \
156 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \
166 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \
189 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_ATOMIC, \
202 .code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \
/Linux-v6.6/tools/include/uapi/linux/
Dbpf_common.h17 #define BPF_SIZE(code) ((code) & 0x18) macro
/Linux-v6.6/include/uapi/linux/
Dbpf_common.h17 #define BPF_SIZE(code) ((code) & 0x18) macro
/Linux-v6.6/include/linux/
Dfilter.h240 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_ABS, \
250 .code = BPF_LD | BPF_SIZE(SIZE) | BPF_IND, \
260 .code = BPF_LDX | BPF_SIZE(SIZE) | BPF_MEM, \
270 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_MEM, \
294 .code = BPF_STX | BPF_SIZE(SIZE) | BPF_ATOMIC, \
307 .code = BPF_ST | BPF_SIZE(SIZE) | BPF_MEM, \
471 const int __size = bpf_size_to_bytes(BPF_SIZE((insn)->code)); \
/Linux-v6.6/arch/mips/net/
Dbpf_jit_comp64.c828 emit_ldx(ctx, dst, src, off, BPF_SIZE(code)); in build_insn()
836 emit_stx(ctx, dst, MIPS_R_T4, off, BPF_SIZE(code)); in build_insn()
843 emit_stx(ctx, dst, src, off, BPF_SIZE(code)); in build_insn()
861 if (BPF_SIZE(code) == BPF_DW) { in build_insn()
879 if (BPF_SIZE(code) == BPF_DW) { in build_insn()
Dbpf_jit_comp32.c1659 emit_ldx(ctx, dst, lo(src), off, BPF_SIZE(code)); in build_insn()
1666 switch (BPF_SIZE(code)) { in build_insn()
1677 emit_stx(ctx, lo(dst), tmp, off, BPF_SIZE(code)); in build_insn()
1684 emit_stx(ctx, lo(dst), src, off, BPF_SIZE(code)); in build_insn()
/Linux-v6.6/arch/x86/net/
Dbpf_jit_comp.c1425 EMIT(imm32, bpf_size_to_x86_bytes(BPF_SIZE(insn->code))); in do_jit()
1433 emit_stx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); in do_jit()
1500 emit_ldsx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit()
1502 emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn_off); in do_jit()
1566 bool is64 = BPF_SIZE(insn->code) == BPF_DW; in do_jit()
1585 emit_ldx(&prog, BPF_SIZE(insn->code), in do_jit()
1599 BPF_SIZE(insn->code)); in do_jit()
1615 insn->off, BPF_SIZE(insn->code)); in do_jit()
Dbpf_jit_comp32.c1924 switch (BPF_SIZE(code)) { in do_jit()
1939 EMIT(imm32, bpf_size_to_x86_bytes(BPF_SIZE(code))); in do_jit()
1941 if (BPF_SIZE(code) == BPF_DW) { in do_jit()
1972 switch (BPF_SIZE(code)) { in do_jit()
1989 if (BPF_SIZE(code) == BPF_DW) { in do_jit()
2025 switch (BPF_SIZE(code)) { in do_jit()
2049 switch (BPF_SIZE(code)) { in do_jit()
/Linux-v6.6/arch/loongarch/net/
Dbpf_jit.c287 const bool isdw = BPF_SIZE(insn->code) == BPF_DW; in emit_atomic()
882 switch (BPF_SIZE(code)) { in build_insn()
931 switch (BPF_SIZE(code)) { in build_insn()
980 switch (BPF_SIZE(code)) { in build_insn()
/Linux-v6.6/arch/arm64/net/
Dbpf_jit_comp.c453 const bool isdw = BPF_SIZE(code) == BPF_DW; in emit_lse_atomic()
527 const bool isdw = BPF_SIZE(code) == BPF_DW; in emit_ll_sc_atomic()
1182 switch (BPF_SIZE(code)) { in build_insn()
1267 switch (BPF_SIZE(code)) { in build_insn()
1315 switch (BPF_SIZE(code)) { in build_insn()
/Linux-v6.6/arch/arm/net/
Dbpf_jit_32.c1607 emit_ldx_r(dst, rn, off, ctx, BPF_SIZE(code)); in build_insn()
1617 switch (BPF_SIZE(code)) { in build_insn()
1628 emit_str_r(dst_lo, tmp2, off, ctx, BPF_SIZE(code)); in build_insn()
1640 emit_str_r(dst_lo, rs, off, ctx, BPF_SIZE(code)); in build_insn()
/Linux-v6.6/net/core/
Dfilter.c473 int size = bpf_size_to_bytes(BPF_SIZE(fp->code)); in convert_bpf_ld_abs()
474 bool endian = BPF_SIZE(fp->code) == BPF_H || in convert_bpf_ld_abs()
475 BPF_SIZE(fp->code) == BPF_W; in convert_bpf_ld_abs()
494 *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, in convert_bpf_ld_abs()
499 *insn++ = BPF_LDX_MEM(BPF_SIZE(fp->code), BPF_REG_A, in convert_bpf_ld_abs()
518 switch (BPF_SIZE(fp->code)) { in convert_bpf_ld_abs()
8756 switch (BPF_SIZE(orig->code)) { in bpf_gen_ld_abs()
9497 *insn++ = BPF_EMIT_STORE(BPF_SIZE(si->code), si, off); in bpf_convert_ctx_access()
9499 *insn++ = BPF_LDX_MEM(BPF_SIZE(si->code), si->dst_reg, in bpf_convert_ctx_access()
9808 BPF_SIZE(si->code), si->dst_reg, si->src_reg, in bpf_sock_convert_ctx_access()
[all …]
/Linux-v6.6/drivers/net/ethernet/netronome/nfp/bpf/
Djit.c834 else if (BPF_SIZE(meta->insn.code) != BPF_DW) in nfp_cpp_memcpy()
839 switch (BPF_SIZE(meta->insn.code)) { in nfp_cpp_memcpy()
861 if (BPF_SIZE(meta->insn.code) != BPF_DW) in nfp_cpp_memcpy()
3982 if (!exp_mask[BPF_SIZE(insn.code)]) in nfp_bpf_opt_ld_mask()
3984 if (exp_mask[BPF_SIZE(insn.code)] != next.imm) in nfp_bpf_opt_ld_mask()
4013 if (BPF_SIZE(insn.code) != BPF_W) in nfp_bpf_opt_ld_shift()
4065 if (BPF_SIZE(ld->code) != BPF_SIZE(st->code)) in curr_pair_is_memcpy()
/Linux-v6.6/arch/sparc/net/
Dbpf_jit_comp_64.c1263 switch (BPF_SIZE(code)) { in build_insn()
1308 switch (BPF_SIZE(code)) { in build_insn()
1346 switch (BPF_SIZE(code)) { in build_insn()
/Linux-v6.6/arch/powerpc/net/
Dbpf_jit_comp64.c379 u32 size = BPF_SIZE(code); in bpf_jit_build_body()
913 if (BPF_SIZE(code) == BPF_DW && (off & 3)) in bpf_jit_build_body()
/Linux-v6.6/arch/riscv/net/
Dbpf_jit_comp32.c1248 if (emit_load_r64(dst, src, off, ctx, BPF_SIZE(code))) in bpf_jit_emit_insn()
1270 if (emit_store_r64(dst, src, off, ctx, BPF_SIZE(code), in bpf_jit_emit_insn()
1283 if (emit_store_r64(dst, src, off, ctx, BPF_SIZE(code), in bpf_jit_emit_insn()
Dbpf_jit_comp64.c1586 switch (BPF_SIZE(code)) { in bpf_jit_emit_insn()
1667 if (BPF_SIZE(code) != BPF_DW && insn_is_zext(&insn[1])) in bpf_jit_emit_insn()
1766 BPF_SIZE(code) == BPF_DW, ctx); in bpf_jit_emit_insn()
/Linux-v6.6/arch/parisc/net/
Dbpf_jit_comp64.c1034 switch (BPF_SIZE(code)) { in bpf_jit_emit_insn()
1082 emit_store(rd, rs, off, ctx, BPF_SIZE(code), BPF_MODE(code)); in bpf_jit_emit_insn()
Dbpf_jit_comp32.c1133 BPF_CLASS(code), code, (code & BPF_ALU64) ? 1:0, BPF_SIZE(code), in bpf_jit_emit_insn()
1424 if (emit_load_r64(dst, src, off, ctx, BPF_SIZE(code))) in bpf_jit_emit_insn()
1447 if (emit_store_r64(dst, src, off, ctx, BPF_SIZE(code), in bpf_jit_emit_insn()

12