[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190402205437.GF22349@lunn.ch>
Date: Tue, 2 Apr 2019 22:54:37 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vladimir Oltean <olteanv@...il.com>
Cc: f.fainelli@...il.com, vivien.didelot@...il.com,
davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linus.walleij@...aro.org,
georg.waibel@...sor-technik.de
Subject: Re: [PATCH net-next 05/17] net: dsa: Add more convenient functions
for installing port VLANs
On Sun, Mar 31, 2019 at 08:42:20PM +0300, Vladimir Oltean wrote:
> This hides the need to perform a two-phase transaction and construct a
> switchdev_obj_port_vlan struct.
>
> Call graph (including a function that will be introduced in a follow-up
> patch) looks like this now (same for the *_vlan_del function):
>
> dsa_slave_vlan_rx_add_vid dsa_port_setup_8021q_tagging
> | |
> | |
> | +-------------+
> | |
> v v
> __dsa_port_vlan_add dsa_slave_port_obj_add
> | |
> +-------+ +-------+
> | |
> v v
> dsa_port_vlan_add
>
> Signed-off-by: Vladimir Oltean <olteanv@...il.com>
> ---
> net/dsa/dsa_priv.h | 2 ++
> net/dsa/port.c | 31 +++++++++++++++++++++++++++++++
> net/dsa/slave.c | 16 ++--------------
> 3 files changed, 35 insertions(+), 14 deletions(-)
>
> diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
> index 093b7d145eb1..766d015f6f38 100644
> --- a/net/dsa/dsa_priv.h
> +++ b/net/dsa/dsa_priv.h
> @@ -169,6 +169,8 @@ int dsa_port_vlan_add(struct dsa_port *dp,
> struct switchdev_trans *trans);
> int dsa_port_vlan_del(struct dsa_port *dp,
> const struct switchdev_obj_port_vlan *vlan);
> +int __dsa_port_vlan_add(struct dsa_port *dp, u16 vid, u16 flags);
> +int __dsa_port_vlan_del(struct dsa_port *dp, u16 vid);
> int dsa_port_link_register_of(struct dsa_port *dp);
> void dsa_port_link_unregister_of(struct dsa_port *dp);
>
> diff --git a/net/dsa/port.c b/net/dsa/port.c
> index a86fe3be1261..10065a622ada 100644
> --- a/net/dsa/port.c
> +++ b/net/dsa/port.c
> @@ -326,6 +326,37 @@ int dsa_port_vlan_del(struct dsa_port *dp,
> return 0;
> }
>
> +int __dsa_port_vlan_add(struct dsa_port *dp, u16 vid, u16 flags)
> +{
Hi Vladimir
Maybe call this dsa_port_vlan_add_trans()?
I don't like the __, especially when the symbol is not static.
Andrew
Powered by blists - more mailing lists