git: 7dedd4ba03e7 - stable/13 - mlx5en: Make the hw_lro parameter read only tunable.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Feb 2022 15:13:45 UTC
The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=7dedd4ba03e7dcbfef067ee6877be79ba48db06e commit 7dedd4ba03e7dcbfef067ee6877be79ba48db06e Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-02-08 15:08:51 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-02-08 15:08:51 +0000 mlx5en: Make the hw_lro parameter read only tunable. This prevents the so-called TIR context from changing during runtime. Sponsored by: NVIDIA Networking (cherry picked from commit a60f953424887cb4c72e2b113d4e0e0408c90bfc) --- sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c index 9423e274de81..654a2a15cd56 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c @@ -1473,6 +1473,12 @@ mlx5e_create_ethtool(struct mlx5e_priv *priv) mlx5e_params_desc[2 * x], CTLTYPE_U64 | CTLFLAG_RD | CTLFLAG_MPSAFE, priv, x, &mlx5e_ethtool_handler, "QU", mlx5e_params_desc[2 * x + 1]); + } else if (strcmp(mlx5e_params_desc[2 * x], "hw_lro") == 0) { + /* read-only, but tunable parameters */ + SYSCTL_ADD_PROC(&priv->sysctl_ctx, SYSCTL_CHILDREN(node), OID_AUTO, + mlx5e_params_desc[2 * x], CTLTYPE_U64 | CTLFLAG_RDTUN | + CTLFLAG_MPSAFE, priv, x, &mlx5e_ethtool_handler, "QU", + mlx5e_params_desc[2 * x + 1]); } else { /* * NOTE: In FreeBSD-11 and newer the