Re: [External] [Patch bpf 2/2] selftests/bpf: Add a BPF selftest for bpf_skb_change_tail()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 26, 2024 at 11:34:25PM -0800, John Fastabend wrote:
> Zijian Zhang wrote:
> > 
> > LGTM!
> > 
> > I think it will be better if the test could also cover the case you
> > indicated in the first patch, where skb_transport_offset is a negative
> > value.
> > 
> > Thanks,
> > Zijian
> > 
> 
> Hi Cong,
> 
> I agree it would be great to see the skb_transport_offset is
> negative pattern. Could we add it?

Hmm? It is already negative for sockmap, as I already mentioned in patch
1/1:

"skb_transport_offset() and skb_transport_offset() can be negative when
they are called after we pull the transport header, for example, when
we use eBPF sockmap (aka at the point of ->sk_data_ready())."

My test case uses skb verdict, which is one of the sockmap hooks.

Or I guess you mean positive? In that case, we would need hook different
locations, like TC. I can certainly add it, but once again, it would
make backporting this patchset even harder.

Thanks!




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux