From b8d0a710a1012c12e67ca1d81cc123839da8e607 Mon Sep 17 00:00:00 2001 From: Sridhar Samudrala Date: Fri, 17 May 2013 06:39:07 +0000 Subject: [PATCH] --- yaml --- r: 376111 b: refs/heads/master c: 014be2c8eac3381e202f684c1f35ae184a8b152b h: refs/heads/master i: 376109: 55484f5aad5a4fed1c699fae9b842c9d4f654b3a 376107: e1282cf1bcbfa35a5ccb52c29de81fb1360d6788 376103: a799020f19c30257cfd5a9e516b5166af680acba 376095: 87e1bd526d937645f8196af018f0bf4e43ea9397 v: v3 --- [refs] | 2 +- trunk/drivers/net/vxlan.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 96b580727cc1..baa78e522e46 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e5f5e380e0f3bb11f04ca5bc66a551e58e0ad26e +refs/heads/master: 014be2c8eac3381e202f684c1f35ae184a8b152b diff --git a/trunk/drivers/net/vxlan.c b/trunk/drivers/net/vxlan.c index ba81f3c39a83..3b1d2ee7156b 100644 --- a/trunk/drivers/net/vxlan.c +++ b/trunk/drivers/net/vxlan.c @@ -301,7 +301,7 @@ static inline struct hlist_head *vxlan_fdb_head(struct vxlan_dev *vxlan, } /* Look up Ethernet address in forwarding table */ -static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan, +static struct vxlan_fdb *__vxlan_find_mac(struct vxlan_dev *vxlan, const u8 *mac) { @@ -316,6 +316,18 @@ static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan, return NULL; } +static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan, + const u8 *mac) +{ + struct vxlan_fdb *f; + + f = __vxlan_find_mac(vxlan, mac); + if (f) + f->used = jiffies; + + return f; +} + /* Add/update destinations for multicast */ static int vxlan_fdb_append(struct vxlan_fdb *f, __be32 ip, __be16 port, __u32 vni, __u32 ifindex) @@ -353,7 +365,7 @@ static int vxlan_fdb_create(struct vxlan_dev *vxlan, struct vxlan_fdb *f; int notify = 0; - f = vxlan_find_mac(vxlan, mac); + f = __vxlan_find_mac(vxlan, mac); if (f) { if (flags & NLM_F_EXCL) { netdev_dbg(vxlan->dev, @@ -563,7 +575,6 @@ static void vxlan_snoop(struct net_device *dev, f = vxlan_find_mac(vxlan, src_mac); if (likely(f)) { - f->used = jiffies; if (likely(f->remote.remote_ip == src_ip)) return;