OSDN Git Service

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)
commit9b63f57d4ab981e18e35def3349040527ead93c3
tree7e01282d4b43c3be9b4ecd6941228aeca210f5c1
parentf77508308fa76d0efc60ebf3c906f467feb062cb
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