Searched refs:insn (Results 1 – 2 of 2) sorted by relevance
/net/core/ |
D | filter.c | 293 struct bpf_insn *insn = insn_buf; in convert_skb_access() local 299 *insn++ = BPF_LDX_MEM(BPF_W, dst_reg, src_reg, in convert_skb_access() 304 *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_TYPE_OFFSET()); in convert_skb_access() 305 *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, PKT_TYPE_MAX); in convert_skb_access() 307 *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, 5); in convert_skb_access() 314 *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, in convert_skb_access() 322 *insn++ = BPF_LDX_MEM(BPF_H, dst_reg, src_reg, in convert_skb_access() 326 *insn++ = BPF_LDX_MEM(BPF_B, dst_reg, src_reg, PKT_VLAN_PRESENT_OFFSET()); in convert_skb_access() 328 *insn++ = BPF_ALU32_IMM(BPF_RSH, dst_reg, PKT_VLAN_PRESENT_BIT); in convert_skb_access() 330 *insn++ = BPF_ALU32_IMM(BPF_AND, dst_reg, 1); in convert_skb_access() [all …]
|
/net/xdp/ |
D | xskmap.c | 114 struct bpf_insn *insn = insn_buf; in xsk_map_gen_lookup() local 116 *insn++ = BPF_LDX_MEM(BPF_W, ret, index, 0); in xsk_map_gen_lookup() 117 *insn++ = BPF_JMP_IMM(BPF_JGE, ret, map->max_entries, 5); in xsk_map_gen_lookup() 118 *insn++ = BPF_ALU64_IMM(BPF_LSH, ret, ilog2(sizeof(struct xsk_sock *))); in xsk_map_gen_lookup() 119 *insn++ = BPF_ALU64_IMM(BPF_ADD, mp, offsetof(struct xsk_map, xsk_map)); in xsk_map_gen_lookup() 120 *insn++ = BPF_ALU64_REG(BPF_ADD, ret, mp); in xsk_map_gen_lookup() 121 *insn++ = BPF_LDX_MEM(BPF_SIZEOF(struct xsk_sock *), ret, ret, 0); in xsk_map_gen_lookup() 122 *insn++ = BPF_JMP_IMM(BPF_JA, 0, 0, 1); in xsk_map_gen_lookup() 123 *insn++ = BPF_MOV64_IMM(ret, 0); in xsk_map_gen_lookup() 124 return insn - insn_buf; in xsk_map_gen_lookup()
|