From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id A404043CC0;
	Fri, 15 Mar 2024 22:48:18 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 66047402C9;
	Fri, 15 Mar 2024 22:48:18 +0100 (CET)
Received: from mail-qv1-f44.google.com (mail-qv1-f44.google.com
 [209.85.219.44]) by mails.dpdk.org (Postfix) with ESMTP id E3BFC4027B
 for <dev@dpdk.org>; Fri, 15 Mar 2024 22:48:16 +0100 (CET)
Received: by mail-qv1-f44.google.com with SMTP id
 6a1803df08f44-69185f093f5so3131386d6.3
 for <dev@dpdk.org>; Fri, 15 Mar 2024 14:48:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=broadcom.com; s=google; t=1710539296; x=1711144096; darn=dpdk.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=XepIR4oDtJevZq0GqbIZoI0uUV1cO2nnI7pNqQZquSA=;
 b=MWI+1uDAd7JTJA/7zkvAft2QLw3yjjNqYpXdLGp11oqGMX3R8Oiljjnm+MMPj8pgQL
 kB9rvpTVBhlDRcuqG1Ecc3+vHdbysiHX39Uv78nuOXiPMPZr/Jpd7vmTNrL5xWu/SlNn
 AWJwlw9BYAxHGGEkCwAzNsX+IzNiJ1c7Chj/s=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1710539296; x=1711144096;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=XepIR4oDtJevZq0GqbIZoI0uUV1cO2nnI7pNqQZquSA=;
 b=p/XTG3nUfbsvobQZIN74Txra7lTSrLMY9t6KYEmZ2pCL3ZzvRRe5sW9JHd6uEW6/gX
 b59LOsJ/QpHK5+p2wHRRUETueQZfeo6eJGpw+5h4FF0he7hWrz8pWAtw45vJptgaJQED
 N1Rq9FlHax0ndI98ey1oiY4K5EH0aJJ/Ak86LkpHUq5lkWuhLpx3xDnEFLiKZGfssaEt
 nAiyZ7+/6J4FTQZTF/+ReEzqj56OGLTOS5zfY3y84OzEh57AguxwA25OxmeVLIM+gBOI
 bZpoglcC2y/QR6NAn8Jx9dRcUi2gcYt64Yskn/7t9QFfr4K1KgGQry5FAefWlInoYkaq
 W8tA==
X-Gm-Message-State: AOJu0YwFodG/bq9wMdl1waM2zVAShqFNt+niIazwaiOFw1YZAKHc+PyU
 PQ9vWvYcT6fEdnxMpy4C3CySofKR2SF0aYkEwUWpprKLfP7MR4eghd3Zm8/LlVeiqQU4Jy1JPEi
 AwpO5x7NCbTpDR79qM6RU8/P+df0quDMu9h/CLDPX7pbDnLp/MwMt2ELgYaUa3PwmIQBimymeSB
 XWvFD3
X-Google-Smtp-Source: AGHT+IFFzFUwxFkeGCsvIzesPlIOK6HqRf7XwL91L5y4/+xz0TVX+4a0q9IKTQ1bwH1K30Di0RD/wFgrQUCZVqnepsw=
X-Received: by 2002:a05:6214:2b41:b0:68f:74f3:d571 with SMTP id
 jy1-20020a0562142b4100b0068f74f3d571mr5130339qvb.16.1710539296127; Fri, 15
 Mar 2024 14:48:16 -0700 (PDT)
MIME-Version: 1.0
References: <20240312075238.3319480-1-huangdengdui@huawei.com>
 <20240312075238.3319480-4-huangdengdui@huawei.com>
