netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Walle <michael@walle.cc>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Claudiu Manoil <claudiu.manoil@nxp.com>,
	Alexandru Marginean <alexandru.marginean@nxp.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>
Subject: Re: [PATCH v2 net 2/6] net: enetc: initialize RFS/RSS memories for unused ports too
Date: Sat, 27 Feb 2021 14:19:37 +0100	[thread overview]
Message-ID: <d8e5e57392fec5aff2b65beceda161ea@walle.cc> (raw)
In-Reply-To: <20210225121835.3864036-3-olteanv@gmail.com>

Am 2021-02-25 13:18, schrieb Vladimir Oltean:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> Michael reports that since linux-next-20210211, the AER messages for 
> ECC
> errors have started reappearing, and this time they can be reliably
> reproduced with the first ping on one of his LS1028A boards.
> 
> $ ping 1[   33.258069] pcieport 0000:00:1f.0: AER: Multiple Corrected
> error received: 0000:00:00.0
> 72.16.0.1
> PING [   33.267050] pcieport 0000:00:1f.0: AER: can't find device of 
> ID0000
> 172.16.0.1 (172.16.0.1): 56 data bytes
> 64 bytes from 172.16.0.1: seq=0 ttl=64 time=17.124 ms
> 64 bytes from 172.16.0.1: seq=1 ttl=64 time=0.273 ms
> 
> $ devmem 0x1f8010e10 32
> 0xC0000006
> 
> It isn't clear why this is necessary, but it seems that for the errors
> to go away, we must clear the entire RFS and RSS memory, not just for
> the ports in use.
> 
> Sadly the code is structured in such a way that we can't have unified
> logic for the used and unused ports. For the minimal initialization of
> an unused port, we need just to enable and ioremap the PF memory space,
> and a control buffer descriptor ring. Unused ports must then free the
> CBDR because the driver will exit, but used ports can not pick up from
> where that code path left, since the CBDR API does not reinitialize a
> ring when setting it up, so its producer and consumer indices are out 
> of
> sync between the software and hardware state. So a separate
> enetc_init_unused_port function was created, and it gets called right
> after the PF memory space is enabled.
> 
> Note that we need access from enetc_pf.c to the CBDR creation and
> deletion methods, which were for some reason put in enetc.c. While
> changing their definitions to be non-static, also move them to
> enetc_cbdr.c which seems like a better place to hold these.
> 
> Fixes: 07bf34a50e32 ("net: enetc: initialize the RFS and RSS memories")
> Reported-by: Michael Walle <michael@walle.cc>
> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

I had this patch in my tree for a while now. As we've learned, it
really depends on a particular power-up state for the error to happen.
So take this with a grain of salt: I haven't seen the error anymore,
albeit multiple power-cycles. Thus:

Tested-by: Michael Walle <michael@walle.cc>

  reply	other threads:[~2021-02-27 13:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-25 12:18 [PATCH v2 net 0/6] Fixes for NXP ENETC driver Vladimir Oltean
2021-02-25 12:18 ` [PATCH v2 net 1/6] net: enetc: don't overwrite the RSS indirection table when initializing Vladimir Oltean
2021-02-25 12:18 ` [PATCH v2 net 2/6] net: enetc: initialize RFS/RSS memories for unused ports too Vladimir Oltean
2021-02-27 13:19   ` Michael Walle [this message]
2021-02-25 12:18 ` [PATCH v2 net 3/6] net: enetc: take the MDIO lock only once per NAPI poll cycle Vladimir Oltean
2021-02-25 22:52   ` Andrew Lunn
2021-02-25 23:00     ` Vladimir Oltean
2021-02-25 23:08       ` Vladimir Oltean
2021-02-25 12:18 ` [PATCH v2 net 4/6] net: enetc: fix incorrect TPID when receiving 802.1ad tagged packets Vladimir Oltean
2021-02-25 12:18 ` [PATCH v2 net 5/6] net: enetc: don't disable VLAN filtering in IFF_PROMISC mode Vladimir Oltean
2021-02-26 23:28   ` Jakub Kicinski
2021-02-26 23:42     ` Vladimir Oltean
2021-02-26 23:49       ` Jakub Kicinski
2021-02-27  0:16         ` Vladimir Oltean
2021-02-27  0:45           ` Jakub Kicinski
2021-02-27  0:49             ` Vladimir Oltean
2021-02-27 13:18           ` Michael Walle
2021-02-28 22:48             ` Vladimir Oltean
2021-03-01 14:36               ` Michael Walle
2021-03-01 15:08                 ` Vladimir Oltean
2021-03-01 16:26                   ` Markus Blöchl
2021-03-01 17:02                     ` Vladimir Oltean
2021-03-01 20:17                       ` Jakub Kicinski
2021-02-25 12:18 ` [PATCH v2 net 6/6] net: enetc: force the RGMII speed and duplex instead of operating in inband mode Vladimir Oltean
2021-02-25 17:14   ` Russell King - ARM Linux admin

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=d8e5e57392fec5aff2b65beceda161ea@walle.cc \
    --to=michael@walle.cc \
    --cc=alexandru.marginean@nxp.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /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).