🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #14266

Re: [PATCH net-next v3 2/5] ionic: report the configured FEC mode in ethtool_fecparam.fec

#14266
From: Jakub Kicinski
Date: Tue, 10 Nov 2026 21:26
79 lines
10928 bytes
This is an AI-generated review of your patch. The human sending this
email has considered the AI review valid, or at least plausible.
---
ionic: report the configured FEC mode in ethtool_fecparam.fec

This patch changes ionic_get_fecparam() so that fec->fec reports only the
configured FEC mode from config.fec_type. Before, it reported the constant
Off | RS | BaseR. The commit message says supported modes are already
reported through ETHTOOL_GLINKSETTINGS by ionic_get_link_ksettings().

> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> index 119ac720c0787..317dbf96964ef 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> @@ -427,17 +427,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;

[ ... ]

> -	fec->fec = ETHTOOL_FEC_OFF | ETHTOOL_FEC_RS | ETHTOOL_FEC_BASER;
> -
>  	return 0;
>  }

[Severity: Medium]
With this line removed, does any ethtool interface still report FEC off as
an available mode on ionic?

The commit message says:

  Supported modes belong in ETHTOOL_GLINKSETTINGS, which
  ionic_get_link_ksettings() already fills.

But ionic_get_link_ksettings() only adds BaseR and RS to supported. It
never sets FEC_NONE:

drivers/net/ethernet/pensando/ionic/ionic_ethtool.c:ionic_get_link_ksettings() {
    ...
	ethtool_link_ksettings_add_link_mode(ks, supported, FEC_BASER);
	ethtool_link_ksettings_add_link_mode(ks, supported, FEC_RS);
	if (idev->port_info->config.fec_type == IONIC_PORT_FEC_TYPE_FC)
		ethtool_link_ksettings_add_link_mode(ks, advertising, FEC_BASER);
	else if (idev->port_info->config.fec_type == IONIC_PORT_FEC_TYPE_RS)
		ethtool_link_ksettings_add_link_mode(ks, advertising, FEC_RS);
    ...
}

When config.fec_type is IONIC_PORT_FEC_TYPE_NONE, advertising gets no FEC
bit at all.

The device does support FEC off. ionic_set_fecparam() maps both
ETHTOOL_FEC_NONE and ETHTOOL_FEC_OFF to IONIC_PORT_FEC_TYPE_NONE and
programs it through IONIC_PORT_ATTR_FEC.

After this patch, GFECPARAM can return ETHTOOL_FEC_OFF as the configured
mode, but GLINKSETTINGS never lists it as supported. Userspace that checks
the supported modes before configuring would conclude that off is not
available.

Should ionic_get_link_ksettings() add FEC_NONE to supported, and also to
advertising when config.fec_type is IONIC_PORT_FEC_TYPE_NONE? Drivers such
as ice, i40e, mlx5, bnxt, nfp, hns3, otx2 and fbnic set FEC_NONE in their
supported link modes.

A related issue is pre-existing and not introduced by this patch.
ionic_get_link_ksettings() hardcodes RS and BaseR as supported for every
transceiver and speed. It ignores the firmware's per-port list in
union ionic_port_identity.fec_type[4].

