[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1687427930.git.ecree.xilinx@gmail.com>
Date: Thu, 22 Jun 2023 11:18:55 +0100
From: <edward.cree@....com>
To: <linux-net-drivers@....com>, <davem@...emloft.net>, <kuba@...nel.org>,
<edumazet@...gle.com>, <pabeni@...hat.com>
CC: <arnd@...db.de>, Edward Cree <ecree.xilinx@...il.com>,
<netdev@...r.kernel.org>, <habetsm.xilinx@...il.com>
Subject: [PATCH net-next 0/3] sfc: fix unaligned access in loopback selftests
From: Edward Cree <ecree.xilinx@...il.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(-)
Powered by blists - more mailing lists