netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] Revert "dpaa2-eth: configure the cache stashing amount on a queue"
@ 2019-05-23 14:38 Ioana Radulescu
  2019-05-23 16:37 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ioana Radulescu @ 2019-05-23 14:38 UTC (permalink / raw)
  To: netdev, davem; +Cc: ioana.ciornei

This reverts commit f8b995853444aba9c16c1ccdccdd397527fde96d.

The reverted change instructed the QMan hardware block to fetch
RX frame annotation and beginning of frame data to cache before
the core would read them.

It turns out that in rare cases, it's possible that a QMan
stashing transaction is delayed long enough such that, by the time
it gets executed, the frame in question had already been dequeued
by the core and software processing began on it. If the core
manages to unmap the frame buffer _before_ the stashing transaction
is executed, an SMMU exception will be raised.

Unfortunately there is no easy way to work around this while keeping
the performance advantages brought by QMan stashing, so disable
it altogether.

Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
---
 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index 63b1ecc1..28a6faa 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -2479,14 +2479,9 @@ static int setup_rx_flow(struct dpaa2_eth_priv *priv,
 	queue.destination.type = DPNI_DEST_DPCON;
 	queue.destination.priority = 1;
 	queue.user_context = (u64)(uintptr_t)fq;
-	queue.flc.stash_control = 1;
-	queue.flc.value &= 0xFFFFFFFFFFFFFFC0;
-	/* 01 01 00 - data, annotation, flow context */
-	queue.flc.value |= 0x14;
 	err = dpni_set_queue(priv->mc_io, 0, priv->mc_token,
 			     DPNI_QUEUE_RX, 0, fq->flowid,
-			     DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST |
-			     DPNI_QUEUE_OPT_FLC,
+			     DPNI_QUEUE_OPT_USER_CTX | DPNI_QUEUE_OPT_DEST,
 			     &queue);
 	if (err) {
 		dev_err(dev, "dpni_set_queue(RX) failed\n");
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] Revert "dpaa2-eth: configure the cache stashing amount on a queue"
  2019-05-23 14:38 [PATCH net-next] Revert "dpaa2-eth: configure the cache stashing amount on a queue" Ioana Radulescu
@ 2019-05-23 16:37 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-05-23 16:37 UTC (permalink / raw)
  To: ruxandra.radulescu; +Cc: netdev, ioana.ciornei

From: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Date: Thu, 23 May 2019 17:38:22 +0300

> This reverts commit f8b995853444aba9c16c1ccdccdd397527fde96d.
> 
> The reverted change instructed the QMan hardware block to fetch
> RX frame annotation and beginning of frame data to cache before
> the core would read them.
> 
> It turns out that in rare cases, it's possible that a QMan
> stashing transaction is delayed long enough such that, by the time
> it gets executed, the frame in question had already been dequeued
> by the core and software processing began on it. If the core
> manages to unmap the frame buffer _before_ the stashing transaction
> is executed, an SMMU exception will be raised.
> 
> Unfortunately there is no easy way to work around this while keeping
> the performance advantages brought by QMan stashing, so disable
> it altogether.
> 
> Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-23 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 14:38 [PATCH net-next] Revert "dpaa2-eth: configure the cache stashing amount on a queue" Ioana Radulescu
2019-05-23 16:37 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).