net: sun: optimization of addr compare
authordingtianhong <dingtianhong@huawei.com>
Mon, 30 Dec 2013 07:41:24 +0000 (15:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Dec 2013 21:48:32 +0000 (16:48 -0500)
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>
drivers/net/ethernet/sun/sunvnet.c

index 3df5684..1c24a8f 100644 (file)
@@ -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;