drop_monitor: Initialize timer and work item upon tracing enable
authorIdo Schimmel <idosch@mellanox.com>
Sun, 11 Aug 2019 07:35:47 +0000 (10:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Aug 2019 17:53:30 +0000 (10:53 -0700)
commit70c69274f354ecb905cd46449111e73b17dedaad
treec8a3c9cdd3a2d5bfb1b8b931dd8b775458e411b1
parent7c747838a55818fd0cdbe48afd98fba726aa898d
drop_monitor: Initialize timer and work item upon tracing enable

The timer and work item are currently initialized once during module
init, but subsequent patches will need to associate different functions
with the work item, based on the configured alert mode.

Allow subsequent patches to make that change by initializing and
de-initializing these objects during tracing enable and disable.

This also guarantees that once the request to disable tracing returns,
no more netlink notifications will be generated.

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