Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by netdev-bot+sashiko
Thu, 26 Nov 2026 23:24
Re: [PATCH net-next v6 3/6] ionic: report the configured FEC mode in ethtool_fecparam.fec
Author: netdev-bot+sashiko
Date: Thu, 26 Nov 2026 23:24
Date: Thu, 26 Nov 2026 23:24
93 lines
11507 bytes
11507 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads