Skip to contentSkip to conversation

net: sun: optimization of addr compare

PATCH In review Ding Tianhong 1 participant 1 message Dec 30, 2013

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

PATCH v3 16/19 net: sun: optimization of addr compare

Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc "David S. Miller" <[email protected]>
---
 drivers/net/ethernet/sun/sunvnet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/sun/sunvnet.c +1 -1
index 3df5684..1c24a8f 100644
@@ -751,7 +751,7 @@ static struct vnet_mcast_entry *__vnet_mc_find(struct vnet *vp, u8 *addr)
 	struct vnet_mcast_entry *m;
 
 	for (m = vp->mcast_list; m; m = m->next) {
-		if (!memcmp(m->addr, addr, ETH_ALEN))
+		if (ether_addr_equal(m->addr, addr))
 			return m;
 	}
 	return NULL;
Signature · 1 line
1.8.0