public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn•ch>
To: Jian Shen <shenjian15@huawei•com>
Cc: davem@davemloft•net, kuba@kernel•org, netdev@vger•kernel.org,
	linuxarm@openeuler•org
Subject: Re: [RFC net-next] net: extend netdev features
Date: Sat, 10 Jul 2021 17:29:30 +0200	[thread overview]
Message-ID: <YOm82gTf/efnR7Fj@lunn.ch> (raw)
In-Reply-To: <1625910047-56840-1-git-send-email-shenjian15@huawei.com>

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

  parent reply	other threads:[~2021-07-10 15:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10  9:40 [RFC net-next] net: extend netdev features Jian Shen
2021-07-10 15:11 ` Stephen Hemminger
2021-07-10 15:16   ` Andrew Lunn
2021-07-10 15:35     ` Dave Taht
2021-07-10 20:32       ` Stephen Hemminger
2021-07-12  2:43   ` shenjian (K)
2021-07-10 15:29 ` Andrew Lunn [this message]
     [not found]   ` <2b6bc8a7-6fe3-b42e-070d-f9a81560ecda@huawei.com>
2021-07-13 13:53     ` Andrew Lunn
2021-07-15  6:34       ` shenjian (K)
2021-07-10 19:05 ` Heiner Kallweit
2021-07-12  3:41   ` shenjian (K)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YOm82gTf/efnR7Fj@lunn.ch \
    --to=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=kuba@kernel$(echo .)org \
    --cc=linuxarm@openeuler$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shenjian15@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox