summaryrefslogtreecommitdiff
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-06-04 17:29:12 -0700
committerJakub Kicinski <kuba@kernel.org>2026-06-09 10:13:06 -0700
commitb5125db8d0205048a3b9dafec7f8e2b0a702101f (patch)
tree28e37f85137ae408657f4edf4fc0cd81cfef2692 /include/linux/ethtool.h
parentf994752b11273ded7ec6b49ae5c1d319eef21743 (diff)
docs: net: ethtool: document ops-locked drivers and op_needs_rtnl
Catch up various bits of documentation after the locking changes. Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de> Reviewed-by: Eric Dumazet <edumazet@google.com> Acked-by: Stanislav Fomichev <sdf@fomichev.me> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260605002912.3456868-13-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index da29017c757f..1b834e2a522e 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -1177,8 +1177,14 @@ struct kernel_ethtool_ts_info {
* @get_mm_stats: Query the 802.3 MAC Merge layer statistics.
*
* All operations are optional (i.e. the function pointer may be set
- * to %NULL) and callers must take this into account. Callers must
- * hold the RTNL lock or netdev instance lock (see @op_needs_rtnl).
+ * to %NULL) and callers must take this into account.
+ *
+ * For traditional drivers callers hold ``rtnl_lock`` across the call.
+ * For "ops locked" drivers (see Documentation/networking/netdevices.rst)
+ * callers instead hold the netdev instance lock (``netdev_lock_ops``);
+ * ``rtnl_lock`` is additionally held only for callbacks for which
+ * the driver opts in via the matching ``ETHTOOL_OP_NEEDS_RTNL_*`` bit
+ * in @op_needs_rtnl.
*
* See the structures used by these operations for further documentation.
* Note that for all operations using a structure ending with a zero-