Thread (3 messages) 3 messages, 3 authors, 2021-09-08

Re: [PATCH bpf-next v3] bpf testing: permit ingress_ifindex in bpf_prog_test_run_xattr

From: Andrii Nakryiko <hidden>
Date: 2021-09-08 00:05:19

On Tue, Aug 31, 2021 at 10:56 PM John Fastabend
[off-list ref] wrote:
Neil Spring wrote:
quoted
bpf_prog_test_run_xattr takes a struct __sk_buff, but did not permit
that __skbuff to include an nonzero ingress_ifindex.

This patch updates to allow ingress_ifindex, convert the __sk_buff field to
sk_buff (skb_iif) and back, and test that the value is present from
tested bpf.  The test sets an unlikely distinct value for ingress_ifindex
(11) from ifindex (1), but that seems in keeping with the rest of the
synthetic fields.

Adding this support allows testing BPF that operates differently on
incoming and outgoing skbs by discriminating on this field.

Signed-off-by: Neil Spring <redacted>
---
Acked-by: John Fastabend <john.fastabend@gmail.com>
Applied to bpf-next, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help