All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] hsr: several code cleanup for hsr module
@ 2020-02-28 18:00 Taehee Yoo
  2020-03-01  5:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Taehee Yoo @ 2020-02-28 18:00 UTC (permalink / raw)
  To: davem, kuba, netdev; +Cc: ap420073

This patchset is to clean up hsr module code.

1. The first patch is to use debugfs_remove_recursive().
If it uses debugfs_remove_recursive() instead of debugfs_remove(),
hsr_priv() doesn't need to have "node_tbl_file" pointer variable.

2. The second patch is to use extack error message.
If HSR uses the extack instead of netdev_info(), users can get
error messages immediately without any checking the kernel message.

3. The third patch is to use netdev_err() instead of WARN_ONCE().
When a packet is being sent, hsr_addr_subst_dest() is called and
it tries to find the node with the ethernet destination address.
If it couldn't find a node, it warns with WARN_ONCE().
But, using WARN_ONCE() is a little bit overdoing.
So, in this patch, netdev_err() is used instead.

4. The fourth patch is to remove unnecessary rcu_read_{lock/unlock}().
There are some rcu_read_{lock/unlock}() in hsr module and some of
them are unnecessary. In this patch,
these unnecessary rcu_read_{lock/unlock}() will be removed.

5. The fifth patch is to use upper/lower device infrastructure.
netdev_upper_dev_link() is useful to manage lower/upper interfaces.
And this function internally validates looping, maximum depth.
If hsr module uses upper/lower device infrastructure,
it can prevent these above problems.

Taehee Yoo (5):
  hsr: use debugfs_remove_recursive() instead of debugfs_remove()
  hsr: use extack error message instead of netdev_info
  hsr: use netdev_err() instead of WARN_ONCE()
  hsr: remove unnecessary rcu_read_lock() in hsr module
  hsr: use upper/lower device infrastructure

 net/hsr/hsr_debugfs.c  |  5 +---
 net/hsr/hsr_device.c   | 64 +++++++++++++++++++++---------------------
 net/hsr/hsr_device.h   |  3 +-
 net/hsr/hsr_framereg.c |  3 +-
 net/hsr/hsr_main.c     |  3 +-
 net/hsr/hsr_main.h     |  1 -
 net/hsr/hsr_netlink.c  | 49 ++++++++++++++++----------------
 net/hsr/hsr_slave.c    | 58 ++++++++++++++++++++------------------
 net/hsr/hsr_slave.h    |  2 +-
 9 files changed, 94 insertions(+), 94 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next 0/5] hsr: several code cleanup for hsr module
  2020-02-28 18:00 [PATCH net-next 0/5] hsr: several code cleanup for hsr module Taehee Yoo
@ 2020-03-01  5:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-03-01  5:37 UTC (permalink / raw)
  To: ap420073; +Cc: kuba, netdev

From: Taehee Yoo <ap420073@gmail.com>
Date: Fri, 28 Feb 2020 18:00:46 +0000

> This patchset is to clean up hsr module code.

Looks good to me, series applied, thank you.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-01  5:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-28 18:00 [PATCH net-next 0/5] hsr: several code cleanup for hsr module Taehee Yoo
2020-03-01  5:37 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.