Skip to contentSkip to conversation

infiniband: slight optimization of addr compare

PATCH In review Ding Tianhong 1 participant 1 message Jan 8, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 9/19 infiniband: slight optimization of addr compare

Use the possibly more efficient ether_addr_equal
to instead of memcmp.

---
 drivers/infiniband/hw/nes/nes_cm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/hw/nes/nes_cm.c +1 -2
index 6b29249..9c9f2f5 100644
@@ -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;
 				}
Signature · 7 lines
1.8.0


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html