Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

dingtianhong and committed by
David S. Miller
00fa4ce9 9116d7b0

+1 -1
+1 -1
drivers/net/ethernet/sun/sunvnet.c
··· 751 751 struct vnet_mcast_entry *m; 752 752 753 753 for (m = vp->mcast_list; m; m = m->next) { 754 - if (!memcmp(m->addr, addr, ETH_ALEN)) 754 + if (ether_addr_equal(m->addr, addr)) 755 755 return m; 756 756 } 757 757 return NULL;