In-Reply-To: <20240312075238.3319480-4-huangdengdui@huawei.com>
From: Damodharam Ammepalli <damodharam.ammepalli@broadcom.com>
Date: Fri, 15 Mar 2024 14:47:38 -0700
Message-ID: <CAKSYD4x1K5NFBpwONzbm4tJTHbtKByAjk9xS__KNN_qUhbEdTg@mail.gmail.com>
Subject: Re: [PATCH 3/3] app/testpmd: support setting lanes
To: Dengdui Huang <huangdengdui@huawei.com>
Cc: dev@dpdk.org, ferruh.yigit@amd.com, aman.deep.singh@intel.com, 
 yuying.zhang@intel.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru, 
 liuyonglong@huawei.com, fengchengwen@huawei.com, haijie1@huawei.com, 
 lihuisong@huawei.com
Content-Type: multipart/signed; protocol="application/pkcs7-signature";
 micalg=sha-256; boundary="00000000000023c7870613b9f7b8"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

--00000000000023c7870613b9f7b8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Mar 12, 2024 at 12:52=E2=80=AFAM Dengdui Huang <huangdengdui@huawei=
.com> wrote:
>
> Extended speed command for setting lane number and
> Show info print lane number.
>
> Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
> ---
>  app/test-pmd/cmdline.c                      | 110 +++++++++++---------
>  app/test-pmd/config.c                       |  60 +++++++----
>  doc/guides/rel_notes/release_24_03.rst      |   1 +
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |   3 +-
>  4 files changed, 103 insertions(+), 71 deletions(-)
>
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
> index f521a1fe9e..e66daf4bba 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -1356,15 +1356,20 @@ struct cmd_config_speed_all {
>         cmdline_fixed_string_t keyword;
>         cmdline_fixed_string_t all;
>         cmdline_fixed_string_t item1;
> +       cmdline_fixed_string_t lanes_item;
>         cmdline_fixed_string_t item2;
>         cmdline_fixed_string_t value1;
> +       uint8_t lanes_value;
>         cmdline_fixed_string_t value2;
>  };
>
>  static int
> -parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *=
speed)
> +parse_and_check_speed_duplex(char *speedstr, uint8_t lanes, char *duplex=
str,
> +                            uint32_t *speed)
>  {
>
We internally implemented a similar feature, without changing the
existing testpmd speed cmd.
Instead of modifying the existing command set  we can have a  separate
cmd for the lanes
configuration similar to FEC configuration. Our internal
implementation looks something like this,
without affecting existing implementations.
testpmd> port stop 0
testpmd> port config 0 speed_lanes 4
testpmd> port config 0 speed 200000 duplex full
testpmd> port start 0
testpmd> show port summary 0
Number of available ports: 2
Port MAC Address       Name         Driver         Status   Link         La=
nes
0    14:23:F2:C3:BA:D2 0000:b1:00.0 net_bnxt       up  200 Gbps 4
testpmd>
testpmd> show port info 0

********************* Infos for port 0  *********************
MAC address: 14:23:F2:C3:BA:D2
Device name: 0000:b1:00.0
Driver name: net_bnxt
Firmware-version: 228.9.115.0
Connect to socket: 2
memory allocation on the socket: 2
Link status: up
Link speed: 200 Gbps
Lanes: 4
Link duplex: full-duplex
Autoneg status: Off

> +       uint32_t speed_num;
> +       char *endptr;
>         int duplex;
>
>         if (!strcmp(duplexstr, "half")) {
> @@ -1378,47 +1383,22 @@ parse_and_check_speed_duplex(char *speedstr, char=
 *duplexstr, uint32_t *speed)
>                 return -1;
>         }
>
> -       if (!strcmp(speedstr, "10")) {
> -               *speed =3D (duplex =3D=3D RTE_ETH_LINK_HALF_DUPLEX) ?
> -                               RTE_ETH_LINK_SPEED_10M_HD : RTE_ETH_LINK_=
SPEED_10M;
> -       } else if (!strcmp(speedstr, "100")) {
> -               *speed =3D (duplex =3D=3D RTE_ETH_LINK_HALF_DUPLEX) ?
> -                               RTE_ETH_LINK_SPEED_100M_HD : RTE_ETH_LINK=
_SPEED_100M;
> -       } else {
> -               if (duplex !=3D RTE_ETH_LINK_FULL_DUPLEX) {
> -                       fprintf(stderr, "Invalid speed/duplex parameters\=
n");
> -                       return -1;
> -               }
> -               if (!strcmp(speedstr, "1000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_1G;
> -               } else if (!strcmp(speedstr, "2500")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_2_5G;
> -               } else if (!strcmp(speedstr, "5000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_5G;
> -               } else if (!strcmp(speedstr, "10000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_10G;
> -               } else if (!strcmp(speedstr, "25000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_25G;
> -               } else if (!strcmp(speedstr, "40000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_40G;
> -               } else if (!strcmp(speedstr, "50000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_50G;
> -               } else if (!strcmp(speedstr, "100000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_100G;
> -               } else if (!strcmp(speedstr, "200000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_200G;
> -               } else if (!strcmp(speedstr, "400000")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_400G;
> -               } else if (!strcmp(speedstr, "auto")) {
> -                       *speed =3D RTE_ETH_LINK_SPEED_AUTONEG;
> -               } else {
> -                       fprintf(stderr, "Unknown speed parameter\n");
> -                       return -1;
> -               }
> +       if (!strcmp(speedstr, "auto")) {
> +               *speed =3D RTE_ETH_LINK_SPEED_AUTONEG;
> +               return 0;
>         }
>
> -       if (*speed !=3D RTE_ETH_LINK_SPEED_AUTONEG)
> -               *speed |=3D RTE_ETH_LINK_SPEED_FIXED;
> +       speed_num =3D strtol(speedstr, &endptr, 10);
> +       if (*endptr !=3D '\0') {
> +               fprintf(stderr, "Unknown speed parameter\n");
> +               return -1;
> +       }
> +
> +       *speed =3D rte_eth_speed_bitflag(speed_num, lanes, duplex);
> +       if (*speed =3D=3D 0) {
> +               fprintf(stderr, "param error\n");
> +               return -1;
> +       }
>
>         return 0;
>  }
> @@ -1429,19 +1409,27 @@ cmd_config_speed_all_parsed(void *parsed_result,
>                         __rte_unused void *data)
>  {
>         struct cmd_config_speed_all *res =3D parsed_result;
> +       struct rte_eth_dev_info dev_info;
>         uint32_t link_speed;
>         portid_t pid;
> +       int ret;
>
>         if (!all_ports_stopped()) {
>                 fprintf(stderr, "Please stop all ports first\n");
>                 return;
>         }
>
> -       if (parse_and_check_speed_duplex(res->value1, res->value2,
> -                       &link_speed) < 0)
> +       if (parse_and_check_speed_duplex(res->value1, res->lanes_value,
> +                                        res->value2, &link_speed) < 0)
>                 return;
>
>         RTE_ETH_FOREACH_DEV(pid) {
> +               ret =3D eth_dev_info_get_print_err(pid, &dev_info);
> +               if (ret !=3D 0)
> +                       return;
> +               if ((dev_info.dev_capa & RTE_ETH_DEV_CAPA_SETTING_LANES) =
=3D=3D 0)
> +                       fprintf(stderr, "The setting lane may not take ef=
fect because "
> +                                       "the port (%u) does not support i=
t\n", pid);
>                 ports[pid].dev_conf.link_speeds =3D link_speed;
>         }
>
> @@ -1460,6 +1448,11 @@ static cmdline_parse_token_string_t cmd_config_spe=
ed_all_item1 =3D
>  static cmdline_parse_token_string_t cmd_config_speed_all_value1 =3D
>         TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, value1,
>                                 "10#100#1000#2500#5000#10000#25000#40000#=
50000#100000#200000#400000#auto");
> +static cmdline_parse_token_string_t cmd_config_speed_all_lanes_item =3D
> +       TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, lanes_item,=
 "lanes");
> +static cmdline_parse_token_num_t cmd_config_speed_all_lanes_value =3D
> +       TOKEN_NUM_INITIALIZER(struct cmd_config_speed_all, lanes_value,
> +                             RTE_UINT8);
>  static cmdline_parse_token_string_t cmd_config_speed_all_item2 =3D
>         TOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item2, "dup=
lex");
>  static cmdline_parse_token_string_t cmd_config_speed_all_value2 =3D
> @@ -1470,14 +1463,16 @@ static cmdline_parse_inst_t cmd_config_speed_all =
=3D {
>         .f =3D cmd_config_speed_all_parsed,
>         .data =3D NULL,
>         .help_str =3D "port config all speed "
> -               "10|100|1000|2500|5000|10000|25000|40000|50000|100000|200=
000|400000|auto duplex "
> -                                                       "half|full|auto",
> +               "10|100|1000|2500|5000|10000|25000|40000|50000|100000|200=
000|400000|auto"
> +               " lanes 1|2|4|8 duplex half|full|auto",
>         .tokens =3D {
>                 (void *)&cmd_config_speed_all_port,
>                 (void *)&cmd_config_speed_all_keyword,
>                 (void *)&cmd_config_speed_all_all,
>                 (void *)&cmd_config_speed_all_item1,
>                 (void *)&cmd_config_speed_all_value1,
> +               (void *)&cmd_config_speed_all_lanes_item,
> +               (void *)&cmd_config_speed_all_lanes_value,
>                 (void *)&cmd_config_speed_all_item2,
>                 (void *)&cmd_config_speed_all_value2,
>                 NULL,
> @@ -1490,8 +1485,10 @@ struct cmd_config_speed_specific {
>         cmdline_fixed_string_t keyword;
>         portid_t id;
>         cmdline_fixed_string_t item1;
> +       cmdline_fixed_string_t lanes_item;
>         cmdline_fixed_string_t item2;
>         cmdline_fixed_string_t value1;
> +       uint8_t lanes_value;
>         cmdline_fixed_string_t value2;
>  };
>
> @@ -1501,7 +1498,9 @@ cmd_config_speed_specific_parsed(void *parsed_resul=
t,
>                                 __rte_unused void *data)
>  {
>         struct cmd_config_speed_specific *res =3D parsed_result;
> +       struct rte_eth_dev_info dev_info;
>         uint32_t link_speed;
> +       int ret;
>
>         if (port_id_is_invalid(res->id, ENABLED_WARN))
>                 return;
> @@ -1511,8 +1510,15 @@ cmd_config_speed_specific_parsed(void *parsed_resu=
lt,
>                 return;
>         }
>
> -       if (parse_and_check_speed_duplex(res->value1, res->value2,
> -                       &link_speed) < 0)
> +       ret =3D eth_dev_info_get_print_err(res->id, &dev_info);
> +       if (ret !=3D 0)
> +               return;
> +       if ((dev_info.dev_capa & RTE_ETH_DEV_CAPA_SETTING_LANES) =3D=3D 0=
)
> +               fprintf(stderr, "The setting lane may not take effect bec=
ause "
> +                               "the port (%d) does not support it\n", re=
s->id);
> +
> +       if (parse_and_check_speed_duplex(res->value1, res->lanes_value,
> +                                        res->value2, &link_speed) < 0)
>                 return;
>
>         ports[res->id].dev_conf.link_speeds =3D link_speed;
> @@ -1535,6 +1541,12 @@ static cmdline_parse_token_string_t cmd_config_spe=
ed_specific_item1 =3D
>  static cmdline_parse_token_string_t cmd_config_speed_specific_value1 =3D
>         TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, value1=
,
>                                 "10#100#1000#2500#5000#10000#25000#40000#=
50000#100000#200000#400000#auto");
> +static cmdline_parse_token_string_t cmd_config_speed_specific_lanes_item=
 =3D
> +       TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, lanes_=
item,
> +                                                               "lanes");
> +static cmdline_parse_token_num_t cmd_config_speed_specific_lanes_value =
=3D
> +       TOKEN_NUM_INITIALIZER(struct cmd_config_speed_specific, lanes_val=
ue,
> +                             RTE_UINT8);
>  static cmdline_parse_token_string_t cmd_config_speed_specific_item2 =3D
>         TOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2,
>                                                                 "duplex")=
;
> @@ -1546,14 +1558,16 @@ static cmdline_parse_inst_t cmd_config_speed_spec=
ific =3D {
>         .f =3D cmd_config_speed_specific_parsed,
>         .data =3D NULL,
>         .help_str =3D "port config <port_id> speed "
> -               "10|100|1000|2500|5000|10000|25000|40000|50000|100000|200=
000|400000|auto duplex "
> -                                                       "half|full|auto",
> +               "10|100|1000|2500|5000|10000|25000|40000|50000|100000|200=
000|400000|auto"
> +               " lanes 1|2|4|8 duplex half|full|auto",
>         .tokens =3D {
>                 (void *)&cmd_config_speed_specific_port,
>                 (void *)&cmd_config_speed_specific_keyword,
>                 (void *)&cmd_config_speed_specific_id,
>                 (void *)&cmd_config_speed_specific_item1,
>                 (void *)&cmd_config_speed_specific_value1,
> +               (void *)&cmd_config_speed_specific_lanes_item,
> +               (void *)&cmd_config_speed_specific_lanes_value,
>                 (void *)&cmd_config_speed_specific_item2,
>                 (void *)&cmd_config_speed_specific_value2,
>                 NULL,
> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
> index 968d2164ab..c104327878 100644
> --- a/app/test-pmd/config.c
> +++ b/app/test-pmd/config.c
> @@ -587,39 +587,51 @@ device_infos_display_speeds(uint32_t speed_capa)
>         if (speed_capa =3D=3D RTE_ETH_LINK_SPEED_AUTONEG)
>                 printf(" Autonegotiate (all speeds)");
>         if (speed_capa & RTE_ETH_LINK_SPEED_FIXED)
> -               printf(" Disable autonegotiate (fixed speed)  ");
> +               printf(" Disable autonegotiate (fixed speed) /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_10M_HD)
> -               printf(" 10 Mbps half-duplex  ");
> +               printf(" 10Mbps_1lane_half-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_10M)
> -               printf(" 10 Mbps full-duplex  ");
> +               printf(" 10Mbps_1lane_full-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_100M_HD)
> -               printf(" 100 Mbps half-duplex  ");
> +               printf(" 100Mbps_lane_half-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_100M)
> -               printf(" 100 Mbps full-duplex  ");
> +               printf(" 100Mbps_1lane_full-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_1G)
> -               printf(" 1 Gbps  ");
> +               printf(" 1Gbps_1lane_full-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_2_5G)
> -               printf(" 2.5 Gbps  ");
> +               printf(" 2.5Gbps_1lane_full-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_5G)
> -               printf(" 5 Gbps  ");
> +               printf(" 5Gbps_1lane_full-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_10G)
> -               printf(" 10 Gbps  ");
> -       if (speed_capa & RTE_ETH_LINK_SPEED_20G)
> -               printf(" 20 Gbps  ");
> +               printf(" 10Gbps_1lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_10G_4LANES)
> +               printf(" 10Gbps_4lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_20G_2LANES)
> +               printf(" 20Gbps_2lane_full-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_25G)
> -               printf(" 25 Gbps  ");
> -       if (speed_capa & RTE_ETH_LINK_SPEED_40G)
> -               printf(" 40 Gbps  ");
> +               printf(" 25Gbps_1lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_40G_4LANES)
> +               printf(" 40Gbps_4lane_full-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_50G)
> -               printf(" 50 Gbps  ");
> -       if (speed_capa & RTE_ETH_LINK_SPEED_56G)
> -               printf(" 56 Gbps  ");
> +               printf(" 50Gbps_1lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_50G_2LANES)
> +               printf(" 50Gbps_2lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_56G_4LANES)
> +               printf(" 56Gbps_4lane_full-duplex /");
>         if (speed_capa & RTE_ETH_LINK_SPEED_100G)
> -               printf(" 100 Gbps  ");
> -       if (speed_capa & RTE_ETH_LINK_SPEED_200G)
> -               printf(" 200 Gbps  ");
> -       if (speed_capa & RTE_ETH_LINK_SPEED_400G)
> -               printf(" 400 Gbps  ");
> +               printf(" 100Gbps_1lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_100G_2LANES)
> +               printf(" 100Gbps_2lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_100G_4LANES)
> +               printf(" 100Gbps_4lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_200G_4LANES)
> +               printf(" 200Gbps_4lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_200G_2LANES)
> +               printf(" 200Gbps_2lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_400G_4LANES)
> +               printf(" 400Gbps_4lane_full-duplex /");
> +       if (speed_capa & RTE_ETH_LINK_SPEED_400G_8LANES)
> +               printf(" 400Gbps_8lane_full-duplex /");
>  }
>
>  void
> @@ -828,6 +840,10 @@ port_infos_display(portid_t port_id)
>
>         printf("\nLink status: %s\n", (link.link_status) ? ("up") : ("dow=
n"));
>         printf("Link speed: %s\n", rte_eth_link_speed_to_str(link.link_sp=
eed));
> +       if (link.link_lanes =3D=3D 0)
> +               printf("Link lanes: unknown\n");
> +       else
> +               printf("Link lanes: %u\n", link.link_lanes);
>         printf("Link duplex: %s\n", (link.link_duplex =3D=3D RTE_ETH_LINK=
_FULL_DUPLEX) ?
>                ("full-duplex") : ("half-duplex"));
>         printf("Autoneg status: %s\n", (link.link_autoneg =3D=3D RTE_ETH_=
LINK_AUTONEG) ?
> diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_note=
s/release_24_03.rst
> index c17334ac25..46aceeee93 100644
> --- a/doc/guides/rel_notes/release_24_03.rst
> +++ b/doc/guides/rel_notes/release_24_03.rst
> @@ -79,6 +79,7 @@ New Features
>  * **Support setting lanes for ethdev.**
>    * Support setting lanes by extended ``RTE_ETH_LINK_SPEED_*``.
>    * Added function to convert bitmap flag to the struct of link speed in=
fo.
> +  ``rte_eth_speed_capa_to_info()``
>
>  * **Added hash calculation of an encapsulated packet as done by the HW.*=
*
>
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/tes=
tpmd_app_ug/testpmd_funcs.rst
> index 2fbf9220d8..087f7fe853 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -190,6 +190,7 @@ For example:
>     memory allocation on the socket: 0
>     Link status: up
>     Link speed: 40000 Mbps
> +   Link lanes: 4
>     Link duplex: full-duplex
>     Promiscuous mode: enabled
>     Allmulticast mode: disabled
> @@ -2065,7 +2066,7 @@ port config - speed
>  Set the speed and duplex mode for all ports or a specific port::
>
>     testpmd> port config (port_id|all) speed (10|100|1000|2500|5000|10000=
|25000|40000|50000|100000|200000|400000|auto) \
> -            duplex (half|full|auto)
> +            lanes 1|2|4|8 duplex (half|full|auto)
>
>  port config - queues/descriptors
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> --
> 2.33.0
>

--=20
This electronic communication and the information and any files transmitted=
=20
with it, or attached to it, are confidential and are intended solely for=20
the use of the individual or entity to whom it is addressed and may contain=
=20
information that is confidential, legally privileged, protected by privacy=
=20
laws, or otherwise restricted from disclosure to anyone else. If you are=20
not the intended recipient or the person responsible for delivering the=20
e-mail to the intended recipient, you are hereby notified that any use,=20
copying, distributing, dissemination, forwarding, printing, or copying of=
=20
this e-mail is strictly prohibited. If you received this e-mail in error,=
=20
please return the e-mail to the sender, delete it from your computer, and=
=20
destroy any printed copy of it.

--00000000000023c7870613b9f7b8
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIIQhQYJKoZIhvcNAQcCoIIQdjCCEHICAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg
gg3cMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD
VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE
AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT
AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS
MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZ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