OSDN Git Service

net: vxlan: Add nolocalbypass option to vxlan.
authorVladimir Nikishkin <vladimir@nikishkin.pw>
Fri, 12 May 2023 03:40:33 +0000 (11:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 May 2023 16:02:33 +0000 (17:02 +0100)
commit69474a8a5837be63f13c6f60a7d622b98ed5c539
tree82cff7f3e374b31c188fc582bfbf876f7cc6aade
parent7eef636ecc58b3bf330cd25d9129e2f2d379a65a
net: vxlan: Add nolocalbypass option to vxlan.

If a packet needs to be encapsulated towards a local destination IP, the
packet will undergo a "local bypass" and be injected into the Rx path as
if it was received by the target VXLAN device without undergoing
encapsulation. If such a device does not exist, the packet will be
dropped.

There are scenarios where we do not want to perform such a bypass, but
instead want the packet to be encapsulated and locally received by a
user space program for post-processing.

To that end, add a new VXLAN device attribute that controls whether a
"local bypass" is performed or not. Default to performing a bypass to
maintain existing behavior.

Signed-off-by: Vladimir Nikishkin <vladimir@nikishkin.pw>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan/vxlan_core.c
include/net/vxlan.h
include/uapi/linux/if_link.h