Re: csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Al Viro
On Fri, Nov 13, 2020 at 03:32:22PM +0100, Daniel Borkmann wrote: > > And I would strongly recommend to change the calling conventions of that > > thing - make it return __sum16. And take __sum16 as well... > > > > Again, exposing __wsum to anything that looks like a stable ABI is > > a mistake -

Re: csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Daniel Borkmann
On 11/13/20 3:15 PM, Al Viro wrote: On Fri, Nov 13, 2020 at 02:22:16PM +0100, Björn Töpel wrote: Folding Al's input to this reply. I think the bpf_csum_diff() is supposed to be used in combination with another helper(s) (e.g. bpf_l4_csum_replace) so I'd guess the returned __wsum should be seen

Re: csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Al Viro
On Fri, Nov 13, 2020 at 02:22:16PM +0100, Björn Töpel wrote: > Folding Al's input to this reply. > > I think the bpf_csum_diff() is supposed to be used in combination with > another helper(s) (e.g. bpf_l4_csum_replace) so I'd guess the returned > __wsum should be seen as an opaque value, not some

Re: csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Björn Töpel
On Fri, 13 Nov 2020 at 13:25, Jean-Philippe Brucker wrote: > > Hi, > > On Fri, Nov 13, 2020 at 11:36:08AM +0100, Björn Töpel wrote: > > I was running the selftest/bpf on riscv, and had a closer look at one > > of the failing cases: > > > > #14/p valid read map access into a read-only array 2 FAI

Re: csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Björn Töpel
On Fri, 13 Nov 2020 at 12:34, Eric Dumazet wrote: > > > > On 11/13/20 11:36 AM, Björn Töpel wrote: > > I was running the selftest/bpf on riscv, and had a closer look at one > > of the failing cases: > > > > #14/p valid read map access into a read-only array 2 FAIL retval > > 65507 != -29 (run 1/

Re: csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Al Viro
On Fri, Nov 13, 2020 at 11:36:08AM +0100, Björn Töpel wrote: > I was running the selftest/bpf on riscv, and had a closer look at one > of the failing cases: > > #14/p valid read map access into a read-only array 2 FAIL retval > 65507 != -29 (run 1/1) > > The test does a csum_partial() call via

Re: csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Jean-Philippe Brucker
Hi, On Fri, Nov 13, 2020 at 11:36:08AM +0100, Björn Töpel wrote: > I was running the selftest/bpf on riscv, and had a closer look at one > of the failing cases: > > #14/p valid read map access into a read-only array 2 FAIL retval > 65507 != -29 (run 1/1) > > The test does a csum_partial() call

Re: csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Eric Dumazet
On 11/13/20 11:36 AM, Björn Töpel wrote: > I was running the selftest/bpf on riscv, and had a closer look at one > of the failing cases: > > #14/p valid read map access into a read-only array 2 FAIL retval > 65507 != -29 (run 1/1) > > The test does a csum_partial() call via a BPF helper. ris

csum_partial() on different archs (selftest/bpf)

2020-11-13 Thread Björn Töpel
I was running the selftest/bpf on riscv, and had a closer look at one of the failing cases: #14/p valid read map access into a read-only array 2 FAIL retval 65507 != -29 (run 1/1) The test does a csum_partial() call via a BPF helper. riscv uses the generic implementation. arm64 uses the generic