mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: wei.fang@oss.nxp.com
Cc: claudiu.manoil@nxp.com, vladimir.oltean@nxp.com,
	xiaoning.wang@nxp.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, Frank.Li@nxp.com, wei.fang@nxp.com,
	imx@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net 0/2] net: enetc: restore RX ring congestion mode after ring reconfiguration
Date: Mon, 24 Aug 2026 14:15:05 +0100	[thread overview]
Message-ID: <20260824131505.GU265046@horms.kernel.org> (raw)
In-Reply-To: <20260821064140.1315611-1-wei.fang@oss.nxp.com>

On Fri, Aug 21, 2026 at 02:41:38PM +0800, wei.fang@oss.nxp.com wrote:
> From: Wei Fang <wei.fang@nxp.com>
> 
> The RX BD ring congestion mode (CM) enables the ENETC MAC to generate
> PAUSE frames when ingress congestion occurs. It is configured only in
> the phylink .mac_link_up() callback, which is invoked when the link
> status changes.
> 
> However, enetc_reconfigure() tears down and re-creates the RX BD rings
> at runtime without any link status change, for example when enabling or
> disabling PTP RX hardware timestamping. enetc_setup_rxbdr() rebuilds the
> RBMR register from zero, which clears the CM bit, and since the link
> status does not change, .mac_link_up() is not called again to restore
> it. As a result, flow control silently stops working after such a
> reconfiguration.
> 
> To solve this issue, track the desired CM state in a software flag
> ENETC_RXBDR_CM, which is maintained by the .mac_link_up() /
> .mac_link_down() callbacks and consulted by enetc_setup_rxbdr() when the
> RX BD rings are (re)configured. Both ENETC v1 and ENETC v4 are affected
> and are fixed in the same way.
> 
> ---
> v2:
> 1. Add a generic helper enetc_set_congestion_mode() to set the
>    congestion mode of the SI's RX BD rings
> 2. Move the setting of ENETC_RBMR from enetc_setup_rxbdr() to
>    enetc_enable_rxbdr()
> 3. Add gen_lock to struct enetc_si to prevent concurrent access to
>    ENETC_RBMR and the ENETC_RXBDR_CM bit of priv->flags
> v1 link: https://lore.kernel.org/imx/20260728023217.2499420-1-wei.fang@oss.nxp.com/

Thanks for the updates.

The AI-generated reviews provided by sashiko-bot elsewhere in this
thread appear to relate to pre-existing issues that I don't believe
should impact the progress of this patch.

For the series:
Reviewed-by: Simon Horman <horms@kernel.org>

  parent reply	other threads:[~2026-08-24 13:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21  6:41 wei.fang
2026-08-21  6:41 ` [PATCH v2 net 1/2] " wei.fang
2026-08-21  6:41 ` [PATCH v2 net 2/2] net: enetc: restore RX ring congestion mode for ENETC v4 wei.fang
2026-08-24 13:15 ` Simon Horman [this message]
2026-08-24 19:00 ` [PATCH v2 net 0/2] net: enetc: restore RX ring congestion mode after ring reconfiguration patchwork-bot+netdevbpf

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=20260824131505.GU265046@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=wei.fang@oss.nxp.com \
    --cc=xiaoning.wang@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

all inboxes | Powered by JetHome®