On Tue, Jun 16, 2026 at 10:05 AM Rakesh Kudurumalla
<[email protected]> wrote:
>
> Add ethdev FEC operations for cnxk NIX driver:
> - fec_get_capability: Report supported FEC modes per speed.
> If firmware provides supported FEC info, return actual
> capabilities for current link speed. Otherwise, fall back
> to a default capability table for common speeds.
> - fec_get: Query current FEC mode from link info
> - fec_set: Configure FEC mode on the link. AUTO mode
> defaults to Reed-Solomon FEC.
>
> Signed-off-by: Rakesh Kudurumalla <[email protected]>
> ---
> doc/guides/nics/cnxk.rst | 45 ++++++++++++++
> doc/guides/nics/features/cnxk.ini | 1 +
> drivers/net/cnxk/cnxk_ethdev.c | 3 +
> drivers/net/cnxk/cnxk_ethdev.h | 6 ++
> drivers/net/cnxk/cnxk_ethdev_ops.c | 94 ++++++++++++++++++++++++++++++
> 5 files changed, 149 insertions(+)
>
> +
> +.. note::
> +
> + ``rte_eth_fec_get_capability()`` and ``rte_eth_fec_set()`` are supported
> on
> + PF ports only. SR-IOV virtual function (VF) ports can use
> + ``rte_eth_fec_get()`` to read the current FEC mode from link status.
> +
> +Example usage:
> +
> +.. code-block:: c
> +
> + struct rte_eth_fec_capa capa[1];
> + uint32_t fec_capa;
> + int num, ret;
> +
> + num = rte_eth_fec_get_capability(port_id, capa, RTE_DIM(capa));
> + if (num > 0)
> + printf("FEC capa 0x%x at speed %u\n", capa[0].capa, capa[0].speed);
> +
> + ret = rte_eth_fec_get(port_id, &fec_capa);
> + if (ret == 0)
> + printf("Current FEC capa 0x%x\n", fec_capa);
> +
> + ret = rte_eth_fec_set(port_id, RTE_ETH_FEC_MODE_CAPA_MASK(RS));
> + if (ret)
> + printf("FEC set failed: %s\n", rte_strerror(-ret));
Removed this code snippet from cnxk.rst doc and applied the series to
dpdk-next-net-mrvl/for-main. Thanks