From: Jakub Kicinski Date: Thu, 11 Jun 2026 20:03:55 +0000 (-0700) Subject: ethtool: tsconfig: always take rtnl_lock X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f48cd5b47bfe9ad6c3fdf9a1d631e3fd7ca90db0;p=thirdparty%2Flinux.git ethtool: tsconfig: always take rtnl_lock mlx5 throws ASSERT_RTNL() warnings on timestamp config, because it tries to update features. mlx5e_hwtstamp_set() calls netdev_update_features(). I missed this while grepping the drivers because tsconfig goes through ndo_hwtstamp_set/get, not ethtool ops, even tho the new uAPI is in ethtool Netlink. We could add a dedicated opt out bit for mlx5, but NDOs were not supposed to be part of the ethtool locking conversion in the first place. The mlx5 features update is related to the "compressed CQE" format which lacks timestamp, apparently. See commit c0194e2d0ef0 ("net/mlx5e: Disable rxhash when CQE compress is enabled"). Fixes: f9a3e05114b8 ("net: ethtool: optionally skip rtnl_lock on Netlink path for SET ops") Acked-by: Stanislav Fomichev Reviewed-by: Jacob Keller Reviewed-by: Vadim Fedorenko Reviewed-by: Kory Maincent Link: https://patch.msgid.link/20260611200355.2020663-1-kuba@kernel.org Signed-off-by: Jakub Kicinski --- diff --git a/net/ethtool/common.h b/net/ethtool/common.h index e3052972f953..2b3847f00801 100644 --- a/net/ethtool/common.h +++ b/net/ethtool/common.h @@ -113,6 +113,13 @@ ethtool_nl_msg_needs_rtnl(const struct net_device *dev, u8 cmd) return ops->op_needs_rtnl & ETHTOOL_OP_NEEDS_RTNL_SPAUSEPARAM; case ETHTOOL_MSG_RSS_SET: return ops->op_needs_rtnl & ETHTOOL_OP_NEEDS_RTNL_RSS; + case ETHTOOL_MSG_TSCONFIG_GET: + case ETHTOOL_MSG_TSCONFIG_SET: + /* tsconfig calls ndos (ndo_hwtstamp_set/get), not ethtool ops. + * Also, there is no corresponding ethtool ioctl, therefore + * these cases are Netlink-only. + */ + return true; } return false; }