From: Ivan Malov <ivan.malov@arknetworks.am>
To: dev@dpdk.org
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Andy Moreton <andy.moreton@amd.com>,
Pieter Jansen Van Vuuren <pieter.jansen-van-vuuren@amd.com>,
Viacheslav Galaktionov <viacheslav.galaktionov@arknetworks.am>,
stable@dpdk.org
Subject: [PATCH 8/9] net/sfc: drop AUTO from FEC capabilities and fix the comment
Date: Tue, 30 Dec 2025 01:35:26 +0400 [thread overview]
Message-ID: <20251229213527.37907-9-ivan.malov@arknetworks.am> (raw)
In-Reply-To: <20251229213527.37907-1-ivan.malov@arknetworks.am>
AUTO is not a capability. It is rather a special value. Do not indicate it.
Also, improve the comment to explain this change and the overall principle.
Fixes: b526903f308e ("net/sfc: offer support for 200G link ability on new adaptors")
Fixes: 5efa8fc1cfc0 ("net/sfc: support FEC feature")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@arknetworks.am>
Reviewed-by: Andy Moreton <andy.moreton@amd.com>
---
drivers/net/sfc/sfc_ethdev.c | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index fc759f52fe..7c2abaab6b 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -2517,18 +2517,20 @@ sfc_fec_get_capa_speed_to_fec(uint32_t supported_caps,
rs = true;
/*
- * NOFEC and AUTO FEC modes are always supported.
- * FW does not provide information about the supported
- * FEC modes per the link speed.
- * Supported FEC depends on supported link speeds and
- * supported FEC modes by a device.
+ * NOFEC can always be requested, but if the link technology for the
+ * intended speed mandates FEC, doing so will not bring the link up.
+ *
+ * FW cannot report supported FEC modes per speed/link technology,
+ * so use best-effort approximation to fill in the capabilities.
+ *
+ * Do not indicate 'AUTO'. This bit is reserved for user
+ * input. It has nothing to do with capability reporting.
*/
if (supported_caps & (1u << EFX_PHY_CAP_10000FDX)) {
if (speed_fec_capa != NULL) {
speed_fec_capa[num].speed = RTE_ETH_SPEED_NUM_10G;
speed_fec_capa[num].capa =
- RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
- RTE_ETH_FEC_MODE_CAPA_MASK(AUTO);
+ RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC);
if (baser) {
speed_fec_capa[num].capa |=
RTE_ETH_FEC_MODE_CAPA_MASK(BASER);
@@ -2540,8 +2542,7 @@ sfc_fec_get_capa_speed_to_fec(uint32_t supported_caps,
if (speed_fec_capa != NULL) {
speed_fec_capa[num].speed = RTE_ETH_SPEED_NUM_25G;
speed_fec_capa[num].capa =
- RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
- RTE_ETH_FEC_MODE_CAPA_MASK(AUTO);
+ RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC);
if (baser) {
speed_fec_capa[num].capa |=
RTE_ETH_FEC_MODE_CAPA_MASK(BASER);
@@ -2557,8 +2558,7 @@ sfc_fec_get_capa_speed_to_fec(uint32_t supported_caps,
if (speed_fec_capa != NULL) {
speed_fec_capa[num].speed = RTE_ETH_SPEED_NUM_40G;
speed_fec_capa[num].capa =
- RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
- RTE_ETH_FEC_MODE_CAPA_MASK(AUTO);
+ RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC);
if (baser) {
speed_fec_capa[num].capa |=
RTE_ETH_FEC_MODE_CAPA_MASK(BASER);
@@ -2570,8 +2570,7 @@ sfc_fec_get_capa_speed_to_fec(uint32_t supported_caps,
if (speed_fec_capa != NULL) {
speed_fec_capa[num].speed = RTE_ETH_SPEED_NUM_50G;
speed_fec_capa[num].capa =
- RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
- RTE_ETH_FEC_MODE_CAPA_MASK(AUTO);
+ RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC);
if (baser) {
speed_fec_capa[num].capa |=
RTE_ETH_FEC_MODE_CAPA_MASK(BASER);
@@ -2587,8 +2586,7 @@ sfc_fec_get_capa_speed_to_fec(uint32_t supported_caps,
if (speed_fec_capa != NULL) {
speed_fec_capa[num].speed = RTE_ETH_SPEED_NUM_100G;
speed_fec_capa[num].capa =
- RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
- RTE_ETH_FEC_MODE_CAPA_MASK(AUTO);
+ RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC);
if (rs) {
speed_fec_capa[num].capa |=
RTE_ETH_FEC_MODE_CAPA_MASK(RS);
@@ -2600,8 +2598,7 @@ sfc_fec_get_capa_speed_to_fec(uint32_t supported_caps,
if (speed_fec_capa != NULL) {
speed_fec_capa[num].speed = RTE_ETH_SPEED_NUM_200G;
speed_fec_capa[num].capa =
- RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC) |
- RTE_ETH_FEC_MODE_CAPA_MASK(AUTO);
+ RTE_ETH_FEC_MODE_CAPA_MASK(NOFEC);
if (rs) {
speed_fec_capa[num].capa |=
RTE_ETH_FEC_MODE_CAPA_MASK(RS);
--
2.47.3
next prev parent reply other threads:[~2025-12-29 21:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251229213527.37907-1-ivan.malov@arknetworks.am>
2025-12-29 21:35 ` [PATCH 2/9] common/sfc_efx/base: fix flow control setting on legacy MCDI Ivan Malov
2025-12-29 21:35 ` [PATCH 3/9] common/sfc_efx/base: fix indication of requestable FEC flags Ivan Malov
2025-12-29 21:35 ` [PATCH 6/9] net/sfc: avoid speed reset when setting FEC in started state Ivan Malov
2025-12-29 21:35 ` [PATCH 7/9] net/sfc: rework the capability check that is done on FEC set Ivan Malov
2025-12-29 21:35 ` Ivan Malov [this message]
2025-12-29 21:35 ` [PATCH 9/9] net/sfc: fix reporting status of autonegotiation to the user Ivan Malov
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=20251229213527.37907-9-ivan.malov@arknetworks.am \
--to=ivan.malov@arknetworks.am \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=andy.moreton@amd.com \
--cc=dev@dpdk.org \
--cc=pieter.jansen-van-vuuren@amd.com \
--cc=stable@dpdk.org \
--cc=viacheslav.galaktionov@arknetworks.am \
/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;
as well as URLs for NNTP newsgroup(s).