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

Function bpf_alu_be

dpdk/lib/bpf/bpf_exec.c:91–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91static inline void
92bpf_alu_be(uint64_t reg[EBPF_REG_NUM], const struct ebpf_insn *ins)
93{
94 uint64_t *v;
95
96 v = reg + ins->dst_reg;
97 switch (ins->imm) {
98 case 16:
99 *v = rte_cpu_to_be_16(*v);
100 break;
101 case 32:
102 *v = rte_cpu_to_be_32(*v);
103 break;
104 case 64:
105 *v = rte_cpu_to_be_64(*v);
106 break;
107 }
108}
109
110static inline void
111bpf_alu_le(uint64_t reg[EBPF_REG_NUM], const struct ebpf_insn *ins)

Callers 1

bpf_execFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected