Thread (20 messages) flat view 20 messages, 5 authors, 2012-05-24

Re: [RFC] net/hsr: Add support for IEC 62439-3 High-availability Seamless Redundancy

From: David Miller <davem@davemloft.net>
Date: 2012-04-05 22:32:18

From: Ben Hutchings <redacted>
Date: Thu, 5 Apr 2012 20:21:08 +0100
On Wed, 2012-04-04 at 20:17 -0400, David Miller wrote:
quoted
From: Arvid Brodin <redacted>
Date: Thu, 5 Apr 2012 01:09:48 +0200
quoted
-		icmp_param.data.icmph	   = *icmp_hdr(skb);
+		memcpy(&icmp_param.data.icmph, icmp_hdr(skb),
+						sizeof(icmp_param.data.icmph));
GCC can and will optimize this into an inline assignment, and thus
have the same unaligned access problems, because it determines
alignment based upon the types involved.
So presumably icmp_hdr() should be changed to skb_transport_header().
I would not say so.  Otherwise we introduce ugly casts everywhere.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help