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

Function eval_apply_mask

dpdk/lib/bpf/bpf_validate.c:220–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220static void
221eval_apply_mask(struct bpf_reg_val *rv, uint64_t mask)
222{
223 struct bpf_reg_val rt;
224
225 rt.u.min = rv->u.min & mask;
226 rt.u.max = rv->u.max & mask;
227 if (rt.u.min != rv->u.min || rt.u.max != rv->u.max) {
228 rv->u.max = RTE_MAX(rt.u.max, mask);
229 rv->u.min = 0;
230 }
231
232 eval_smax_bound(&rt, mask);
233 rv->s.max = RTE_MIN(rt.s.max, rv->s.max);
234 rv->s.min = RTE_MAX(rt.s.min, rv->s.min);
235
236 rv->mask = mask;
237}
238
239static void
240eval_add(struct bpf_reg_val *rd, const struct bpf_reg_val *rs, uint64_t msk)

Callers 3

eval_aluFunction · 0.85
eval_beleFunction · 0.85
eval_storeFunction · 0.85

Calls 1

eval_smax_boundFunction · 0.85

Tested by

no test coverage detected