On Sat, Jul 10, 2021 at 05:40:47PM +0800, Jian Shen wrote:
For the prototype of netdev_features_t is u64, and the number of netdevice feature bits is 64 now. So there is no space to introduce new feature bit.
The PHY subsystem had a similar problem a while back. supported and advertised link modes where represented as bits in a u64. We changed to a linux bitmap, with wrappers around it. Take a look at the linkmode_ API usage in drivers/net/phy, and some Ethernet drivers.
It is going to be a big change, but i think you need to do something similar here. Add a netdev_feature_ API for manipulating features, convert all users to this API, and then change the implementation of the API to allow more bits.
You will want to make use of code re-writing tools to do most of the work.
Andrew