提交 79adc532 编写于 作者: D Ding Tianhong 提交者: Roland Dreier

RDMA/nes: Slight optimization of Ethernet address compare

Use the possibly more efficient ether_addr_equal() instead of memcmp().
Signed-off-by: NWang Weidong <wangweidong1@huawei.com>
Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: NRoland Dreier <roland@purestorage.com>
上级 d9d5713c
......@@ -1354,8 +1354,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
neigh->ha, ntohl(rt->rt_gateway));
if (arpindex >= 0) {
if (!memcmp(nesadapter->arp_table[arpindex].mac_addr,
neigh->ha, ETH_ALEN)) {
if (ether_addr_equal(nesadapter->arp_table[arpindex].mac_addr, neigh->ha)) {
/* Mac address same as in nes_arp_table */
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册