aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_cm.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2013-12-26 06:40:50 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-26 13:31:34 -0500
commitc5266d40b0a26546d0ebedb44dd4145088b85cb8 (patch)
tree50bacfb0a52d4a1a335ac2a15d93e4ef863710de /drivers/infiniband/hw/nes/nes_cm.c
parent93dc5e429b4d8ac8d683b61052592812e9353f9f (diff)
infiniband: slight optimization of addr compare
Use the possibly more efficient ether_addr_equal to instead of memcmp. Cc: Roland Dreier <roland@kernel.org> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: Faisal Latif <faisal.latif@intel.com> Cc: linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_cm.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_cm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes_cm.c b/drivers/infiniband/hw/nes/nes_cm.c
index 6b29249aa85a..9c9f2f57e960 100644
--- a/drivers/infiniband/hw/nes/nes_cm.c
+++ b/drivers/infiniband/hw/nes/nes_cm.c
@@ -1354,8 +1354,7 @@ static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpi
1354 neigh->ha, ntohl(rt->rt_gateway)); 1354 neigh->ha, ntohl(rt->rt_gateway));
1355 1355
1356 if (arpindex >= 0) { 1356 if (arpindex >= 0) {
1357 if (!memcmp(nesadapter->arp_table[arpindex].mac_addr, 1357 if (ether_addr_equal(nesadapter->arp_table[arpindex].mac_addr, neigh->ha)) {
1358 neigh->ha, ETH_ALEN)) {
1359 /* Mac address same as in nes_arp_table */ 1358 /* Mac address same as in nes_arp_table */
1360 goto out; 1359 goto out;
1361 } 1360 }