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 3df56840a3b9282c7ab308682d448bba6dac53f4..1c24a8f368bd86a25835053de21ee6f96df78adb 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;