drop_monitor: Add alert mode operations

The next patch is going to add another alert mode in which the dropped
packet is notified to user space, instead of only a summary of recent
drops.

Abstract the differences between the modes by adding alert mode
operations. The operations are selected based on the currently
configured mode and associated with the probes and the work item just
before tracing starts.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ido Schimmel
2019-08-11 10:35:50 +03:00
committed by David S. Miller
parent c5ab9b1c41
commit 28315f7999
2 changed files with 41 additions and 6 deletions

View File

@@ -62,4 +62,13 @@ enum {
* Our group identifiers
*/
#define NET_DM_GRP_ALERT 1
/**
* enum net_dm_alert_mode - Alert mode.
* @NET_DM_ALERT_MODE_SUMMARY: A summary of recent drops is sent to user space.
*/
enum net_dm_alert_mode {
NET_DM_ALERT_MODE_SUMMARY,
};
#endif