Subject: Re: [RFCv8 PATCH net-next 02/55] net: replace general features macroes with global netdev_features variables

From: Jakub Kicinski <[email-masked]>
Date: Wed, 21 Sep 2022 05:50:04 -0700

On Wed, 21 Sep 2022 18:01:16 +0800 shenjian (K) wrote:
> 在 2022/9/21 14:33, shenjian (K) 写道:
> >> On Sun, 18 Sep 2022 09:42:43 +0000 Jian Shen wrote:  
> >> We shouldn't be changing all these defines here, because that breaks
> >> the build AFAIU.  
> > ok, will keep them until remove the __NETIF_F(name) macro.
> >  
> But I don't see how it break build. Do you mean the definition of
> 
> WG_NETDEV_FEATURES in drivers/net/wireguard/device.c ？

Oops, you're right, looks like this patch just adds a warning:

net/core/netdev_features.c:99:13: warning: no previous prototype for function 'netdev_features_init' [-Wmissing-prototypes]
void __init netdev_features_init(void)

Build is broken by the next one:

drivers/net/ethernet/microsoft/mana/mana_en.c:2084:2: error: implicit declaration of function 'netdev_hw_features_zero' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        netdev_hw_features_zero(ndev);
        ^
drivers/net/ethernet/microsoft/mana/mana_en.c:2085:2: error: implicit declaration of function 'netdev_hw_features_set_set' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        netdev_hw_features_set_set(ndev, NETIF_F_SG_BIT, NETIF_F_IP_CSUM_BIT,
        ^
drivers/net/ethernet/microsoft/mana/mana_en.c:2085:2: note: did you mean 'netdev_hw_features_zero'?
drivers/net/ethernet/microsoft/mana/mana_en.c:2084:2: note: 'netdev_hw_features_zero' declared here
        netdev_hw_features_zero(ndev);
        ^