On Mon, 14 Jul 2025 21:39:30 -0700 Christoph Hellwig wrote:
quoted
LGTM, but we need a better place for this function. netdevice.h is
included directly by 1.5k files, and indirectly by probably another 5k.
It's not a great place to put random helpers with 2 callers.
Maybe net/netdev_rx_queue.h and net/core/netdev_rx_queue.c?
I don't think it needs to be a static inline either.
The whole concept is also buggy. Trying to get a dma-able device by
walking down from an upper level construct like the netdevice can't work
reliably. You'll need to explicitly provide the dma_device using either
a method or a pointer to it instead of this guesswork.
Yeah, I'm pretty sure we'll end up with a method in queue ops.
But it's not that deep, an easy thing to change.