]> 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)
commit992e51000f5027a05fd0b3039d773bcfcfc7a922
treede9ed5469724a10648b406ca560378a413c424d3
parent9dee7b85b76f24fd8578c1f6391e7b2eaee76ded
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: a5d7a6185aae ("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