netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] sfc: fix unaligned access in loopback selftests
@ 2023-06-22 10:18 edward.cree
  2023-06-22 10:18 ` [PATCH net-next 1/3] sfc: use padding to fix alignment in loopback test edward.cree
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: edward.cree @ 2023-06-22 10:18 UTC (permalink / raw)
  To: linux-net-drivers, davem, kuba, edumazet, pabeni
  Cc: arnd, Edward Cree, netdev, habetsm.xilinx

From: Edward Cree <ecree.xilinx@gmail.com>

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.

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 | 45 +++++++++++++---------
 drivers/net/ethernet/sfc/selftest.c        | 45 +++++++++++++---------
 drivers/net/ethernet/sfc/siena/selftest.c  | 45 +++++++++++++---------
 3 files changed, 81 insertions(+), 54 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-06-22 12:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-22 10:18 [PATCH net-next 0/3] sfc: fix unaligned access in loopback selftests edward.cree
2023-06-22 10:18 ` [PATCH net-next 1/3] sfc: use padding to fix alignment in loopback test edward.cree
2023-06-22 11:38   ` Arnd Bergmann
2023-06-22 12:02     ` Edward Cree
2023-06-22 12:19       ` Arnd Bergmann
2023-06-22 10:18 ` [PATCH net-next 2/3] sfc: siena: " edward.cree
2023-06-22 10:18 ` [PATCH net-next 3/3] sfc: falcon: " edward.cree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).