Thread (5 messages) flat view 5 messages, 3 authors, 2011-03-07

Re: [PATCH 2/2 v2] bonding: COW before overwriting the destination MAC address

From: Changli Gao <hidden>
Date: 2011-03-03 08:21:34

On Thu, Mar 3, 2011 at 3:55 PM, Eric Dumazet [off-list ref] wrote:


Thats minor, but using :

u16 *dest = eth_hdr(skb)->h_dest;

memcpy(dest, ptr, ETH_ALEN);

Is better because compiler knows both destination and source are at
least aligned on shorts.

On some arches, it helps to not using 6 bytes copy, but 3 shorts.
Is it still true if ptr isn't aligned on shorts? And
net_device.dev_addr is an unsigned char *pointer. Thanks.

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help