]> git.baikalelectronics.ru Git - kernel.git/commit
drop_monitor: Move per-CPU data init/fini to separate functions
authorIdo Schimmel <idosch@mellanox.com>
Sat, 17 Aug 2019 13:28:10 +0000 (16:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Aug 2019 19:40:08 +0000 (12:40 -0700)
commitb71c6dc2651cce3256962dcd6bef25d3d0c9a8e7
tree7e01282d4b43c3be9b4ecd6941228aeca210f5c1
parent3b8322d9a2a6bdce7b90c1d2b2cb61070a30ebcc
drop_monitor: Move per-CPU data init/fini to separate functions

Currently drop monitor only reports software drops to user space, but
subsequent patches are going to add support for hardware drops.

Like software drops, the per-CPU data of hardware drops needs to be
initialized and de-initialized upon module initialization and exit. To
avoid code duplication, break this code into separate functions, so that
these could be re-used for hardware drops.

No functional changes intended.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/drop_monitor.c