From: Andrew Lunn <andrew@lunn.ch>
To: "shenjian (K)" <shenjian15@huawei.com>
Cc: davem@davemloft.net, kuba@kernel.org, ecree.xilinx@gmail.com,
hkallweit1@gmail.com, alexandr.lobakin@intel.com,
saeed@kernel.org, netdev@vger.kernel.org, linuxarm@openeuler.org
Subject: Re: [RFCv3 PATCH net-next] net: extend netdev_features_t
Date: Mon, 1 Nov 2021 13:32:09 +0100 [thread overview]
Message-ID: <YX/eScgmGwDyalhA@lunn.ch> (raw)
In-Reply-To: <0c45431b-ad76-87c6-c498-f19584ae6840@huawei.com>
> > > static int hns3_alloc_buffer(struct hns3_enet_ring *ring,
> > > diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
> > > index 16f778887e14..9b3ab11e19c8 100644
> > > --- a/include/linux/netdev_features.h
> > > +++ b/include/linux/netdev_features.h
> > > @@ -101,12 +101,12 @@ enum {
> > > typedef struct {
> > > DECLARE_BITMAP(bits, NETDEV_FEATURE_COUNT);
> > > -} netdev_features_t;
> > > +} netdev_features_t;
> > That hunk looks odd.
> Yes, but it can be return directly, so we don't have to change
> the prototype of functions which return netdev_features_t,
> like ndo_features_check.
>
> > > -static inline void netdev_feature_zero(netdev_features_t *dst)
> > > +static inline void netdev_features_zero(netdev_features_t *dst)
> > > {
> > > bitmap_zero(dst->bits, NETDEV_FEATURE_COUNT);
> > > }
> > > -static inline void netdev_feature_fill(netdev_features_t *dst)
> > > +static inline void netdev_features_fill(netdev_features_t *dst)
> > > {
> > > bitmap_fill(dst->bits, NETDEV_FEATURE_COUNT);
> > > }
> > I'm wondering that the value here is? What do we gain by added the s.
> > These changes cause a lot of churn in the users of these functions.
> This function is used to expression like below:
>
> "lowerdev_features &= (features | ~NETIF_F_LRO);" in drivers/net/macvlan.c
O.K, now i know what is confusing me. This is not a patch on top of
clean net-next/master. It does not have netdev_features_t as a bitmap,
it does not have netdev_feature_fill().
You already have some other changes applied to your tree, and this
patch is on top of that?
I think we generally agree about the direction you are going. What we
probably want to see is a patchset against net-next/master which
converts the core and one driver to this new API. That allows us to
review the new API, which is the important thing here.
> I prefered to rename the netdev field active_features .
O.K.
Andrew
next prev parent reply other threads:[~2021-11-01 12:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 1:05 [RFCv3 PATCH net-next] net: extend netdev_features_t Jian Shen
2021-11-01 2:29 ` Andrew Lunn
2021-11-01 9:11 ` shenjian (K)
2021-11-01 12:32 ` Andrew Lunn [this message]
2021-11-01 13:27 ` 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=YX/eScgmGwDyalhA@lunn.ch \
--to=andrew@lunn.ch \
--cc=alexandr.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linuxarm@openeuler.org \
--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;
as well as URLs for NNTP newsgroup(s).