From: dingtianhong Date: Thu, 26 Dec 2013 11:40:50 +0000 (+0800) Subject: infiniband: slight optimization of addr compare X-Git-Tag: MMI-PSA29.97-13-9~12877^2~393^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c5266d40b0a26546d0ebedb44dd4145088b85cb8;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git infiniband: slight optimization of addr compare Use the possibly more efficient ether_addr_equal to instead of memcmp. Cc: Roland Dreier Cc: Sean Hefty Cc: Hal Rosenstock Cc: Faisal Latif Cc: linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Wang Weidong Signed-off-by: Ding Tianhong Signed-off-by: David S. Miller --- 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 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; }