In update_mapping(), update m->hw_addr unconditionally.
There is no benefit to comparing it first, since we already know that that cache line will be dirtied by the assignment to m->used.
This commit is contained in:
1 parent
9dc896a69c
commit
0b8ccdf977
1 file changed
+1
-3
@@ -361,9 +361,7 @@ update_mapping(struct net_bridge_port *p, const struct sk_buff *skb)
|
||||
|
||||
list_for_each_entry (m, &sc->mappings, node) {
|
||||
if (m->ip_addr == iph->saddr){
|
||||
if (memcmp(m->hw_addr, eh->h_source, ETH_ALEN)) {
|
||||
memcpy(m->hw_addr, eh->h_source, ETH_ALEN);
|
||||
}
|
||||
memcpy(m->hw_addr, eh->h_source, ETH_ALEN);
|
||||
m->used = jiffies;
|
||||
goto done;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user