mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 05:43:28 -04:00
mlxsw: Add extack to mlxsw_sp_nve_ops.fdb_replay
A follow-up patch will extend vxlan_fdb_replay() with an extack argument. Extend the fdb_replay callback in mlxsw likewise so that the argument is ready for the vxlan conversion. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
87b0984ebf
commit
d907f58fa9
@@ -841,7 +841,7 @@ int mlxsw_sp_nve_fid_enable(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_fid *fid,
|
||||
|
||||
nve->config = config;
|
||||
|
||||
err = ops->fdb_replay(params->dev, params->vni);
|
||||
err = ops->fdb_replay(params->dev, params->vni, extack);
|
||||
if (err) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "Failed to offload the FDB");
|
||||
goto err_fdb_replay;
|
||||
|
||||
@@ -41,7 +41,8 @@ struct mlxsw_sp_nve_ops {
|
||||
int (*init)(struct mlxsw_sp_nve *nve,
|
||||
const struct mlxsw_sp_nve_config *config);
|
||||
void (*fini)(struct mlxsw_sp_nve *nve);
|
||||
int (*fdb_replay)(const struct net_device *nve_dev, __be32 vni);
|
||||
int (*fdb_replay)(const struct net_device *nve_dev, __be32 vni,
|
||||
struct netlink_ext_ack *extack);
|
||||
void (*fdb_clear_offload)(const struct net_device *nve_dev, __be32 vni);
|
||||
};
|
||||
|
||||
|
||||
@@ -212,7 +212,8 @@ static void mlxsw_sp1_nve_vxlan_fini(struct mlxsw_sp_nve *nve)
|
||||
}
|
||||
|
||||
static int
|
||||
mlxsw_sp_nve_vxlan_fdb_replay(const struct net_device *nve_dev, __be32 vni)
|
||||
mlxsw_sp_nve_vxlan_fdb_replay(const struct net_device *nve_dev, __be32 vni,
|
||||
struct netlink_ext_ack *extack)
|
||||
{
|
||||
if (WARN_ON(!netif_is_vxlan(nve_dev)))
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user