Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "A. Sverdlin" <alexander.sverdlin@siemens.com>
Cc: netdev@vger.kernel.org, Wei Fang <wei.fang@nxp.com>,
	Frank Li <frank.li@nxp.com>, Shenwei Wang <shenwei.wang@nxp.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	imx@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] net: fec: support RX flushing via an ethtool private flag
Date: Fri, 4 Sep 2026 18:20:56 -0700	[thread overview]
Message-ID: <20260904182056.0d81cf1f@kernel.org> (raw)
In-Reply-To: <20260901074732.113791-1-alexander.sverdlin@siemens.com>

On Tue,  1 Sep 2026 09:47:29 +0200 A. Sverdlin wrote:
> The FEC controller can flush the RX FIFO of an individual receive queue
> through the RX_FLUSHn bits of the FEC_QOS_SCHEME (ENET_QOS) register.
> 
> RX flushing prevents frames in the RX FIFO from being blocked. Blocking
> can occur when the frame at the head of the RX FIFO cannot be forwarded
> because the ring it is associated with cannot accept it, i.e. when the
> ring's RxBD[EMPTY] is not set or ENET_RDARn is not set. When RX flushing
> is enabled for a ring, such a blocking frame is flushed (discarded)
> instead of stalling the FIFO and holding up the other rings.
> 
> Expose this per-queue capability as a runtime ethtool private flag
> ("rx-flush-qN").
> 
> Due to erratum ERR050395 (observed e.g. on i.MX8QXP), enabling RX flushing
> on more than one queue at a time can lock up the receive path, so only a
> single queue may have flushing enabled.
> 
> According to i.MX8QXP Reference Manual, "when both class 1 and class 2 are
> disabled, RX flushing for these rings must also be disabled". Both RX and
> TX QoS classes are enabled via DMA_CLASS_EN bit, currently tied to
> num_tx_queues in the driver. Currently there are no constraints on
> num_tx_queues == num_rx_queues, neither in DT nor in the code, even though
> having different values doesn't make much sense even without RX flushing.
> RX flushing code just takes min() of the both values for now.

For the errata - how is the user supposed to pick a queue?
The documentation talks a lot about device specific terms instead of
using generic easily understood terms. IOW it reads like slop.

In general AFAIU the flushing should be enabled in tandem with pause
frames right now. It'd be great if we can stick to that, or failing
that add a generic config knob rather than private flags.
There's nothing private about the drop decision when host ring is empty

      parent reply	other threads:[~2026-09-05  1:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  7:47 [PATCH net-next v2] net: fec: support RX flushing via an ethtool private flag A. Sverdlin
2026-09-03  1:58 ` Wei Fang
2026-09-05  1:20 ` Jakub Kicinski [this message]

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=20260904182056.0d81cf1f@kernel.org \
    --to=kuba@kernel.org \
    --cc=alexander.sverdlin@siemens.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=frank.li@nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@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