MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bpf_alu_le

Function bpf_alu_le

dpdk/lib/bpf/bpf_exec.c:110–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static inline void
111bpf_alu_le(uint64_t reg[EBPF_REG_NUM], const struct ebpf_insn *ins)
112{
113 uint64_t *v;
114
115 v = reg + ins->dst_reg;
116 switch (ins->imm) {
117 case 16:
118 *v = rte_cpu_to_le_16(*v);
119 break;
120 case 32:
121 *v = rte_cpu_to_le_32(*v);
122 break;
123 case 64:
124 *v = rte_cpu_to_le_64(*v);
125 break;
126 }
127}
128
129static inline const void *
130bpf_ld_mbuf(const struct rte_bpf *bpf, uint64_t reg[EBPF_REG_NUM],

Callers 1

bpf_execFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected