Subject: Re: [PATCH net-next v11 14/14] xsc: add ndo_get_stats64

From: Simon Horman <[email-masked]>
Date: Fri, 6 Jun 2025 13:59:49 +0100

On Thu, Jun 05, 2025 at 08:49:30PM +0200, Geert Uytterhoeven wrote:
> On Thu, 5 Jun 2025 at 16:05, Andrew Lunn <[email-masked]> wrote:
> > On Thu, Jun 05, 2025 at 06:56:15AM -0700, Jakub Kicinski wrote:
> > > On Thu, 5 Jun 2025 15:39:54 +0200 Geert Uytterhoeven wrote:
> > > > On Thu, 5 Jun 2025 at 15:29, Jakub Kicinski <[email-masked]> wrote:
> > > > > On Thu, 5 Jun 2025 15:25:21 +0800 Xin Tian wrote:
> > > > > > Regarding u64_stats_sync.h helpers:
> > > > > > Since our driver exclusively runs on 64-bit platforms (ARM64 or x86_64)
> > > > > > where u64 accesses are atomic, is it still necessary to use these helpers?
> > > > >
> > > > > alright.
> > > >
> > > > [PATCH 1/14] indeed has:
> > > >
> > > >     depends on PCI
> > > >     depends on ARM64 || X86_64 || COMPILE_TEST
> > > >
> > > > However, if this device is available on a PCIe expansion card, it
> > > > could be plugged into any system with a PCIe expansion slot?
> > >
> > > I've been trying to fight this fight but people keep pushing back :(
> > > Barely any new PCIe driver comes up without depending on X86_64 and/or
> > > ARM64. Maybe we should write down in the docs that it's okay to depend
> > > on 64b but not okay to depend on specific arches?
> >
> > I agree. I expect in a few years time we will start seeing patches to
> > drivers like this adding RISCV, because RISCV has made it into data
> > center CPUs, where this sort of card makes sense. Its the fact it is
> > 64bit which counts here, not ARM or X86_64.
> 
> And perhaps little-endian? ;-)

Yes. My experience is that looking at Sparse warnings can yield many
delights that are lurking. Many well aged by now.

...