linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Madalin Bucur <madalin.bucur@nxp.com>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH AUTOSEL 4.14 17/28] dt-bindings: net: FMan erratum A050385
Date: Wed, 18 Mar 2020 16:55:44 -0400	[thread overview]
Message-ID: <20200318205555.17447-17-sashal@kernel.org> (raw)
In-Reply-To: <20200318205555.17447-1-sashal@kernel.org>

From: Madalin Bucur <madalin.bucur@nxp.com>

[ Upstream commit 26d5bb9e4c4b541c475751e015072eb2cbf70d15 ]

FMAN DMA read or writes under heavy traffic load may cause FMAN
internal resource leak; thus stopping further packet processing.

The FMAN internal queue can overflow when FMAN splits single
read or write transactions into multiple smaller transactions
such that more than 17 AXI transactions are in flight from FMAN
to interconnect. When the FMAN internal queue overflows, it can
stall further packet processing. The issue can occur with any one
of the following three conditions:

  1. FMAN AXI transaction crosses 4K address boundary (Errata
     A010022)
  2. FMAN DMA address for an AXI transaction is not 16 byte
     aligned, i.e. the last 4 bits of an address are non-zero
  3. Scatter Gather (SG) frames have more than one SG buffer in
     the SG list and any one of the buffers, except the last
     buffer in the SG list has data size that is not a multiple
     of 16 bytes, i.e., other than 16, 32, 48, 64, etc.

With any one of the above three conditions present, there is
likelihood of stalled FMAN packet processing, especially under
stress with multiple ports injecting line-rate traffic.

To avoid situations that stall FMAN packet processing, all of the
above three conditions must be avoided; therefore, configure the
system with the following rules:

  1. Frame buffers must not span a 4KB address boundary, unless
     the frame start address is 256 byte aligned
  2. All FMAN DMA start addresses (for example, BMAN buffer
     address, FD[address] + FD[offset]) are 16B aligned
  3. SG table and buffer addresses are 16B aligned and the size
     of SG buffers are multiple of 16 bytes, except for the last
     SG buffer that can be of any size.

Additional workaround notes:
- Address alignment of 64 bytes is recommended for maximally
efficient system bus transactions (although 16 byte alignment is
sufficient to avoid the stall condition)
- To support frame sizes that are larger than 4K bytes, there are
two options:
  1. Large single buffer frames that span a 4KB page boundary can
     be converted into SG frames to avoid transaction splits at
     the 4KB boundary,
  2. Align the large single buffer to 256B address boundaries,
     ensure that the frame address plus offset is 256B aligned.
- If software generated SG frames have buffers that are unaligned
and with random non-multiple of 16 byte lengths, before
transmitting such frames via FMAN, frames will need to be copied
into a new single buffer or multiple buffer SG frame that is
compliant with the three rules listed above.

Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 Documentation/devicetree/bindings/net/fsl-fman.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/fsl-fman.txt b/Documentation/devicetree/bindings/net/fsl-fman.txt
index df873d1f3b7c5..2aaae210317bb 100644
--- a/Documentation/devicetree/bindings/net/fsl-fman.txt
+++ b/Documentation/devicetree/bindings/net/fsl-fman.txt
@@ -110,6 +110,13 @@ PROPERTIES
 		Usage: required
 		Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt
 
+- fsl,erratum-a050385
+		Usage: optional
+		Value type: boolean
+		Definition: A boolean property. Indicates the presence of the
+		erratum A050385 which indicates that DMA transactions that are
+		split can result in a FMan lock.
+
 =============================================================================
 FMan MURAM Node
 
-- 
2.20.1


  parent reply	other threads:[~2020-03-18 20:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-18 20:55 [PATCH AUTOSEL 4.14 01/28] cgroup-v1: cgroup_pidlist_next should update position index Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 02/28] cgroup: Iterate tasks that did not finish do_exit() Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 03/28] batman-adv: Don't schedule OGM for disabled interface Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 04/28] pinctrl: core: Remove extra kref_get which blocks hogs being freed Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 05/28] r8152: check disconnect status after long sleep Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 06/28] bnxt_en: reinitialize IRQs when MTU is modified Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 07/28] cpupower: avoid multiple definition with gcc -fno-common Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 08/28] fib: add missing attribute validation for tun_id Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 09/28] can: add missing attribute validation for termination Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 10/28] macsec: add missing attribute validation for port Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 11/28] team: add missing attribute validation for port ifindex Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 12/28] team: add missing attribute validation for array index Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 13/28] netfilter: cthelper: add missing attribute validation for cthelper Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 14/28] netfilter: nft_payload: add missing attribute validation for payload csum flags Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 15/28] drivers/of/of_mdio.c:fix of_mdiobus_register() Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 16/28] cgroup1: don't call release_agent when it is "" Sasha Levin
2020-03-18 20:55 ` Sasha Levin [this message]
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 18/28] arm64: dts: ls1043a: FMan erratum A050385 Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 19/28] fsl/fman: detect " Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 20/28] virtio-blk: fix hw_queue stopped on arbitrary error Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 21/28] ipvlan: add cond_resched_rcu() while processing muticast backlog Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 22/28] ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast() Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 23/28] scsi: ipr: Fix softlockup when rescanning devices in petitboot Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 24/28] mac80211: Do not send mesh HWMP PREQ if HWMP is disabled Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 25/28] dpaa_eth: Remove unnecessary boolean expression in dpaa_get_headroom Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 26/28] sxgbe: Fix off by one in samsung driver strncpy size arg Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 27/28] iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint Sasha Levin
2020-03-18 20:55 ` [PATCH AUTOSEL 4.14 28/28] iommu/vt-d: Fix the wrong printing in RHSA parsing Sasha Levin

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=20200318205555.17447-17-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madalin.bucur@nxp.com \
    --cc=netdev@vger.kernel.org \
    --cc=stable@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 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).