sfc: fix unaligned access in loopback selftests
Status from this message: This series was applied to netdev/net-next.git (main)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 4 repliesApplied 3/3
- v13 patches 3 repliesSuperseded
Changes in v2 from the cover letter
* added __aligned(4) to payload struct definitions (Arnd)
* fixed dodgy whitespace (checkpatch)
Patches in v2 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | sfc: use padding to fix alignment in loopback testdrivers/ | +28 | 4 replies | Applied |
| 2/3 | sfc: siena: use padding to fix alignment in loopback testdrivers/ | +28 | 0 replies | Applied |
| 3/3 | sfc: falcon: use padding to fix alignment in loopback testdrivers/ | +28 | 0 replies | Applied |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 net-next 0/3] sfc: fix unaligned access in loopback selftests
From: Edward Cree <[email protected]>
Arnd reported that the sfc drivers each define a packed loopback_payload
structure with an ethernet header followed by an IP header, whereas the kernel definition of iphdr specifies that this is 4-byte aligned, causing a W=1 warning.
Fix this in each case by adding two bytes of leading padding to the
struct, taking care that these are not sent on the wire.
Tested on EF10; build-tested on Siena and Falcon.
Changed in v2:
* added __aligned(4) to payload struct definitions (Arnd)
* fixed dodgy whitespace (checkpatch)
Edward Cree (3):
sfc: use padding to fix alignment in loopback test
sfc: siena: use padding to fix alignment in loopback test
sfc: falcon: use padding to fix alignment in loopback test
drivers/net/ethernet/sfc/falcon/selftest.c | 47 +++++++++++++--------- drivers/net/ethernet/sfc/selftest.c | 47 +++++++++++++--------- drivers/net/ethernet/sfc/siena/selftest.c | 47 +++++++++++++--------- 3 files changed, 84 insertions(+), 57 deletions(-)