vxlan: Unmark offloaded bit on replaced FDB entries
authorPetr Machata <petrm@mellanox.com>
Tue, 18 Dec 2018 13:15:59 +0000 (13:15 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Dec 2018 05:18:25 +0000 (21:18 -0800)
When rdst of an offloaded FDB entry is replaced, it certainly isn't
offloaded anymore. Drivers are notified about such replacements, and can
re-mark the entry as offloaded again if they so wish. However until a
driver does so explicitly, assume a replaced FDB entry is not offloaded.

Note that replaces coming via vxlan_fdb_external_learn_add() are always
immediately followed by an explicit offload marking.

Fixes: 0efe11733356 ("vxlan: Support marking RDSTs as offloaded")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c

index 297cdeaef4796501279f826154191eb6e0e0d298..c9956c08edf5a3ec081810e4b81ebf2021232c19 100644 (file)
@@ -568,6 +568,7 @@ static int vxlan_fdb_replace(struct vxlan_fdb *f,
        rd->remote_port = port;
        rd->remote_vni = vni;
        rd->remote_ifindex = ifindex;
+       rd->offloaded = false;
        return 1;
 }