]> www.infradead.org Git - users/dwmw2/linux.git/commit
vxlan: vxlan_core: Do not skip default entry in vxlan_flush() by default
authorAmit Cohen <amcohen@nvidia.com>
Mon, 9 Oct 2023 10:06:10 +0000 (13:06 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Oct 2023 09:00:30 +0000 (10:00 +0100)
commit77b613efcc81a66665370f2fd6c7538747db7130
treee21f42ba6f53677c584dbe92fdfdde3c3c9515fd
parentbfe36bf7811c3171e546a956377ea16e89ecf838
vxlan: vxlan_core: Do not skip default entry in vxlan_flush() by default

Currently, the function vxlan_flush() does not flush the default FDB entry
(an entry with all_zeros_mac and default VNI), as it is deleted at
vxlan_uninit(). When this function will be used for flushing FDB entries
from user space, it will have to flush also the default entry in case that
other parameters match (e.g., VNI, flags).

Extend 'struct vxlan_fdb_flush_desc' to include an indication whether
the default entry should be flushed or not. The default value (false)
indicates to flush it, adjust all the existing callers to set
'.ignore_default_entry' to true, so the current behavior will not be
changed.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan/vxlan_core.c