1
0
Fork 0
alistair23-linux/net/dsa
Taehee Yoo ab92d68fc2 net: core: add generic lockdep keys
Some interface types could be nested.
(VLAN, BONDING, TEAM, MACSEC, MACVLAN, IPVLAN, VIRT_WIFI, VXLAN, etc..)
These interface types should set lockdep class because, without lockdep
class key, lockdep always warn about unexisting circular locking.

In the current code, these interfaces have their own lockdep class keys and
these manage itself. So that there are so many duplicate code around the
/driver/net and /net/.
This patch adds new generic lockdep keys and some helper functions for it.

This patch does below changes.
a) Add lockdep class keys in struct net_device
   - qdisc_running, xmit, addr_list, qdisc_busylock
   - these keys are used as dynamic lockdep key.
b) When net_device is being allocated, lockdep keys are registered.
   - alloc_netdev_mqs()
c) When net_device is being free'd llockdep keys are unregistered.
   - free_netdev()
d) Add generic lockdep key helper function
   - netdev_register_lockdep_key()
   - netdev_unregister_lockdep_key()
   - netdev_update_lockdep_key()
e) Remove unnecessary generic lockdep macro and functions
f) Remove unnecessary lockdep code of each interfaces.

After this patch, each interface modules don't need to maintain
their lockdep keys.

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-10-24 14:53:48 -07:00
..
Kconfig net: dsa: microchip: remove NET_DSA_TAG_KSZ_COMMON 2019-09-12 11:36:12 +01:00
Makefile net: dsa: microchip: remove NET_DSA_TAG_KSZ_COMMON 2019-09-12 11:36:12 +01:00
dsa.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
dsa2.c net: dsa: fix switch tree list 2019-10-19 12:19:41 -07:00
dsa_priv.h net: dsa: add support for BRIDGE_MROUTER attribute 2019-07-09 14:49:34 -07:00
master.c net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
port.c net: dsa: check bridge VLAN in slave operations 2019-08-27 20:17:27 -07:00
slave.c net: core: add generic lockdep keys 2019-10-24 14:53:48 -07:00
switch.c net: dsa: program VLAN on CPU port from slave 2019-08-27 20:17:28 -07:00
tag_8021q.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-02 11:20:17 -07:00
tag_brcm.c dsa: tag_brcm: Fix build error without CONFIG_NET_DSA_TAG_BRCM_PREPEND 2019-05-10 15:06:45 -07:00
tag_dsa.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_edsa.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_gswip.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_ksz.c net: dsa: ksz: Add KSZ8795 tag code 2019-07-30 15:12:50 -07:00
tag_lan9303.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_mtk.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_qca.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00
tag_sja1105.c net: dsa: sja1105: Fix sleeping while atomic in .port_hwtstamp_set 2019-10-02 12:19:53 -04:00
tag_trailer.c dsa: Cleanup unneeded table and make tag structures static 2019-04-28 19:41:01 -04:00