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

Function eval_bele

dpdk/lib/bpf/bpf_validate.c:720–750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718}
719
720static const char *
721eval_bele(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
722{
723 uint64_t msk;
724 struct bpf_eval_state *st;
725 struct bpf_reg_val *rd;
726 const char *err;
727
728 msk = RTE_LEN2MASK(ins->imm, uint64_t);
729
730 st = bvf->evst;
731 rd = st->rv + ins->dst_reg;
732
733 err = eval_defined(rd, NULL);
734 if (err != NULL)
735 return err;
736
737#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
738 if (ins->code == (BPF_ALU | EBPF_END | EBPF_TO_BE))
739 eval_max_bound(rd, msk);
740 else
741 eval_apply_mask(rd, msk);
742#else
743 if (ins->code == (BPF_ALU | EBPF_END | EBPF_TO_LE))
744 eval_max_bound(rd, msk);
745 else
746 eval_apply_mask(rd, msk);
747#endif
748
749 return NULL;
750}
751
752static const char *
753eval_ptr(struct bpf_verifier *bvf, struct bpf_reg_val *rm, uint32_t opsz,

Callers

nothing calls this directly

Calls 3

eval_definedFunction · 0.85
eval_max_boundFunction · 0.85
eval_apply_maskFunction · 0.85

Tested by

no test coverage detected