Remove getting SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS
Subsystems (6)
cover Remove getting SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS
Hi all,
AFAICT there is no code that attempts to get the value of the attribute SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS while it is used with switchdev_port_attr_set().
This is effectively no doing anything and it can slow down future work that tries to make modifications in these areas so remove that.
David, there should be no dependency with previous patch series, but again, feedback from Ido and Jiri would be welcome in case this was added for a reason.
Thanks!
Florian Fainelli (3):
mlxsw: spectrum_switchdev: Remove getting PORT_BRIDGE_FLAGS
rocker: Remove getting PORT_BRIDGE_FLAGS
staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS
.../mellanox/mlxsw/spectrum_switchdev.c | 17 ----------------- drivers/net/ethernet/rocker/rocker.h | 2 -- drivers/net/ethernet/rocker/rocker_main.c | 15 --------------- drivers/net/ethernet/rocker/rocker_ofdpa.c | 10 ---------- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 ----- 5 files changed, 49 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/3 mlxsw: spectrum_switchdev: Remove getting PORT_BRIDGE_FLAGS
There is no code that will query the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute remove support for that.
--- .../mellanox/mlxsw/spectrum_switchdev.c | 17 ----------------- 1 file changed, 17 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c +0 -17
@@ -431,19 +431,6 @@ static void mlxsw_sp_bridge_vlan_put(struct mlxsw_sp_bridge_vlan *bridge_vlan)mlxsw_sp_bridge_vlan_destroy (bridge_vlan); } -static void mlxsw_sp_port_bridge_flags_get (struct mlxsw_sp_bridge *bridge, -struct net_device *dev, -unsigned long *brport_flags) -{ -struct mlxsw_sp_bridge_port *bridge_port; - - bridge_port =mlxsw_sp_bridge_port_find (bridge, dev); -if (WARN_ON (!bridge_port)) -return ; - -memcpy (brport_flags, &bridge_port->flags,sizeof (*brport_flags)); -} -static int mlxsw_sp_port_attr_get (struct net_device *dev,struct switchdev_attr *attr) {
@@ -451,10 +438,6 @@ static int mlxsw_sp_port_attr_get(struct net_device *dev,struct mlxsw_sp *mlxsw_sp = mlxsw_sp_port->mlxsw_sp;switch (attr->id) { -case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS : -mlxsw_sp_port_bridge_flags_get (mlxsw_sp->bridge, attr->orig_dev, - &attr->u.brport_flags); -break ;case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT : attr->u.brport_flags_support =BR_LEARNING |BR_FLOOD |BR_MCAST_FLOOD ;
Signature · 1 line
2.17.1
Re: [PATCH net-next 1/3] mlxsw: spectrum_switchdev: Remove getting PORT_BRIDGE_FLAGS
Quoted 4 lines · Mon, Feb 11, 2019 at 10:17:47PM CET, [email protected] wrote:
There is no code that will query the
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGSattribute remove support for that.Signed-off-by Florian Fainelli <[email protected]>
Re: [PATCH net-next 1/3] mlxsw: spectrum_switchdev: Remove getting PORT_BRIDGE_FLAGS
In reply to Florian FainelliQuoted 4 lines · Florian Fainelli
There is no code that will query the
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGSattribute remove support for that.Signed-off-by Florian Fainelli <[email protected]>
PATCH 2/3 rocker: Remove getting PORT_BRIDGE_FLAGS
In reply to Florian FainelliThere is no code that attempts to get the SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS attribute, remove support for that.
--- drivers/net/ethernet/rocker/rocker.h | 2 -- drivers/net/ethernet/rocker/rocker_main.c | 15 --------------- drivers/net/ethernet/rocker/rocker_ofdpa.c | 10 ---------- 3 files changed, 27 deletions(-)
drivers/net/ethernet/rocker/rocker.h +0 -2
@@ -109,8 +109,6 @@ struct rocker_world_ops {int (*port_attr_bridge_flags_set)(struct rocker_port *rocker_port,unsigned long brport_flags,struct switchdev_trans *trans); -int (*port_attr_bridge_flags_get)(const struct rocker_port *rocker_port, -unsigned long *p_brport_flags);int (*port_attr_bridge_flags_support_get)(const struct rocker_port * rocker_port, unsigned long *
drivers/net/ethernet/rocker/rocker_main.c +0 -15
@@ -1582,17 +1582,6 @@ rocker_world_port_attr_bridge_flags_set(struct rocker_port *rocker_port, trans); } -static int -rocker_world_port_attr_bridge_flags_get (const struct rocker_port *rocker_port, -unsigned long *p_brport_flags) -{ -struct rocker_world_ops *wops = rocker_port->rocker->wops; - -if (!wops->port_attr_bridge_flags_get) -return -EOPNOTSUPP ; -return wops->port_attr_bridge_flags_get (rocker_port, p_brport_flags); -} - static int rocker_world_port_attr_bridge_flags_support_get(const struct rocker_port * rocker_port,
@@ -2061,10 +2050,6 @@ static int rocker_port_attr_get(struct net_device *dev,int err =0 ;switch (attr->id) { -case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS : - err =rocker_world_port_attr_bridge_flags_get (rocker_port, - &attr->u.brport_flags); -break ;case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT : err =rocker_world_port_attr_bridge_flags_support_get (rocker_port, &attr->u.brport_flags_support);
drivers/net/ethernet/rocker/rocker_ofdpa.c +0 -10
@@ -2511,16 +2511,6 @@ static int ofdpa_port_attr_bridge_flags_set(struct rocker_port *rocker_port,return err; } -static int -ofdpa_port_attr_bridge_flags_get (const struct rocker_port *rocker_port, -unsigned long *p_brport_flags) -{ -const struct ofdpa_port *ofdpa_port = rocker_port->wpriv; - - *p_brport_flags = ofdpa_port->brport_flags; -return 0 ; -} - static int ofdpa_port_attr_bridge_flags_support_get(const struct rocker_port * rocker_port,
Signature · 1 line
2.17.1
Re: [PATCH net-next 2/3] rocker: Remove getting PORT_BRIDGE_FLAGS
Quoted 4 lines · Mon, Feb 11, 2019 at 10:17:48PM CET, [email protected] wrote:
There is no code that attempts to get the
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGSattribute, remove support for that.Signed-off-by Florian Fainelli <[email protected]>
PATCH 3/3 staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS
In reply to Florian FainelliThere is no code that tries to get the attribute SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, remove support for doing that.
--- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/staging/fsl-dpaa2/ethsw/ethsw.c +0 -5
@@ -646,11 +646,6 @@ static int swdev_port_attr_get(struct net_device *netdev,struct ethsw_port_priv *port_priv =netdev_priv (netdev);switch (attr->id) { -case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS : - attr->u.brport_flags = - (port_priv->ethsw_data->learning ?BR_LEARNING :0 ) | - (port_priv->flood ?BR_FLOOD :0 ); -break ;case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS_SUPPORT : attr->u.brport_flags_support =BR_LEARNING |BR_FLOOD ;break ;
Signature · 1 line
2.17.1
Re: [PATCH net-next 3/3] staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS
Quoted 7 lines · Florian Fainelli
There is no code that tries to get the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, remove support for doing that.Signed-off-by Florian Fainelli <[email protected]>--- drivers/staging/fsl-dpaa2/ethsw/ethsw.c | 5 ----- 1 file changed, 5 deletions(-)
Re: [PATCH net-next 3/3] staging: fsl-dpaa2: ethsw: Remove getting PORT_BRIDGE_FLAGS
In reply to Florian FainelliQuoted 4 lines · Mon, Feb 11, 2019 at 10:17:49PM CET, [email protected] wrote:
There is no code that tries to get the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS, remove support for doing that.Signed-off-by Florian Fainelli <[email protected]>
Jiri Pirko
maintainerQuoted 6 lines · Mon, Feb 11, 2019 at 10:17:46PM CET, [email protected] wrote:
Hi all,
AFAICT there is no code that attempts to get the value of the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGSwhile it is used withswitchdev_port_attr_set().
Quoted 6 lines
This is effectively no doing anything and it can slow down future work that tries to make modifications in these areas so remove that.
David, there should be no dependency with previous patch series, but again, feedback from Ido and Jiri would be welcome in case this was added for a reason.
It was originally used by:switchdev_port_bridge_getlink()
removed by:
commit 29ab586c3d83f81c435e269cace9a1619afb5bbd
Author: Arkadi Sharshevsky <[email protected]> Date: Sun Aug 6 16:15:51 2017 +0300
net: switchdev: Remove bridge bypass support from switchdev
So these are just leftovers. Let's flush them.
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Mon, 11 Feb 2019 13:17:46 -0800
Quoted 6 lines
AFAICT there is no code that attempts to get the value of the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGSwhile it is used withswitchdev_port_attr_set().This is effectively no doing anything and it can slow down future work that tries to make modifications in these areas so remove that.
Series applied.
Quoted 3 lines
David, there should be no dependency with previous patch series, but again, feedback from Ido and Jiri would be welcome in case this was added for a reason.
Ok, is there going to be another respin of that switchdev_ops removal series?
Quoted 10 lines · David Miller
From: Florian Fainelli <[email protected]>
Date: Mon, 11 Feb 2019 13:17:46 -0800Quoted 6 lines
AFAICT there is no code that attempts to get the value of the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGSwhile it is used withswitchdev_port_attr_set().This is effectively no doing anything and it can slow down future work that tries to make modifications in these areas so remove that.
Quoted 8 lines
Series applied.
Quoted 3 lines
David, there should be no dependency with previous patch series, but again, feedback from Ido and Jiri would be welcome in case this was added for a reason.
Ok, is there going to be another respin of that
switchdev_opsremoval series?
Yes, I will be working on a v5 which addresses Ido's feedback in the next hours.
Signature · 1 line
Florian
Quoted 17 lines · Florian Fainelli
Quoted 16 lines · David Miller
From: Florian Fainelli <[email protected]>
Date: Mon, 11 Feb 2019 13:17:46 -0800Quoted 6 lines
AFAICT there is no code that attempts to get the value of the attribute
SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGSwhile it is used withswitchdev_port_attr_set().This is effectively no doing anything and it can slow down future work that tries to make modifications in these areas so remove that.
Series applied.
Quoted 3 lines
David, there should be no dependency with previous patch series, but again, feedback from Ido and Jiri would be welcome in case this was added for a reason.
Quoted 5 lines
Quoted 2 lines
Ok, is there going to be another respin of that
switchdev_opsremoval series?Yes, I will be working on a v5 which addresses Ido's feedback in the next hours.
David, looks like I managed to introduce a build failure with rocker_ofdpa.c, sorry about that, I will send a follow-up immediately.
Signature · 1 line
Florian