"Port add is only supported in eswitch switchdev mode or SF ports are disabled.");
return -EOPNOTSUPP;
}
- devl_lock(devlink);
err = mlx5_sf_add(dev, table, new_attr, extack, new_port_index);
- devl_unlock(devlink);
mlx5_sf_table_put(table);
return err;
}
goto sf_err;
}
- devl_lock(devlink);
mlx5_esw_offloads_sf_vport_disable(esw, sf->hw_fn_id);
- devl_unlock(devlink);
mlx5_sf_id_erase(table, sf);
mutex_lock(&table->sf_state_lock);
if (!msg)
return -ENOMEM;
- mutex_lock(&devlink->lock);
+ lockdep_assert_held(&devlink->lock);
devlink_port = devlink_port_get_by_index(devlink, port_index);
if (!devlink_port) {
err = -ENODEV;
goto out;
err = genlmsg_reply(msg, info);
- mutex_unlock(&devlink->lock);
return err;
out:
- mutex_unlock(&devlink->lock);
nlmsg_free(msg);
return err;
}
.cmd = DEVLINK_CMD_PORT_NEW,
.doit = devlink_nl_cmd_port_new_doit,
.flags = GENL_ADMIN_PERM,
- .internal_flags = DEVLINK_NL_FLAG_NO_LOCK,
},
{
.cmd = DEVLINK_CMD_PORT_DEL,
.doit = devlink_nl_cmd_port_del_doit,
.flags = GENL_ADMIN_PERM,
- .internal_flags = DEVLINK_NL_FLAG_NO_LOCK,
},
{
.cmd = DEVLINK_CMD_LINECARD_GET,