From: Florian Fainelli <f.fainelli@gmail.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
netdev@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: dsa: Allow compiling out legacy support
Date: Fri, 1 Dec 2017 16:00:00 -0800 [thread overview]
Message-ID: <86660f52-e711-beb4-33d2-0ea38db5a4fc@gmail.com> (raw)
In-Reply-To: <87bmjizd61.fsf@weeman.i-did-not-set--mail-host-address--so-tickle-me>
On 12/01/2017 07:21 AM, Vivien Didelot wrote:
> Hi Florian,
>
> Florian Fainelli <f.fainelli@gmail.com> writes:
>
>> +#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
>> /* Legacy driver registration */
>> void register_switch_driver(struct dsa_switch_driver *type);
>> void unregister_switch_driver(struct dsa_switch_driver *type);
>> struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev);
>>
>> +#else
>> +static inline void register_switch_driver(struct dsa_switch_driver *type) { }
>> +static inline void unregister_switch_driver(struct dsa_switch_driver *type) { }
>> +static inline struct mii_bus *dsa_host_dev_to_mii_bus(struct device *dev)
>> +{
>> + return NULL;
>> +}
>> +#endif
>
> The .probe dsa_switch_ops is part of the legacy code, we may want to
> wrap it in a CONFIG_NET_DSA_LEGACY check as well.
Fixed, also made 88e6060 dependent on CONFIG_NET_DSA_LEGACY as a result.
>
>> struct net_device *dsa_dev_to_net_device(struct device *dev);
>>
>> /* Keep inline for faster access in hot path */
>> diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
>> index 03c3bdf25468..b6ec8e9069e4 100644
>> --- a/net/dsa/Kconfig
>> +++ b/net/dsa/Kconfig
>> @@ -16,6 +16,14 @@ config NET_DSA
>>
>> if NET_DSA
>>
>> +config NET_DSA_LEGACY
>
> We need to have it enabled by default, otherwise we'll miss errors when
> touching the code shared by both legacy and new bindings.
Fixed.
>
>> + bool "Support for older platform device and Device Tree registration"
>> + ---help---
>> + Say Y if you want to enable support for the older platform device and
>> + deprectaed Device Tree binding registration.
>
> deprecated*
>
>> +
>> + This feature is scheduled for removal in 4.17.
>> +
>> /* legacy.c */
>> +#if IS_ENABLED(CONFIG_NET_DSA_LEGACY)
>> int dsa_legacy_register(void);
>> void dsa_legacy_unregister(void);
>> int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
>> @@ -106,6 +107,28 @@ int dsa_legacy_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
>> int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
>> struct net_device *dev,
>> const unsigned char *addr, u16 vid);
>
> the dsa_legacy_fdb_{add,del} routines are "legacy" in terms of FDB
> handling, not in terms of DSA bindings, we must keep them.
Oh, right. This should probably be moved somewhere else then, right? The
whole idea was to compile out net/dsa/legacy.c
--
Florian
prev parent reply other threads:[~2017-12-02 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 23:58 [PATCH net-next] net: dsa: Allow compiling out legacy support Florian Fainelli
2017-12-01 15:21 ` Vivien Didelot
2017-12-02 0:00 ` Florian Fainelli [this message]
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=86660f52-e711-beb4-33d2-0ea38db5a4fc@gmail.com \
--to=f.fainelli@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.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).