drop_monitor: Allow truncation of dropped packets
authorIdo Schimmel <idosch@mellanox.com>
Sun, 11 Aug 2019 07:35:52 +0000 (10:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Aug 2019 17:53:30 +0000 (10:53 -0700)
commit57986617a736aec2980c1c78a9dd8dcdf477ee6e
tree8ec0b8d6b94bf68e3032a1789b56cce466ea5ac9
parentca30707dee2bc8bc81cfd8b4277fe90f7ca6df1f
drop_monitor: Allow truncation of dropped packets

When sending dropped packets to user space it is not always necessary to
copy the entire packet as usually only the headers are of interest.

Allow user to specify the truncation length and add the original length
of the packet as additional metadata to the netlink message.

By default no truncation is performed.

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