Because the commit now points to GLINKSETTINGS for supported modes, that
list may not match the hardware. As far as I can tell, no later patch in
the series touches ionic_get_link_ksettings().
-- 
pw-bot: cr
Technical Details
Message-ID: <20261110212621.2294782-1-kuba@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360628-linux-kernel-netdev=dewy.ru
References: <20261104-ionic-get-fec-stats-v3-2-b261fd53d0a7@amd.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360628-linux-kernel-netdev=dewy.ru
From: kuba@kernel.org (Jakub Kicinski)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v3 2/5] ionic: report the configured FEC mode in ethtool_fecparam.fec
Date: Tue, 10 Nov 2026 13:26:21 -0800
Organization: Usenet Network
Message-ID: <20261110212621.2294782-1-kuba@kernel.org>
References: <20261104-ionic-get-fec-stats-v3-2-b261fd53d0a7@amd.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="719568"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:qBlz3Jv/4rQxXevWS603FUdCsbI= sha256:MDsK2KyyUWVdVXa613ebFV6kQDwFXng3ZQ7lgAUlyu4=
	sha1:YeyKfyK/RE7/iwaUcu4KkNJZl3M= sha256:Vg/40ITdAflr+ejVw/9Y+L049FQFOXrNovbelIHZTJM=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 23A86113D8D; Wed, 11 Nov 2026 01:35:12 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id rinXFvqjR_iU;
	Wed, 11 Nov 2026 01:35:08 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-360628-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id CF1AC113D89; Wed, 11 Nov 2026 01:34:59 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id A425888358; Tue, 10 Nov 2026 21:26:25 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1794345985;
	b=21zHB7NvwKk0DtAyNBWtv2NhWMd1oVy0e+9H7HuQJu4EsvCjB2enp/jTlmJz34d2Hjmq
	 toWiaLT5yYURFvX/r+AEJMZ1V/5m3skQACyDfTLUq5JFK5bTJaAxG01SGeFhJGPwD9HEe
	 Jx82ETSIXbIfUPNJkE8MnUXWcT/jSU0hFM8N0wvpW0uFrckHI9oTFsQIPAn2BfVaPvesT
	 CYeYCCcrxwt4jG83ljQWuE6yiaXFWciolMNFErYHrw7OeP2vZzRJWxtsNBnTbtkjrRLci
	 54ztCGHt68okQMcGaPr7t/VztQ4xn3NkE2opqq9qWoZuHRnshdtgpRji+k2KeZIGH5Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794345985;
	h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:In-Reply-To:References:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding;
	bh=elJEGniw8cEJtzpkd97Q8eZqRe+d4waTPyywaEqRiGk=;
	b=Nq/fk83DpE41MPsg6WktmEgpbaNty9TeFhZKC45KSxroJR7//xMbn68uQy+0OJLSE/TM
	 byP0P9CEZYMMAQmqbwiTpPaBi4bSS3vRj8d9JqxIFrpd7KPrg4X2gH0sMxqsotiMveeSO
	 k2LuBWWpf+5XNmmiK5j0EdpwTKgyKr3gBw41aWKk4qRvugDXtKx3hmFi1M2SnE6j//eBL
	 iOim94E8EwQFBsOsbUKVMhgvEM0hh1sd503/9IhBeLl0dHoN2Pb9nHuMPALpde7JDDGqo
	 AXmpeolui/T0sgJCerZBZL44pyPCUE/4PPQK44DcoBcAmnC+dpro6PkOE463xmtSYnA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Pb247x3h;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id F2BA0606A32D;
	Tue, 10 Nov 2026 21:26:24 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Pb247x3h
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794345984;
	b=bTZR0R/WmKZkC1+fgMs637qNHlD434IyGTuaJY+7XtSPqt5gSMXwBM/Si+yqLJ9opm9B
	 M5RNc8Fjdc6GwBwrfBJkzyewMMAF70y+6jewEeK1ApOagCnZS4TwXG3OmLyNUxANIExbX
	 Gs0tj/z7+LcRY2mE9XZUUOZY0exFmFamUN9NQz2n1JoKiUHmhsHYMfsf8vaReMc6HDKr/
	 agLP7jGKih7ii9q9yeh+2pkGjlWVfRnVbBvUqeWvkVoM61UdRvFk46hvwuDcDaRqghZoq
	 /sldhIw+CgsAhTleuAIvLlJcB2jrHJBfO6IYMWGW8SNMAeETjnu/KScTRgr55z9QUKA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794345984;
	h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 In-Reply-To:References:MIME-Version:Content-Transfer-Encoding;
	bh=elJEGniw8cEJtzpkd97Q8eZqRe+d4waTPyywaEqRiGk=;
	b=Hjcx25pmcaWzoE9hl0wf1w4b8L4J2NjBoMLUfnctzZNPNKBbUpSZ6ePdzMj3p+in4msP
	 d1lq1EyL46wiDuSGB48Gdt8gwNrLqjGqYY+m61piF3SE25PaUjQZ6/2FC+lCeZNMurHy1
	 JAgXDVhsTmcpaMctYDOECEM97UsajnGPiiS7V+nTuea8gejGoY12t5SmpGvkS76U2lYsz
	 jCGOe1lD+jVIhGabsvPViusVrkGhbyNKU/Hw+FY+m5JeXQtvAu5hXGgplqgUjQA8ajDbM
	 iI8cp66/pn1L8sV1LRyQ/HGvLzW4ExDAvQBSmg0+sK0wWWSbkJitBvIay37c6Rx0TTA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Pb247x3h;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2A87606A31C
	for <netdev@vger.kernel.org>; Tue, 10 Nov 2026 21:26:23 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D4001F0089F;
	Tue, 10 Nov 2026 21:26:23 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794345983;
	bh=elJEGniw8cEJtzpkd97Q8eZqRe+d4waTPyywaEqRiGk=;
	h=From:To:Cc:Subject:Date:In-Reply-To:References;
	b=Pb247x3hBIoJqL+1D1ws6EHQLZlr3CbpjSxsI/Imtw1X0GT/wZimXmUXNee35vq6f
	 vIQP+ZMTcM2Xw1GeinJBT56gmNH6WRKl3r0QjHPjQ434ajBLyit4r04NhkhV9pkQXM
	 dHYNxngTAnE5t2O4y90+D5Zl7YoY4A/CMbxXB6kWRnLf7wIgQfCm/dBO4DyxT86Gu4
	 1L0kmOrunnFcDorLdVHE+1K6XDmhYZpD7rbep4gycUbl8G++KbkDX+3pXiWHRuJIE7
	 mgHco3bdkFtdOSV4Ax6cLtnxee4PT3cElYZZBs6qT36w/Qyjs3wyQghO0YCeDuBBTr
	 QzO9RwU08rUJA==
X-Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org,
	brett.creeley@amd.com,
	andrew+netdev@lunn.ch,
	davem@davemloft.net,
	pabeni@redhat.com,
	horms@kernel.org,
	vadim.fedorenko@linux.dev,
	nikhil.rao@amd.com,
	edumazet@kernel.org
X-Mailer: git-send-email 2.56.0
X-In-Reply-To: <20261104-ionic-get-fec-stats-v3-2-b261fd53d0a7@amd.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list