Netdev List
 help / color / mirror / Atom feed
From: Alexander Lobakin <alexandr.lobakin@intel.com>
To: "shenjian (K)" <shenjian15@huawei.com>
Cc: Alexander Lobakin <alexandr.lobakin@intel.com>,
	davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch,
	ecree.xilinx@gmail.com, hkallweit1@gmail.com, saeed@kernel.org,
	leon@kernel.org, netdev@vger.kernel.org, linuxarm@openeuler.org,
	lipeng321@huawei.com,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Subject: Re: [RFCv6 PATCH net-next 02/19] net: replace general features macroes with global netdev_features variables
Date: Thu, 21 Jul 2022 16:57:16 +0200	[thread overview]
Message-ID: <20220721145716.745433-1-alexandr.lobakin@intel.com> (raw)
In-Reply-To: <eb0625cd-26a4-439a-1aca-fcc773393b8b@huawei.com>

From: shenjian (K) <shenjian15@huawei.com>
Date: Thu, 21 Jul 2022 09:15:59 +0800

> 在 2022/7/20 23:09, Alexander Lobakin 写道:
> > From: shenjian (K) <shenjian15@huawei.com>
> > Date: Wed, 20 Apr 2022 17:54:13 +0800
> >
> >> 在 2022/4/19 22:49, Alexander Lobakin 写道:
> >> > From: Jian Shen <shenjian15@huawei.com>
> >> > Date: Tue, 19 Apr 2022 10:21:49 +0800
> >> >
> >> >> There are many netdev_features bits group used in kernel. The 
> >> definition
> >> >> will be illegal when using feature bit more than 64. Replace these 
> >> macroes
> >> >> with global netdev_features variables, initialize them when netdev 
> >> module
> >> >> init.
> >> >>
> >> >> Signed-off-by: Jian Shen <shenjian15@huawei.com>
> >> >> ---
> >> >>   drivers/net/wireguard/device.c  |  10 +-
> >> >>   include/linux/netdev_features.h | 102 +++++++++-----
> >> >>   net/core/Makefile               |   2 +-
> >> >>   net/core/dev.c                  |  87 ++++++++++++
> >> >>   net/core/netdev_features.c      | 241 
> >> ++++++++++++++++++++++++++++++++
> >> >>   5 files changed, 400 insertions(+), 42 deletions(-)
> >> >>   create mode 100644 net/core/netdev_features.c
> >> >>
> >> > --- 8< ---
> >> >
> >> >> diff --git a/net/core/dev.c b/net/core/dev.c
> >> >> index 4d6b57752eee..85bb418e8ef1 100644
> >> >> --- a/net/core/dev.c
> >> >> +++ b/net/core/dev.c
> >> >> @@ -146,6 +146,7 @@
> >> >>   #include <linux/sctp.h>
> >> >>   #include <net/udp_tunnel.h>
> >> >>   #include <linux/net_namespace.h>
> >> >> +#include <linux/netdev_features_helper.h>
> >> >>   #include <linux/indirect_call_wrapper.h>
> >> >>   #include <net/devlink.h>
> >> >>   #include <linux/pm_runtime.h>
> >> >> @@ -11255,6 +11256,90 @@ static struct pernet_operations 
> >> __net_initdata default_device_ops = {
> >> >>       .exit_batch = default_device_exit_batch,
> >> >>   };
> >> >>   >> +static void netdev_features_init(void)
> >> > It is an initialization function, so it must be marked as __init.
> >> right, I will add it, thanks!
> >>
> >> >> +{
> >> >> +    netdev_features_t features;
> >> >> +
> >> >> + netdev_features_set_array(&netif_f_never_change_feature_set,
> >> >> +                  &netdev_never_change_features);
> >> >> +
> >> >> + netdev_features_set_array(&netif_f_gso_feature_set_mask,
> >> > I'm not sure it does make sense to have an empty newline between
> >> > each call. I'd leave newlines only between the "regular" blocks
> >> > and the "multi-call" blocks, I mean, stuff like VLAN, GSO and
> >> > @netdev_ethtool_features.
> >> At first, I added empty newline per call for the it used three lines.
> >> Now the new call just use two lines, I will remove some unnecessary
> >> blank lines.
> >>
> >> Thanks!
> >
> > I see no news regarding the conversion since the end of April, maybe
> > I could pick it and finish if nobody objects? I'll preserve the
> > original authorship for sure.
> >
> Hi, Alexander
> 
> Sorry for late to finish the whole patchset with treewide changes, but 
> I'm still working on it.
> And most of the convertsions have been completed. I will send to new 
> patchset in two weeks.

Oh okay, I was only worried that it could be abandoned for some
reason. Great to hear it's almost done, 120+ drivers is not
something quick or exciting :)
I'll start reviewing the series, at least its "core" part, as soon
as it hits netdev ML. Thanks!

> 
> Jian
> 
> >>
> >> >> +                  &netdev_gso_features_mask);

