On 7/19/2020 9:04 AM, Andrew Lunn wrote: >> If we have the core network stack reference DSA as a module then we >> force DSA to be either built-in or not, which is not very practical, >> people would still want a modular choice to be possible. The static >> inline only wraps indirect function pointer calls using definitions >> available at build time and actual function pointer substitution at run >> time, so we avoid that problem entirely that way. > > Hi Florian > > The jumping through the pointer avoids the inbuilt vs module problems. > > The helpers themselves could be in a net/core/*.c file, rather than > static inline in a header. Is it worth adding a net/core/dsa.c for > code which must always be built in? At the moment, probably not. But > if we have more such redirect, maybe it would be? I would continue to put what is DSA specific in net/dsa.h an not introduce new files within net/core/ that we could easily miss while updating DSA or we would need to update the MAINTAINERS file for etc. -- Florian
- [PATCH net-next 4/4] net: dsa: Setup dsa_netdev_ops Florian Fainelli
- [PATCH net-next 1/4] net: Wrap ndo_do_ioctl() to prepare... Florian Fainelli
- Re: [PATCH net-next 1/4] net: Wrap ndo_do_ioctl() t... Vladimir Oltean
- Re: [PATCH net-next 1/4] net: Wrap ndo_do_ioctl... Florian Fainelli
- Re: [PATCH net-next 1/4] net: Wrap ndo_do_i... Vladimir Oltean
- Re: [PATCH net-next 1/4] net: Wrap ndo_do_ioctl() t... Andrew Lunn
- [PATCH net-next 3/4] net: Call into DSA netdevice_ops wr... Florian Fainelli
- Re: [PATCH net-next 3/4] net: Call into DSA netdevi... Vladimir Oltean
- Re: [PATCH net-next 3/4] net: Call into DSA net... Florian Fainelli
- Re: [PATCH net-next 3/4] net: Call into DSA... Andrew Lunn
- Re: [PATCH net-next 3/4] net: Call into... Florian Fainelli
- [PATCH net-next 2/4] net: dsa: Add wrappers for overload... Florian Fainelli
- Re: [PATCH net-next 2/4] net: dsa: Add wrappers for... kernel test robot
- Re: [PATCH net-next 2/4] net: dsa: Add wrappers... Florian Fainelli
- Re: [PATCH net-next 2/4] net: dsa: Add wrap... Vladimir Oltean
- Re: [PATCH net-next 2/4] net: dsa: Add ... Florian Fainelli
- Re: [PATCH net-next 2/4] net: dsa: Add wrappers for... Andrew Lunn
- Re: [PATCH net-next 2/4] net: dsa: Add wrappers... Florian Fainelli