]> git.baikalelectronics.ru Git - kernel.git/commit
net: psample: Add tunnel support
authorChris Mi <chrism@mellanox.com>
Tue, 19 May 2020 14:45:20 +0000 (22:45 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 22 May 2020 00:04:07 +0000 (17:04 -0700)
commitfe707217a0bc2b005d5ad59f1d71dc547dcc1a3c
tree01d7ebfcbaa77f3303cdd711603b81bb0939cc9f
parent17f5d24ce9e5ea87b41ce81253eb7c994ad3b082
net: psample: Add tunnel support

Currently, psample can only send the packet bits after decapsulation.
The tunnel information is lost. Add the tunnel support.

If the sampled packet has no tunnel info, the behavior is the same as
before. If it has, add a nested metadata field named PSAMPLE_ATTR_TUNNEL
and include the tunnel subfields if applicable.

Increase the metadata length for sampled packet with the tunnel info.
If new subfields of tunnel info should be included, update the metadata
length accordingly.

Signed-off-by: Chris Mi <chrism@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/uapi/linux/psample.h
net/psample/psample.c