Date: Thu, 16 May 2019 17:29:05 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r347819 - stable/11/sys/dev/mlx5/mlx5_core Message-ID: <201905161729.x4GHT5Kc005304@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu May 16 17:29:04 2019 New Revision: 347819 URL: https://svnweb.freebsd.org/changeset/base/347819 Log: MFC r347269: Add sysctl(8) to control fast unload support in mlx5core. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu May 16 17:28:30 2019 (r347818) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c Thu May 16 17:29:04 2019 (r347819) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013-2017, Mellanox Technologies, Ltd. All rights reserved. + * Copyright (c) 2013-2019, Mellanox Technologies, Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -68,6 +68,11 @@ MODULE_PARM_DESC(prof_sel, "profile selector. Valid ra SYSCTL_NODE(_hw, OID_AUTO, mlx5, CTLFLAG_RW, 0, "mlx5 HW controls"); +static int mlx5_fast_unload_enabled = 1; +SYSCTL_INT(_hw_mlx5, OID_AUTO, fast_unload_enabled, CTLFLAG_RWTUN, + &mlx5_fast_unload_enabled, 0, + "Set to enable fast unload. Clear to disable."); + #define NUMA_NO_NODE -1 static LIST_HEAD(intf_list); @@ -1399,6 +1404,11 @@ static int mlx5_try_fast_unload(struct mlx5_core_dev * { bool fast_teardown, force_teardown; int err; + + if (!mlx5_fast_unload_enabled) { + mlx5_core_dbg(dev, "fast unload is disabled by user\n"); + return -EOPNOTSUPP; + } fast_teardown = MLX5_CAP_GEN(dev, fast_teardown); force_teardown = MLX5_CAP_GEN(dev, force_teardown);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905161729.x4GHT5Kc005304>