mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 03:59:40 +02:00
mlxsw: spectrum_switchdev: Move mlxsw_sp_bridge_vxlan_join()
Next patch will call __mlxsw_sp_bridge_vxlan_leave() from mlxsw_sp_bridge_vxlan_join() as part of error flow, move the function to be able to call the second one. Signed-off-by: Amit Cohen <amcohen@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Petr Machata <petrm@nvidia.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/64750a0965536530482318578bada30fac372b8a.1742224300.git.petrm@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
413e2c0699
commit
630e7e20d3
|
|
@ -2929,21 +2929,6 @@ void mlxsw_sp_port_bridge_leave(struct mlxsw_sp_port *mlxsw_sp_port,
|
|||
mlxsw_sp_bridge_port_put(mlxsw_sp->bridge, bridge_port);
|
||||
}
|
||||
|
||||
int mlxsw_sp_bridge_vxlan_join(struct mlxsw_sp *mlxsw_sp,
|
||||
const struct net_device *br_dev,
|
||||
const struct net_device *vxlan_dev, u16 vid,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlxsw_sp_bridge_device *bridge_device;
|
||||
|
||||
bridge_device = mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev);
|
||||
if (WARN_ON(!bridge_device))
|
||||
return -EINVAL;
|
||||
|
||||
return bridge_device->ops->vxlan_join(bridge_device, vxlan_dev, vid,
|
||||
extack);
|
||||
}
|
||||
|
||||
static void __mlxsw_sp_bridge_vxlan_leave(struct mlxsw_sp *mlxsw_sp,
|
||||
const struct net_device *vxlan_dev)
|
||||
{
|
||||
|
|
@ -2963,6 +2948,21 @@ static void __mlxsw_sp_bridge_vxlan_leave(struct mlxsw_sp *mlxsw_sp,
|
|||
mlxsw_sp_fid_put(fid);
|
||||
}
|
||||
|
||||
int mlxsw_sp_bridge_vxlan_join(struct mlxsw_sp *mlxsw_sp,
|
||||
const struct net_device *br_dev,
|
||||
const struct net_device *vxlan_dev, u16 vid,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
struct mlxsw_sp_bridge_device *bridge_device;
|
||||
|
||||
bridge_device = mlxsw_sp_bridge_device_find(mlxsw_sp->bridge, br_dev);
|
||||
if (WARN_ON(!bridge_device))
|
||||
return -EINVAL;
|
||||
|
||||
return bridge_device->ops->vxlan_join(bridge_device, vxlan_dev, vid,
|
||||
extack);
|
||||
}
|
||||
|
||||
void mlxsw_sp_bridge_vxlan_leave(struct mlxsw_sp *mlxsw_sp,
|
||||
const struct net_device *vxlan_dev)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user