mirror of https://gitee.com/openkylin/linux.git
netpoll: Use ether_addr_copy
Use ether_addr_copy instead of memcpy(a, b, ETH_ALEN) to save some cycles on arm and powerpc. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
34b2cff4ee
commit
c62326abac
|
@ -520,8 +520,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
|
|||
skb->protocol = eth->h_proto = htons(ETH_P_IP);
|
||||
}
|
||||
|
||||
memcpy(eth->h_source, np->dev->dev_addr, ETH_ALEN);
|
||||
memcpy(eth->h_dest, np->remote_mac, ETH_ALEN);
|
||||
ether_addr_copy(eth->h_source, np->dev->dev_addr);
|
||||
ether_addr_copy(eth->h_dest, np->remote_mac);
|
||||
|
||||
skb->dev = np->dev;
|
||||
|
||||
|
|
Loading…
Reference in New Issue