All of lore.kernel.org
 help / color / mirror / Atom feed
From: Camelia Groza <camelia.groza@nxp.com>
To: kuba@kernel.org, davem@davemloft.net, maciej.fijalkowski@intel.com
Cc: madalin.bucur@oss.nxp.com, netdev@vger.kernel.org,
	Camelia Groza <camelia.groza@nxp.com>
Subject: [PATCH net 2/3] dpaa_eth: reduce data alignment requirements for the A050385 erratum
Date: Tue,  2 Feb 2021 19:34:43 +0200	[thread overview]
Message-ID: <6e534e4b2da14bb57331446e950a49f237f979c0.1612275417.git.camelia.groza@nxp.com> (raw)
In-Reply-To: <cover.1612275417.git.camelia.groza@nxp.com>

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>
---
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index e1d041c35ad9..78dfa05f6d55 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;
-- 
2.17.1


  parent reply	other threads:[~2021-02-02 17:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02 17:34 [PATCH net 0/3] dpaa_eth: A050385 erratum workaround fixes under XDP Camelia Groza
2021-02-02 17:34 ` [PATCH net 1/3] dpaa_eth: reserve space for the xdp_frame under the A050385 erratum Camelia Groza
2021-02-04  8:51   ` Maciej Fijalkowski
2021-02-04 11:55     ` Camelia Alexandra Groza
2021-02-02 17:34 ` Camelia Groza [this message]
2021-02-04 15:58   ` [PATCH net 2/3] dpaa_eth: reduce data alignment requirements for " Maciej Fijalkowski
2021-02-02 17:34 ` [PATCH net 3/3] dpaa_eth: try to move the data in place " Camelia Groza
2021-02-04 15:56   ` Maciej Fijalkowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e534e4b2da14bb57331446e950a49f237f979c0.1612275417.git.camelia.groza@nxp.com \
    --to=camelia.groza@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=madalin.bucur@oss.nxp.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.