History

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.

Eric Dumazet committed 4 years ago

Commit f12bf6f1 parent b2dcdc72 files · +8 −4Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/netdevice.h+2−0
@@ -1951,6 +1951,7 @@ enum netdev_ml_priv_type { · 1950 unmodified lines
1951 *1951 *
1952 * @dev_addr_shadow: Copy of @dev_addr to catch direct writes.1952 * @dev_addr_shadow: Copy of @dev_addr to catch direct writes.
1953 * @linkwatch_dev_tracker: refcount tracker used by linkwatch.1953 * @linkwatch_dev_tracker: refcount tracker used by linkwatch.
1954 * @watchdog_dev_tracker: refcount tracker used by watchdog.
1954 *1955 *
1955 * FIXME: cleanup struct net_device such that network protocol info1956 * FIXME: cleanup struct net_device such that network protocol info
1956 * moves out.1957 * moves out.
@@ -2282,6 +2283,7 @@ struct net_device { · 325 unmodified lines
2282 2283
2283 u8 dev_addr_shadow[MAX_ADDR_LEN];2284 u8 dev_addr_shadow[MAX_ADDR_LEN];
2284 netdevice_tracker linkwatch_dev_tracker;2285 netdevice_tracker linkwatch_dev_tracker;
2286 netdevice_tracker watchdog_dev_tracker;
2285};2287};
2286#define to_net_dev(d) container_of(d, struct net_device, dev)2288#define to_net_dev(d) container_of(d, struct net_device, dev)
2287 2289