[...]

> > Thanks,
> > Olek
> >
> > .
> >
> 

Olek

  reply	other threads:[~2022-07-21 14:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19  2:21 [RFCv6 PATCH net-next 00/19] net: extend the type of netdev_features_t to bitmap Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 01/19] net: introduce operation helpers for netdev features Jian Shen
2022-04-19 14:40   ` Alexander Lobakin
2022-04-20  9:24     ` shenjian (K)
2022-04-19  2:21 ` [RFCv6 PATCH net-next 02/19] net: replace general features macroes with global netdev_features variables Jian Shen
2022-04-19 14:49   ` Alexander Lobakin
2022-04-20  9:54     ` shenjian (K)
2022-07-20 15:09       ` Alexander Lobakin
2022-07-21  1:15         ` shenjian (K)
2022-07-21 14:57           ` Alexander Lobakin [this message]
2022-07-21 15:21             ` shenjian (K)
2022-07-20 15:10       ` Alexander Lobakin
2022-07-20 15:13       ` Alexander Lobakin
2022-04-19  2:21 ` [RFCv6 PATCH net-next 03/19] net: replace multiple feature bits with netdev features array Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 04/19] net: sfc: replace const features initialization " Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 05/19] net: simplify the netdev features expression Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 06/19] net: adjust variables definition for netdev_features_t Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 07/19] net: use netdev_feature_add helpers Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 08/19] net: use netdev_features_or helpers Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 09/19] net: use netdev_features_xor helpers Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 10/19] net: use netdev_feature_del helpers Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 11/19] net: use netdev_features_andnot helpers Jian Shen
2022-04-19  2:21 ` [RFCv6 PATCH net-next 12/19] net: use netdev_feature_test helpers Jian Shen
2022-04-19  2:22 ` [RFCv6 PATCH net-next 13/19] net: use netdev_features_intersects helpers Jian Shen
2022-04-19  2:22 ` [RFCv6 PATCH net-next 14/19] net: use netdev_features_and helpers Jian Shen
2022-04-19  2:22 ` [RFCv6 PATCH net-next 15/19] net: use netdev_features_subset helpers Jian Shen
2022-04-19  2:22 ` [RFCv6 PATCH net-next 16/19] net: use netdev_features_equal helpers Jian Shen
2022-04-19  2:22 ` [RFCv6 PATCH net-next 17/19] net: use netdev_features_copy helpers Jian Shen
2022-04-19  2:22 ` [RFCv6 PATCH net-next 18/19] net: use netdev_xxx_features helpers Jian Shen
2022-04-19  2:22 ` [RFCv6 PATCH net-next 19/19] net: redefine the prototype of netdev_features_t Jian Shen

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=20220721145716.745433-1-alexandr.lobakin@intel.com \
    --to=alexandr.lobakin@intel.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=lipeng321@huawei.com \
    --cc=maciej.fijalkowski@intel.com \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeed@kernel.org \
    --cc=shenjian15@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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