git: a60f95342488 - main - mlx5en: Make the hw_lro parameter read only tunable.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 01 Feb 2022 15:24:08 UTC
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=a60f953424887cb4c72e2b113d4e0e0408c90bfc commit a60f953424887cb4c72e2b113d4e0e0408c90bfc Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-02-01 15:20:05 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-02-01 15:21:14 +0000 mlx5en: Make the hw_lro parameter read only tunable. This prevents the so-called TIR context from changing during runtime. MFC after: 1 week Sponsored by: NVIDIA Networking --- 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