Ver Fonte

net: sun: optimization of addr compare

Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
dingtianhong há 11 anos atrás
pai
commit
00fa4ce9fd
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      drivers/net/ethernet/sun/sunvnet.c

+ 1 - 1
drivers/net/ethernet/sun/sunvnet.c

@@ -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;