Subject: Re: [PATCH net-next] memory-provider: fix compilation issue without SYSFS

From: Jakub Kicinski <[email-masked]>
Date: Thu, 12 Sep 2024 20:10:34 -0700

On Thu, 12 Sep 2024 11:21:23 -0700 Mina Almasry wrote:
> > I briefly looked at taking this path when I saw what this helper was
> > doing, but then I saw all operations related to the received queues were
> > enabled only when CONFIG_SYSFS is set, see commit a953be53ce40
> > ("net-sysfs: add support for device-specific rx queue sysfs
> > attributes"). I understood from that it is better not to look at
> > dev->_rx or dev->num_rx_queues when CONFIG_SYSFS is not set. I'm not
> > very familiar to that part of the code, but it feels like removing this
> > #ifdef might be similar to the "return 0" I suggested: silently
> > disabling the check, no?
> >
> > I *think* it might be clearer to return an error when SYSFS is not set.
> >  
> 
> FWIW it looks like commit e817f85652c1 ("xdp: generic XDP handling of
> xdp_rxq_info") reverted almost all the CONFIG_SYSFS checks set by
> commit a953be53ce40 ("net-sysfs: add support for device-specific rx
> queue sysfs attributes"), at least from a quick look.

That's right, just delete the ifdef. I should have done that when
I moved the helper. Please send the fix ASAP.