Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376111
b: refs/heads/master
c: 014be2c
h: refs/heads/master
i:
  376109: 55484f5
  376107: e1282cf
  376103: a799020
  376095: 87e1bd5
v: v3
  • Loading branch information
Sridhar Samudrala authored and David S. Miller committed May 18, 2013
1 parent 7b3a0b4 commit b8d0a71
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5f5e380e0f3bb11f04ca5bc66a551e58e0ad26e
refs/heads/master: 014be2c8eac3381e202f684c1f35ae184a8b152b
17 changes: 14 additions & 3 deletions trunk/drivers/net/vxlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

{
Expand All @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit b8d0a71

Please sign in to comment.