drop_monitor: Add support for packet alert mode for hardware drops
authorIdo Schimmel <idosch@mellanox.com>
Sat, 17 Aug 2019 13:28:14 +0000 (16:28 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Aug 2019 19:40:08 +0000 (12:40 -0700)
commit5e58109b1ea454b93e455e0e8fc0bc4c226b8c0a
tree9e4f96c04ee0330f08b814550d133b668303976e
parent80cebed85c88e71fb435b9eb5948548f10f15cba
drop_monitor: Add support for packet alert mode for hardware drops

In a similar fashion to software drops, extend drop monitor to send
netlink events when packets are dropped by the underlying hardware.

The main difference is that instead of encoding the program counter (PC)
from which kfree_skb() was called in the netlink message, we encode the
hardware trap name. The two are mostly equivalent since they should both
help the user understand why the packet was dropped.

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