dpaa_eth: reserve space for the xdp_frame under the A050385 erratum
authorCamelia Groza <camelia.groza@nxp.com>
Thu, 4 Feb 2021 16:49:26 +0000 (18:49 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 6 Feb 2021 03:58:34 +0000 (19:58 -0800)
commit275a9c72b420e5051b0e92e49b26bef06c196f29
treede9ed5469724a10648b406ca560378a413c424d3
parent8dc1c444df193701910f5e80b5d4caaf705a8fb0
dpaa_eth: reserve space for the xdp_frame under the A050385 erratum

When the erratum workaround is triggered, the newly created xdp_frame
structure is stored at the start of the newly allocated buffer. Avoid
the structure from being overwritten by explicitly reserving enough
space in the buffer for storing it.

Account for the fact that the structure's size might increase in time by
aligning the headroom to DPAA_FD_DATA_ALIGNMENT bytes, thus guaranteeing
the data's alignment.

Fixes: ae680bcbd06a ("dpaa_eth: implement the A050385 erratum workaround for XDP")
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Acked-by: Madalin Bucur <madalin.bucur@oss.nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c