Re: [Patch bpf-next v2 3/5] bpf: compute data_end dynamically with JIT code

2021-02-12 Thread Cong Wang
On Fri, Feb 12, 2021 at 2:56 AM Lorenz Bauer wrote: > > On Wed, 10 Feb 2021 at 02:22, Cong Wang wrote: > > > > From: Cong Wang > > > > Currently, we compute ->data_end with a compile-time constant > > offset of skb. But as Jakub pointed out, we can actually compute > > it in eBPF JIT code at run

Re: [Patch bpf-next v2 3/5] bpf: compute data_end dynamically with JIT code

2021-02-12 Thread Lorenz Bauer
On Wed, 10 Feb 2021 at 02:22, Cong Wang wrote: > > From: Cong Wang > > Currently, we compute ->data_end with a compile-time constant > offset of skb. But as Jakub pointed out, we can actually compute > it in eBPF JIT code at run-time, so that we can competely get > rid of ->data_end. This is simi

[Patch bpf-next v2 3/5] bpf: compute data_end dynamically with JIT code

2021-02-09 Thread Cong Wang
From: Cong Wang Currently, we compute ->data_end with a compile-time constant offset of skb. But as Jakub pointed out, we can actually compute it in eBPF JIT code at run-time, so that we can competely get rid of ->data_end. This is similar to skb_shinfo(skb) computation in bpf_convert_shinfo_acce