[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8452678da3a647249780b60e857bb32a@AcuMS.aculab.com>
Date: Mon, 8 Mar 2021 14:10:46 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Alex Elder' <elder@...aro.org>,
"subashab@...eaurora.org" <subashab@...eaurora.org>,
"stranche@...eaurora.org" <stranche@...eaurora.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>
CC: "sharathv@...eaurora.org" <sharathv@...eaurora.org>,
"bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
"evgreen@...omium.org" <evgreen@...omium.org>,
"cpratapa@...eaurora.org" <cpratapa@...eaurora.org>,
"elder@...nel.org" <elder@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel test robot" <lkp@...el.com>
Subject: RE: [PATCH net-next v2 6/6] net: qualcomm: rmnet: don't use C
bit-fields in rmnet checksum header
...
> Sort of related, I have been meaning to eliminate the
> pointless __aligned(1) tags on rmnet structures defined
> in <linux/if_rmnet.h>. It wouldn't hurt to use __packed,
> though I think they're all 4 or 8 bytes naturally anyway.
> Perhaps marking them __aligned(4) would help identify
> potential unaligned accesses?
Don't use __packed (etc) unless the data might be misaligned.
If the architecture doesn't support misaligned memory
accesses then the compiler has to generate code that
does byte accesses and shifts.
__aligned(4) is mostly useful for structures that have
to have an 8-byte field on a 4-byte boundary.
(As happens in the x86 compat32 code.)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists