提交 58ec1ea6 编写于 作者: N Nikolay Aleksandrov 提交者: David S. Miller

net: bridge: fdb: restore unlikely() when taking over externally added entries

Taking over hw-learned entries is not a likely scenario so restore the
unlikely() use for the case of SW taking over externally learned
entries.
Signed-off-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 31f1155b
...@@ -587,8 +587,10 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source, ...@@ -587,8 +587,10 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
fdb->dst = source; fdb->dst = source;
fdb_modified = true; fdb_modified = true;
/* Take over HW learned entry */ /* Take over HW learned entry */
test_and_clear_bit(BR_FDB_ADDED_BY_EXT_LEARN, if (unlikely(test_bit(BR_FDB_ADDED_BY_EXT_LEARN,
&fdb->flags); &fdb->flags)))
clear_bit(BR_FDB_ADDED_BY_EXT_LEARN,
&fdb->flags);
} }
if (now != fdb->updated) if (now != fdb->updated)
fdb->updated = now; fdb->updated = now;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册