[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YOm82gTf/efnR7Fj@lunn.ch>
Date: Sat, 10 Jul 2021 17:29:30 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jian Shen <shenjian15@...wei.com>
Cc: davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
linuxarm@...neuler.org
Subject: Re: [RFC net-next] net: extend netdev features
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
Powered by blists - more mailing lists