]> git.baikalelectronics.ru Git - kernel.git/commit
hsr: add hsr root debugfs directory
authorTaehee Yoo <ap420073@gmail.com>
Sun, 22 Dec 2019 11:26:27 +0000 (11:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Dec 2019 00:35:35 +0000 (16:35 -0800)
commitb6ce321b72e2b4be53319e0e19a3bcdb077b2fa7
treec3f81377fab61c6a1af64f830ea7f2bc15b68357
parentb2e99751c3d9135cdaf4886de871960a68d03a65
hsr: add hsr root debugfs directory

In current hsr code, when hsr interface is created, it creates debugfs
directory /sys/kernel/debug/<interface name>.
If there is same directory or file name in there, it fails.
In order to reduce possibility of failure of creation of debugfs,
this patch adds root directory.

Test commands:
    ip link add dummy0 type dummy
    ip link add dummy1 type dummy
    ip link add hsr0 type hsr slave1 dummy0 slave2 dummy1

Before this patch:
    /sys/kernel/debug/hsr0/node_table

After this patch:
    /sys/kernel/debug/hsr/hsr0/node_table

Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/hsr/hsr_debugfs.c
net/hsr/hsr_main.c
net/hsr/hsr_main.h
net/hsr/hsr_netlink.c