[v2,0/6] support setting lanes

Message ID 20240322070923.244417-1-huangdengdui@huawei.com (mailing list archive)
Headers
Series support setting lanes |

Message

Dengdui Huang March 22, 2024, 7:09 a.m. UTC
  At the physical layer, multiple lanes are often used to work together
to achieve higher speeds. So a speeds can be achieved with different
number of lanes. For example, the following solutions can be used to
implement 100G:
1. Combines four 25G lanes
2. Combines two 50G lanes
3. A single 100G lane

It is assumed that two ports are interconnected and the two ports support
the above three solutions. But, we just configured the speed to 100G and
one port uses four 25G lanes by default and the other port uses two 50G lanes
by default, the port cannot be up. In this case, we need to configure the
ports to use the same solutions (for example, uses two 50G lanes) so that
the ports can be up.

This patch set add support setting lanes for ethdev. application can use
this feature to configure lanes to help select the same solutions.

In addition, modify the testpmd and hns3 driver to adapt to it.

change log:
v1->v2:
 - ethdev updata parse link mode info function name
 - hns3 driver modify report FEC capability
 - testpmd add a command to config speed with lanes
 - update UT and some code rectification

Dengdui Huang (6):
  ethdev: support setting lanes
  test: updated UT for setting lanes
  ethdev: add function to parse link mode info
  net/hns3: use parse link mode info function
  net/hns3: support setting lanes
  app/testpmd: support setting lanes

 app/test-pmd/cmdline.c                      | 199 +++++++++-----
 app/test-pmd/config.c                       |  78 ++++--
 app/test/test_ethdev_link.c                 |  18 +-
 doc/guides/rel_notes/release_24_03.rst      |  11 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |   9 +
 drivers/net/bnxt/bnxt_ethdev.c              |   3 +-
 drivers/net/hns3/hns3_cmd.h                 |  15 +-
 drivers/net/hns3/hns3_common.c              |   2 +
 drivers/net/hns3/hns3_ethdev.c              | 206 ++++++++------
 drivers/net/hns3/hns3_ethdev.h              |   2 +
 lib/ethdev/ethdev_linux_ethtool.c           | 208 +++++++-------
 lib/ethdev/ethdev_private.h                 |   4 +
 lib/ethdev/ethdev_trace.h                   |   4 +-
 lib/ethdev/meson.build                      |   2 +
 lib/ethdev/rte_ethdev.c                     | 284 ++++++++++++++++++--
 lib/ethdev/rte_ethdev.h                     | 104 +++++--
 lib/ethdev/version.map                      |   7 +
 17 files changed, 829 insertions(+), 327 deletions(-)