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>
This commit is contained in:

committed by
David S. Miller

parent
ca30707dee
commit
57986617a7
@@ -75,6 +75,8 @@ enum net_dm_attr {
|
||||
NET_DM_ATTR_PROTO, /* u16 */
|
||||
NET_DM_ATTR_PAYLOAD, /* binary */
|
||||
NET_DM_ATTR_PAD,
|
||||
NET_DM_ATTR_TRUNC_LEN, /* u32 */
|
||||
NET_DM_ATTR_ORIG_LEN, /* u32 */
|
||||
|
||||
__NET_DM_ATTR_MAX,
|
||||
NET_DM_ATTR_MAX = __NET_DM_ATTR_MAX - 1
|
||||
|
Reference in New Issue
Block a user