From: netdev-bot+sashiko@kernel.org
To: brett.creeley@amd.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com, sln@onemain.com,
netdev@vger.kernel.org, horms@kernel.org,
vadim.fedorenko@linux.dev, nikhil.rao@amd.com,
eric.joyner@amd.com, leitao@debian.org,
ArunKumar.Prakash@amd.com
Subject: Re: [PATCH net-next v6 3/6] ionic: report the configured FEC mode in ethtool_fecparam.fec
Date: Thu, 26 Nov 2026 23:24:44 +0000 [thread overview]
Message-ID: <179573548438.3135.12554044368884679854@kernel.org> (raw)
In-Reply-To: <20261125-ionic-get-fec-stats-v6-3-1ab49c729c00@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 0
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] When port autoneg is on, ionic_get_fecparam() reports a stale
manual setting as the port's configured FEC.
--
ionic: report the configured FEC mode in ethtool_fecparam.fec
ionic_get_fecparam() used to set fec->fec to the constant
ETHTOOL_FEC_OFF | ETHTOOL_FEC_RS | ETHTOOL_FEC_BASER. With this patch it
sets fec->fec from port_info->config.fec_type, so only the configured FEC
mode is reported. fec->active_fec is still derived from config.fec_type.
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> index 16c6e4c9852e9..e7262a842eda4 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> @@ -432,17 +432,18 @@ static int ionic_get_fecparam(struct net_device *netdev,
> switch (lif->ionic->idev.port_info->config.fec_type) {
> case IONIC_PORT_FEC_TYPE_NONE:
> fec->active_fec = ETHTOOL_FEC_OFF;
> + fec->fec = ETHTOOL_FEC_OFF;
> break;
> case IONIC_PORT_FEC_TYPE_RS:
> fec->active_fec = ETHTOOL_FEC_RS;
> + fec->fec = ETHTOOL_FEC_RS;
> break;
> case IONIC_PORT_FEC_TYPE_FC:
> fec->active_fec = ETHTOOL_FEC_BASER;
> + fec->fec = ETHTOOL_FEC_BASER;
> break;
> }
[Severity: Medium]
Can this report an old manual setting as the configured FEC when
autoneg is enabled on the port?
fec->fec now comes only from config.fec_type, and config.an_enable is
never checked. With autoneg on, ETHTOOL_GFECPARAM and
ETHTOOL_MSG_FEC_GET would show one fixed mode (for example "Configured
FEC encodings: RS"). That mode is whatever was last set by hand.
ETHTOOL_FEC_AUTO is never reported.
The uAPI kernel-doc for struct ethtool_fecparam says:
* FEC settings are configured by link autonegotiation whenever it's enabled.
ionic_set_fecparam() also rejects FEC changes while autoneg is on:
if (lif->ionic->idev.port_info->config.an_enable) {
netdev_err(netdev, "FEC request not allowed while autoneg is enabled\n");
return -EINVAL;
}
Both suggest config.fec_type is not the policy in effect under autoneg.
The later patch in this series, "ionic: report the operational FEC mode
from ethtool --show-fec", describes config.fec_type on an autoneg link
as whatever was last programmed while the link negotiates something
else.
The problem still exists at the end of the series. There, active_fec
uses status.fec_type under autoneg through ionic_active_fec_type(), but
fec still has no autoneg check:
fec->active_fec = ionic_fec_type_to_ethtool(active_fec_type);
fec->fec = ionic_fec_type_to_ethtool(config_fec_type);
ionic_get_link_ksettings() does put config.fec_type into the advertised
FEC link modes. If firmware uses config.fec_type as the FEC request
during autoneg, reporting it here may be intended.
If it does not, should fec->fec report ETHTOOL_FEC_AUTO when
config.an_enable is set?
>
> - fec->fec = ETHTOOL_FEC_OFF | ETHTOOL_FEC_RS | ETHTOOL_FEC_BASER;
> -
> return 0;
> }
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125-ionic-get-fec-stats-v6-0-1ab49c729c00%40amd.com
next prev parent reply other threads:[~2026-11-26 23:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 23:22 [PATCH net-next v6 0/6] ionic: FEC reporting fixes and .get_fec_stats handler Brett Creeley
2026-11-25 23:22 ` [PATCH net-next v6 1/6] ionic: access the extra_stats counters one at a time Brett Creeley
2026-11-26 23:24 ` netdev-bot+sashiko
2026-11-25 23:22 ` [PATCH net-next v6 2/6] ionic: report FEC off as a supported link mode Brett Creeley
2026-11-25 23:22 ` [PATCH net-next v6 3/6] ionic: report the configured FEC mode in ethtool_fecparam.fec Brett Creeley
2026-11-26 23:24 ` netdev-bot+sashiko [this message]
2026-11-25 23:22 ` [PATCH net-next v6 4/6] ionic: map the FEC type through a helper in ionic_get_fecparam() Brett Creeley
2026-11-25 23:22 ` [PATCH net-next v6 5/6] ionic: report the operational FEC mode from ethtool --show-fec Brett Creeley
2026-11-25 23:22 ` [PATCH net-next v6 6/6] ionic: Add .get_fec_stats ethtool handler Brett Creeley
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=179573548438.3135.12554044368884679854@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=ArunKumar.Prakash@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=eric.joyner@amd.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=leitao@debian.org \
--cc=netdev@vger.kernel.org \
--cc=nikhil.rao@amd.com \
--cc=pabeni@redhat.com \
--cc=sln@onemain.com \
--cc=vadim.fedorenko@linux.dev \
/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