mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-24 05:59:17 +07:00
net: cxgb3: slight optimization of addr compare
Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Santosh Raspatur <santosh@chelsio.com> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8fd90de800
commit
4c1120b623
@ -182,7 +182,7 @@ static struct net_device *get_iff_from_mac(struct adapter *adapter,
|
||||
for_each_port(adapter, i) {
|
||||
struct net_device *dev = adapter->port[i];
|
||||
|
||||
if (!memcmp(dev->dev_addr, mac, ETH_ALEN)) {
|
||||
if (ether_addr_equal(dev->dev_addr, mac)) {
|
||||
rcu_read_lock();
|
||||
if (vlan && vlan != VLAN_VID_MASK) {
|
||||
dev = __vlan_find_dev_deep(dev, htons(ETH_P_8021Q), vlan);
|
||||
|
@ -429,7 +429,7 @@ void t3_l2t_update(struct t3cdev *dev, struct neighbour *neigh)
|
||||
} else {
|
||||
e->state = neigh->nud_state & NUD_CONNECTED ?
|
||||
L2T_STATE_VALID : L2T_STATE_STALE;
|
||||
if (memcmp(e->dmac, neigh->ha, 6))
|
||||
if (!ether_addr_equal(e->dmac, neigh->ha))
|
||||
setup_l2e_send_pending(dev, NULL, e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user