Thread (9 messages) flat view 9 messages, 5 authors, 2021-07-12

Re: [RFC net-next] net: extend netdev features

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-07-10 15:11:31

On Sat, 10 Jul 2021 17:40:47 +0800
Jian Shen [off-list ref] 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.

I did a small change for this. Keep the prototype of
netdev_feature_t, and extend the feature members in struct
net_device to an array of netdev_features_t. So more features
bits can be used.

As this change, some functions which use netdev_features_t as
parameter or returen value will be affected.
I did below changes:
a. parameter: "netdev_features_t" to "netdev_features_t *"
b. return value: "netdev_feature_t" to "void", and add
"netdev_feature_t *" as output parameter.

I kept some functions no change, which are surely useing the
first 64 bit of net device features now, such as function
nedev_add_tso_features(). In order to minimize to changes.

For the features are array now, so it's unable to do logical
operation directly. I introduce a inline function set for
them, including "netdev_features_and/andnot/or/xor/equal/empty".

For NETDEV_FEATURE_COUNT may be more than 64, so the shift
operation for NETDEV_FEATURE_COUNT is illegal. I changed some
macroes and functions, which does shift opertion with it.

I haven't finished all the changes, for it affected all the
drivers which use the feature, need more time and test. I
sent this RFC patch, want to know whether this change is
acceptable, and how to improve it.

Any comments will be helpful.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Infrastructure changes must be done as part of the patch that
needs the new feature bit. It might be that your feature bit is
not accepted as part of the review cycle, or a better alternative
is proposed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help