summaryrefslogtreecommitdiff
path: root/include/net/vxlan.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2023-03-15 15:11:52 +0200
committerDavid S. Miller <davem@davemloft.net>2023-03-17 08:05:49 +0000
commitbc6c6b013ffee36eb555cc0a68aa3d9608e1fad2 (patch)
tree2d3c4ff98f0ddae36e7b55a46271103ec80ea682 /include/net/vxlan.h
parenta3a48de5eade770e911d35291217bdd69ce04ef1 (diff)
vxlan: mdb: Add an internal flag to indicate MDB usage
Add an internal flag to indicate whether MDB entries are configured or not. Set the flag after installing the first MDB entry and clear it before deleting the last one. The flag will be consulted by the data path which will only perform an MDB lookup if the flag is set, thereby keeping the MDB overhead to a minimum when the MDB is not used. Another option would have been to use a static key, but it is global and not per-device, unlike the current approach. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/vxlan.h')
-rw-r--r--include/net/vxlan.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/vxlan.h b/include/net/vxlan.h
index 110b703d8978..b7b2e9abfb37 100644
--- a/include/net/vxlan.h
+++ b/include/net/vxlan.h
@@ -327,6 +327,7 @@ struct vxlan_dev {
#define VXLAN_F_IPV6_LINKLOCAL 0x8000
#define VXLAN_F_TTL_INHERIT 0x10000
#define VXLAN_F_VNIFILTER 0x20000
+#define VXLAN_F_MDB 0x40000
/* Flags that are used in the receive path. These flags must match in
* order for a socket to be shareable