aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-12-06 17:30:30 -0800
committerJakub Kicinski <kuba@kernel.org>2021-12-07 20:44:58 -0800
commitf12bf6f3f942b37de65eeea8be25903587fec930 (patch)
tree5032c5a20b17ef0956a19cdf423978fa7a55118e /include/linux/netdevice.h
parentb2dcdc7f731dfd8957ee2ca8be6c5d83bd0d95e3 (diff)
downloadlinux-f12bf6f3f942b37de65eeea8be25903587fec930.tar.gz
net: watchdog: add net device refcount tracker
Add a netdevice_tracker inside struct net_device, to track the self reference when a device has an active watchdog timer. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 69dca1edd5a60f..1a748ee9a421a7 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1951,6 +1951,7 @@ enum netdev_ml_priv_type {
*
* @dev_addr_shadow: Copy of @dev_addr to catch direct writes.
* @linkwatch_dev_tracker: refcount tracker used by linkwatch.
+ * @watchdog_dev_tracker: refcount tracker used by watchdog.
*
* FIXME: cleanup struct net_device such that network protocol info
* moves out.
@@ -2282,6 +2283,7 @@ struct net_device {
u8 dev_addr_shadow[MAX_ADDR_LEN];
netdevice_tracker linkwatch_dev_tracker;
+ netdevice_tracker watchdog_dev_tracker;
};
#define to_net_dev(d) container_of(d, struct net_device, dev)