Re: [PATCH net 2/2] selftests: udpgro: no need to load xdp for gro

2024-08-14 Thread Toke Høiland-Jørgensen
ro.sh > > After fix, all the test passed. > > # ./udpgro.sh > ipv4 > no GRO ok > [...] > multiple GRO socks ok > > Fixes: d7db7775ea2e ("net: veth: do not manipulate GRO when using XDP") > Reported-b

Re: [PATCH bpf-next] selftests/bpf: Avoid subtraction after htons() in ipip tests

2024-08-08 Thread Toke Høiland-Jørgensen
> After this patch: > __bpf_constant_htons(MAGIC_BYTES - sizeof(struct iphdr)) = htons(103) > > Now these packets are outer IP packets with a total length of 123 bytes, > containing an inner IP packet with a total length of 103 bytes. > > Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Toke Høiland-Jørgensen

Re: [PATCH net] selftests/bpf: fix pointer arithmetic in test_xdp_do_redirect

2024-05-06 Thread Toke Høiland-Jørgensen
x > bff: c7 00 00 00 00 00 movl $0x0,(%rax) > > Fixes: 5640b6d89434 ("selftests/bpf: fix "metadata marker" getting > overwritten by the netstack") > Signed-off-by: Michal Schmidt Reviewed-by: Toke Høiland-Jørgensen

Re: [PATCH RFC bpf-next v3 04/16] bpf/helpers: introduce sleepable bpf_timers

2024-02-22 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: > @@ -1245,6 +1294,7 @@ BPF_CALL_3(bpf_timer_set_callback, struct > bpf_timer_kern *, timer, void *, callb > ret = -EPERM; > goto out; > } > + down(&t->sleepable_lock); > prev = t->prog; > if (prev != prog) { >

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-17 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: > On Feb 16 2024, Toke Høiland-Jørgensen wrote: >> Benjamin Tissoires writes: >> >> > On Feb 15 2024, Martin KaFai Lau wrote: >> >> On 2/14/24 9:18 AM, Benjamin Tissoires wrote: >> >> > +sta

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-16 Thread Toke Høiland-Jørgensen
Just one comment on one of your FIXMEs: > + rcu_assign_pointer(t->sleepable_cb_fn, NULL); > + /* FIXME: probably do something about the SLEEPABLE flag */ I guess we should store the flag in the timer struct somewhere, and then restrict the set_callback() functions so that the regular vari

Re: [PATCH RFC bpf-next v2 02/10] bpf/helpers: introduce sleepable timers

2024-02-16 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: > On Feb 15 2024, Martin KaFai Lau wrote: >> On 2/14/24 9:18 AM, Benjamin Tissoires wrote: >> > +static void bpf_timer_work_cb(struct work_struct *work) >> > +{ >> > + struct bpf_hrtimer *t = container_of(work, struct bpf_hrtimer, work); >> > + struct bpf_map *map = t

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-14 Thread Toke Høiland-Jørgensen
Alexei Starovoitov writes: > On Tue, Feb 13, 2024 at 08:51:26PM +0100, Toke Høiland-Jørgensen wrote: >> Kumar Kartikeya Dwivedi writes: >> >> > On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires >> > wrote: >> >> >> >> On Feb 12 2024,

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-13 Thread Toke Høiland-Jørgensen
Kumar Kartikeya Dwivedi writes: > On Tue, 13 Feb 2024 at 18:46, Benjamin Tissoires wrote: >> >> On Feb 12 2024, Alexei Starovoitov wrote: >> > On Mon, Feb 12, 2024 at 10:21 AM Benjamin Tissoires >> > wrote: >> > > >> > > On Mon, Feb

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-12 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: [...] >> IIUC, the bpf_timer callback is just a function (subprog) from the >> verifier PoV, so it is verified as whatever program type is creating the >> timer. So in other words, as long as you setup the timer from inside a >> tracing prog type, you should have access

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-09 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: > On Fri, Feb 9, 2024 at 4:42 PM Toke Høiland-Jørgensen wrote: >> >> Benjamin Tissoires writes: >> >> > [Putting this as a RFC because I'm pretty sure I'm not doing the things >> > correctly at the BPF level.] >>

Re: [PATCH RFC bpf-next 0/9] allow HID-BPF to do device IOs

2024-02-09 Thread Toke Høiland-Jørgensen
Benjamin Tissoires writes: > [Putting this as a RFC because I'm pretty sure I'm not doing the things > correctly at the BPF level.] > [Also using bpf-next as the base tree as there will be conflicting > changes otherwise] > > Ideally I'd like to have something similar to bpf_timers, but not > in