summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamelia Groza <camelia.groza@nxp.com>2021-02-04 18:49:27 +0200
committerJakub Kicinski <kuba@kernel.org>2021-02-05 19:58:34 -0800
commitc2b0e8455eb76135f505dda81a8869e60f37a861 (patch)
treeb579796af62adad052a17f55e475ed88c26dc281
parent275a9c72b420e5051b0e92e49b26bef06c196f29 (diff)
downloadlinux-c2b0e8455eb76135f505dda81a8869e60f37a861.tar.gz
linux-c2b0e8455eb76135f505dda81a8869e60f37a861.tar.bz2
linux-c2b0e8455eb76135f505dda81a8869e60f37a861.zip
dpaa_eth: reduce data alignment requirements for the A050385 erratum
The 256 byte data alignment is required for preventing DMA transaction splits when crossing 4K page boundaries. Since XDP deals only with page sized buffers or less, this restriction isn't needed. Instead, the data only needs to be aligned to 64 bytes to prevent DMA transaction splits. These lessened restrictions can increase performance by widening the pool of permitted data alignments and preventing unnecessary realignments. 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>
-rw-r--r--drivers/net/ethernet/freescale/dpaa/dpaa_eth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index f3a879937d8d..2a2c7db23407 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2192,7 +2192,7 @@ static int dpaa_a050385_wa_xdpf(struct dpaa_priv *priv,
* byte frame headroom. If the XDP program uses all of it, copy the
* data to a new buffer and make room for storing the backpointer.
*/
- if (PTR_IS_ALIGNED(xdpf->data, DPAA_A050385_ALIGN) &&
+ if (PTR_IS_ALIGNED(xdpf->data, DPAA_FD_DATA_ALIGNMENT) &&
xdpf->headroom >= priv->tx_headroom) {
xdpf->headroom = priv->tx_headroom;
return 0;