]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitecbb537ac7b266b3fac7248579c97b05a74eef07
treede9ed5469724a10648b406ca560378a413c424d3
parent7e26fb444144b7ae92c139af3e2f42041926da93
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: b3c5c014aee2 ("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