[Bridge] [PATCH net-next 9/9] net: Get rid of switchdev_port_attr_get()

Ido Schimmel idosch at mellanox.com
Thu Feb 14 12:10:06 UTC 2019


On Wed, Feb 13, 2019 at 02:06:38PM -0800, Florian Fainelli wrote:
> With the bridge no longer calling switchdev_port_attr_get() to obtain
> the supported bridge port flags from a driver but instead trying to set
> the bridge port flags directly and relying on driver to reject
> unsupported configurations, we can effectively get rid of
> switchdev_port_attr_get() entirely since this was the only place where
> it was called.
> 
> Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
> ---
>  Documentation/networking/switchdev.txt                   | 5 ++---
>  drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 7 -------
>  drivers/net/ethernet/rocker/rocker_main.c                | 7 -------
>  drivers/staging/fsl-dpaa2/ethsw/ethsw.c                  | 7 -------
>  include/net/switchdev.h                                  | 8 --------
>  net/dsa/slave.c                                          | 7 -------
>  6 files changed, 2 insertions(+), 39 deletions(-)
> 
> diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
> index ea90243340a9..327afe754230 100644
> --- a/Documentation/networking/switchdev.txt
> +++ b/Documentation/networking/switchdev.txt
> @@ -233,9 +233,8 @@ the bridge's FDB.  It's possible, but not optimal, to enable learning on the
>  device port and on the bridge port, and disable learning_sync.
>  
>  To support learning and learning_sync port attributes, the driver implements
> -switchdev op switchdev_port_attr_get/set for
> -SWITCHDEV_ATTR_PORT_ID_BRIDGE_FLAGS. The driver should initialize the attributes
> -to the hardware defaults.
> +switchdev op switchdev_port_attr_set for SWITCHDEV_ATTR_PORT_ID_BRIDGE_FLAGS.
> +The driver should initialize the attributes to the hardware defaults.

Last sentence is not relevant anymore. learning_sync can also be dropped


More information about the Bridge mailing list