get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/138203/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 138203,
    "url": "https://patches.dpdk.org/api/patches/138203/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20240312075238.3319480-4-huangdengdui@huawei.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240312075238.3319480-4-huangdengdui@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240312075238.3319480-4-huangdengdui@huawei.com",
    "date": "2024-03-12T07:52:38",
    "name": "[3/3] app/testpmd: support setting lanes",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "a2301412a18d5452a205f4a26598ca5eafefbdfc",
    "submitter": {
        "id": 3066,
        "url": "https://patches.dpdk.org/api/people/3066/?format=api",
        "name": "huangdengdui",
        "email": "huangdengdui@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20240312075238.3319480-4-huangdengdui@huawei.com/mbox/",
    "series": [
        {
            "id": 31471,
            "url": "https://patches.dpdk.org/api/series/31471/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=31471",
            "date": "2024-03-12T07:52:35",
            "name": "support setting lanes",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/31471/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/138203/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/138203/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D081043C8E;\n\tTue, 12 Mar 2024 08:52:54 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EEBA9427E0;\n\tTue, 12 Mar 2024 08:52:45 +0100 (CET)",
            "from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191])\n by mails.dpdk.org (Postfix) with ESMTP id ECBD440EE3\n for <dev@dpdk.org>; Tue, 12 Mar 2024 08:52:40 +0100 (CET)",
            "from mail.maildlp.com (unknown [172.19.163.44])\n by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Tv5Qs2rYWz1h20D;\n Tue, 12 Mar 2024 15:50:13 +0800 (CST)",
            "from dggpeml500011.china.huawei.com (unknown [7.185.36.84])\n by mail.maildlp.com (Postfix) with ESMTPS id 7BBBF14040F;\n Tue, 12 Mar 2024 15:52:39 +0800 (CST)",
            "from localhost.huawei.com (10.50.165.33) by\n dggpeml500011.china.huawei.com (7.185.36.84) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.1.2507.35; Tue, 12 Mar 2024 15:52:39 +0800"
        ],
        "From": "Dengdui Huang <huangdengdui@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<ferruh.yigit@amd.com>, <aman.deep.singh@intel.com>,\n <yuying.zhang@intel.com>, <thomas@monjalon.net>,\n <andrew.rybchenko@oktetlabs.ru>, <liuyonglong@huawei.com>,\n <fengchengwen@huawei.com>, <haijie1@huawei.com>, <lihuisong@huawei.com>",
        "Subject": "[PATCH 3/3] app/testpmd: support setting lanes",
        "Date": "Tue, 12 Mar 2024 15:52:38 +0800",
        "Message-ID": "<20240312075238.3319480-4-huangdengdui@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20240312075238.3319480-1-huangdengdui@huawei.com>",
        "References": "<20240312075238.3319480-1-huangdengdui@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.50.165.33]",
        "X-ClientProxiedBy": "dggems706-chm.china.huawei.com (10.3.19.183) To\n dggpeml500011.china.huawei.com (7.185.36.84)",
        "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>,\n <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>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Extended speed command for setting lane number and\nShow info print lane number.\n\nSigned-off-by: Dengdui Huang <huangdengdui@huawei.com>\n---\n app/test-pmd/cmdline.c                      | 110 +++++++++++---------\n app/test-pmd/config.c                       |  60 +++++++----\n doc/guides/rel_notes/release_24_03.rst      |   1 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |   3 +-\n 4 files changed, 103 insertions(+), 71 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex f521a1fe9e..e66daf4bba 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -1356,15 +1356,20 @@ struct cmd_config_speed_all {\n \tcmdline_fixed_string_t keyword;\n \tcmdline_fixed_string_t all;\n \tcmdline_fixed_string_t item1;\n+\tcmdline_fixed_string_t lanes_item;\n \tcmdline_fixed_string_t item2;\n \tcmdline_fixed_string_t value1;\n+\tuint8_t lanes_value;\n \tcmdline_fixed_string_t value2;\n };\n \n static int\n-parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)\n+parse_and_check_speed_duplex(char *speedstr, uint8_t lanes, char *duplexstr,\n+\t\t\t     uint32_t *speed)\n {\n \n+\tuint32_t speed_num;\n+\tchar *endptr;\n \tint duplex;\n \n \tif (!strcmp(duplexstr, \"half\")) {\n@@ -1378,47 +1383,22 @@ parse_and_check_speed_duplex(char *speedstr, char *duplexstr, uint32_t *speed)\n \t\treturn -1;\n \t}\n \n-\tif (!strcmp(speedstr, \"10\")) {\n-\t\t*speed = (duplex == RTE_ETH_LINK_HALF_DUPLEX) ?\n-\t\t\t\tRTE_ETH_LINK_SPEED_10M_HD : RTE_ETH_LINK_SPEED_10M;\n-\t} else if (!strcmp(speedstr, \"100\")) {\n-\t\t*speed = (duplex == RTE_ETH_LINK_HALF_DUPLEX) ?\n-\t\t\t\tRTE_ETH_LINK_SPEED_100M_HD : RTE_ETH_LINK_SPEED_100M;\n-\t} else {\n-\t\tif (duplex != RTE_ETH_LINK_FULL_DUPLEX) {\n-\t\t\tfprintf(stderr, \"Invalid speed/duplex parameters\\n\");\n-\t\t\treturn -1;\n-\t\t}\n-\t\tif (!strcmp(speedstr, \"1000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_1G;\n-\t\t} else if (!strcmp(speedstr, \"2500\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_2_5G;\n-\t\t} else if (!strcmp(speedstr, \"5000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_5G;\n-\t\t} else if (!strcmp(speedstr, \"10000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_10G;\n-\t\t} else if (!strcmp(speedstr, \"25000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_25G;\n-\t\t} else if (!strcmp(speedstr, \"40000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_40G;\n-\t\t} else if (!strcmp(speedstr, \"50000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_50G;\n-\t\t} else if (!strcmp(speedstr, \"100000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_100G;\n-\t\t} else if (!strcmp(speedstr, \"200000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_200G;\n-\t\t} else if (!strcmp(speedstr, \"400000\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_400G;\n-\t\t} else if (!strcmp(speedstr, \"auto\")) {\n-\t\t\t*speed = RTE_ETH_LINK_SPEED_AUTONEG;\n-\t\t} else {\n-\t\t\tfprintf(stderr, \"Unknown speed parameter\\n\");\n-\t\t\treturn -1;\n-\t\t}\n+\tif (!strcmp(speedstr, \"auto\")) {\n+\t\t*speed = RTE_ETH_LINK_SPEED_AUTONEG;\n+\t\treturn 0;\n \t}\n \n-\tif (*speed != RTE_ETH_LINK_SPEED_AUTONEG)\n-\t\t*speed |= RTE_ETH_LINK_SPEED_FIXED;\n+\tspeed_num = strtol(speedstr, &endptr, 10);\n+\tif (*endptr != '\\0') {\n+\t\tfprintf(stderr, \"Unknown speed parameter\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\t*speed = rte_eth_speed_bitflag(speed_num, lanes, duplex);\n+\tif (*speed == 0) {\n+\t\tfprintf(stderr, \"param error\\n\");\n+\t\treturn -1;\n+\t}\n \n \treturn 0;\n }\n@@ -1429,19 +1409,27 @@ cmd_config_speed_all_parsed(void *parsed_result,\n \t\t\t__rte_unused void *data)\n {\n \tstruct cmd_config_speed_all *res = parsed_result;\n+\tstruct rte_eth_dev_info dev_info;\n \tuint32_t link_speed;\n \tportid_t pid;\n+\tint ret;\n \n \tif (!all_ports_stopped()) {\n \t\tfprintf(stderr, \"Please stop all ports first\\n\");\n \t\treturn;\n \t}\n \n-\tif (parse_and_check_speed_duplex(res->value1, res->value2,\n-\t\t\t&link_speed) < 0)\n+\tif (parse_and_check_speed_duplex(res->value1, res->lanes_value,\n+\t\t\t\t\t res->value2, &link_speed) < 0)\n \t\treturn;\n \n \tRTE_ETH_FOREACH_DEV(pid) {\n+\t\tret = eth_dev_info_get_print_err(pid, &dev_info);\n+\t\tif (ret != 0)\n+\t\t\treturn;\n+\t\tif ((dev_info.dev_capa & RTE_ETH_DEV_CAPA_SETTING_LANES) == 0)\n+\t\t\tfprintf(stderr, \"The setting lane may not take effect because \"\n+\t\t\t\t\t\"the port (%u) does not support it\\n\", pid);\n \t\tports[pid].dev_conf.link_speeds = link_speed;\n \t}\n \n@@ -1460,6 +1448,11 @@ static cmdline_parse_token_string_t cmd_config_speed_all_item1 =\n static cmdline_parse_token_string_t cmd_config_speed_all_value1 =\n \tTOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, value1,\n \t\t\t\t\"10#100#1000#2500#5000#10000#25000#40000#50000#100000#200000#400000#auto\");\n+static cmdline_parse_token_string_t cmd_config_speed_all_lanes_item =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, lanes_item, \"lanes\");\n+static cmdline_parse_token_num_t cmd_config_speed_all_lanes_value =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_config_speed_all, lanes_value,\n+\t\t\t      RTE_UINT8);\n static cmdline_parse_token_string_t cmd_config_speed_all_item2 =\n \tTOKEN_STRING_INITIALIZER(struct cmd_config_speed_all, item2, \"duplex\");\n static cmdline_parse_token_string_t cmd_config_speed_all_value2 =\n@@ -1470,14 +1463,16 @@ static cmdline_parse_inst_t cmd_config_speed_all = {\n \t.f = cmd_config_speed_all_parsed,\n \t.data = NULL,\n \t.help_str = \"port config all speed \"\n-\t\t\"10|100|1000|2500|5000|10000|25000|40000|50000|100000|200000|400000|auto duplex \"\n-\t\t\t\t\t\t\t\"half|full|auto\",\n+\t\t\"10|100|1000|2500|5000|10000|25000|40000|50000|100000|200000|400000|auto\"\n+\t\t\" lanes 1|2|4|8 duplex half|full|auto\",\n \t.tokens = {\n \t\t(void *)&cmd_config_speed_all_port,\n \t\t(void *)&cmd_config_speed_all_keyword,\n \t\t(void *)&cmd_config_speed_all_all,\n \t\t(void *)&cmd_config_speed_all_item1,\n \t\t(void *)&cmd_config_speed_all_value1,\n+\t\t(void *)&cmd_config_speed_all_lanes_item,\n+\t\t(void *)&cmd_config_speed_all_lanes_value,\n \t\t(void *)&cmd_config_speed_all_item2,\n \t\t(void *)&cmd_config_speed_all_value2,\n \t\tNULL,\n@@ -1490,8 +1485,10 @@ struct cmd_config_speed_specific {\n \tcmdline_fixed_string_t keyword;\n \tportid_t id;\n \tcmdline_fixed_string_t item1;\n+\tcmdline_fixed_string_t lanes_item;\n \tcmdline_fixed_string_t item2;\n \tcmdline_fixed_string_t value1;\n+\tuint8_t lanes_value;\n \tcmdline_fixed_string_t value2;\n };\n \n@@ -1501,7 +1498,9 @@ cmd_config_speed_specific_parsed(void *parsed_result,\n \t\t\t\t__rte_unused void *data)\n {\n \tstruct cmd_config_speed_specific *res = parsed_result;\n+\tstruct rte_eth_dev_info dev_info;\n \tuint32_t link_speed;\n+\tint ret;\n \n \tif (port_id_is_invalid(res->id, ENABLED_WARN))\n \t\treturn;\n@@ -1511,8 +1510,15 @@ cmd_config_speed_specific_parsed(void *parsed_result,\n \t\treturn;\n \t}\n \n-\tif (parse_and_check_speed_duplex(res->value1, res->value2,\n-\t\t\t&link_speed) < 0)\n+\tret = eth_dev_info_get_print_err(res->id, &dev_info);\n+\tif (ret != 0)\n+\t\treturn;\n+\tif ((dev_info.dev_capa & RTE_ETH_DEV_CAPA_SETTING_LANES) == 0)\n+\t\tfprintf(stderr, \"The setting lane may not take effect because \"\n+\t\t\t\t\"the port (%d) does not support it\\n\", res->id);\n+\n+\tif (parse_and_check_speed_duplex(res->value1, res->lanes_value,\n+\t\t\t\t\t res->value2, &link_speed) < 0)\n \t\treturn;\n \n \tports[res->id].dev_conf.link_speeds = link_speed;\n@@ -1535,6 +1541,12 @@ static cmdline_parse_token_string_t cmd_config_speed_specific_item1 =\n static cmdline_parse_token_string_t cmd_config_speed_specific_value1 =\n \tTOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, value1,\n \t\t\t\t\"10#100#1000#2500#5000#10000#25000#40000#50000#100000#200000#400000#auto\");\n+static cmdline_parse_token_string_t cmd_config_speed_specific_lanes_item =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, lanes_item,\n+\t\t\t\t\t\t\t\t\"lanes\");\n+static cmdline_parse_token_num_t cmd_config_speed_specific_lanes_value =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_config_speed_specific, lanes_value,\n+\t\t\t      RTE_UINT8);\n static cmdline_parse_token_string_t cmd_config_speed_specific_item2 =\n \tTOKEN_STRING_INITIALIZER(struct cmd_config_speed_specific, item2,\n \t\t\t\t\t\t\t\t\"duplex\");\n@@ -1546,14 +1558,16 @@ static cmdline_parse_inst_t cmd_config_speed_specific = {\n \t.f = cmd_config_speed_specific_parsed,\n \t.data = NULL,\n \t.help_str = \"port config <port_id> speed \"\n-\t\t\"10|100|1000|2500|5000|10000|25000|40000|50000|100000|200000|400000|auto duplex \"\n-\t\t\t\t\t\t\t\"half|full|auto\",\n+\t\t\"10|100|1000|2500|5000|10000|25000|40000|50000|100000|200000|400000|auto\"\n+\t\t\" lanes 1|2|4|8 duplex half|full|auto\",\n \t.tokens = {\n \t\t(void *)&cmd_config_speed_specific_port,\n \t\t(void *)&cmd_config_speed_specific_keyword,\n \t\t(void *)&cmd_config_speed_specific_id,\n \t\t(void *)&cmd_config_speed_specific_item1,\n \t\t(void *)&cmd_config_speed_specific_value1,\n+\t\t(void *)&cmd_config_speed_specific_lanes_item,\n+\t\t(void *)&cmd_config_speed_specific_lanes_value,\n \t\t(void *)&cmd_config_speed_specific_item2,\n \t\t(void *)&cmd_config_speed_specific_value2,\n \t\tNULL,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 968d2164ab..c104327878 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -587,39 +587,51 @@ device_infos_display_speeds(uint32_t speed_capa)\n \tif (speed_capa == RTE_ETH_LINK_SPEED_AUTONEG)\n \t\tprintf(\" Autonegotiate (all speeds)\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_FIXED)\n-\t\tprintf(\" Disable autonegotiate (fixed speed)  \");\n+\t\tprintf(\" Disable autonegotiate (fixed speed) /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_10M_HD)\n-\t\tprintf(\" 10 Mbps half-duplex  \");\n+\t\tprintf(\" 10Mbps_1lane_half-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_10M)\n-\t\tprintf(\" 10 Mbps full-duplex  \");\n+\t\tprintf(\" 10Mbps_1lane_full-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_100M_HD)\n-\t\tprintf(\" 100 Mbps half-duplex  \");\n+\t\tprintf(\" 100Mbps_lane_half-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_100M)\n-\t\tprintf(\" 100 Mbps full-duplex  \");\n+\t\tprintf(\" 100Mbps_1lane_full-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_1G)\n-\t\tprintf(\" 1 Gbps  \");\n+\t\tprintf(\" 1Gbps_1lane_full-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_2_5G)\n-\t\tprintf(\" 2.5 Gbps  \");\n+\t\tprintf(\" 2.5Gbps_1lane_full-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_5G)\n-\t\tprintf(\" 5 Gbps  \");\n+\t\tprintf(\" 5Gbps_1lane_full-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_10G)\n-\t\tprintf(\" 10 Gbps  \");\n-\tif (speed_capa & RTE_ETH_LINK_SPEED_20G)\n-\t\tprintf(\" 20 Gbps  \");\n+\t\tprintf(\" 10Gbps_1lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_10G_4LANES)\n+\t\tprintf(\" 10Gbps_4lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_20G_2LANES)\n+\t\tprintf(\" 20Gbps_2lane_full-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_25G)\n-\t\tprintf(\" 25 Gbps  \");\n-\tif (speed_capa & RTE_ETH_LINK_SPEED_40G)\n-\t\tprintf(\" 40 Gbps  \");\n+\t\tprintf(\" 25Gbps_1lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_40G_4LANES)\n+\t\tprintf(\" 40Gbps_4lane_full-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_50G)\n-\t\tprintf(\" 50 Gbps  \");\n-\tif (speed_capa & RTE_ETH_LINK_SPEED_56G)\n-\t\tprintf(\" 56 Gbps  \");\n+\t\tprintf(\" 50Gbps_1lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_50G_2LANES)\n+\t\tprintf(\" 50Gbps_2lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_56G_4LANES)\n+\t\tprintf(\" 56Gbps_4lane_full-duplex /\");\n \tif (speed_capa & RTE_ETH_LINK_SPEED_100G)\n-\t\tprintf(\" 100 Gbps  \");\n-\tif (speed_capa & RTE_ETH_LINK_SPEED_200G)\n-\t\tprintf(\" 200 Gbps  \");\n-\tif (speed_capa & RTE_ETH_LINK_SPEED_400G)\n-\t\tprintf(\" 400 Gbps  \");\n+\t\tprintf(\" 100Gbps_1lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_100G_2LANES)\n+\t\tprintf(\" 100Gbps_2lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_100G_4LANES)\n+\t\tprintf(\" 100Gbps_4lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_200G_4LANES)\n+\t\tprintf(\" 200Gbps_4lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_200G_2LANES)\n+\t\tprintf(\" 200Gbps_2lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_400G_4LANES)\n+\t\tprintf(\" 400Gbps_4lane_full-duplex /\");\n+\tif (speed_capa & RTE_ETH_LINK_SPEED_400G_8LANES)\n+\t\tprintf(\" 400Gbps_8lane_full-duplex /\");\n }\n \n void\n@@ -828,6 +840,10 @@ port_infos_display(portid_t port_id)\n \n \tprintf(\"\\nLink status: %s\\n\", (link.link_status) ? (\"up\") : (\"down\"));\n \tprintf(\"Link speed: %s\\n\", rte_eth_link_speed_to_str(link.link_speed));\n+\tif (link.link_lanes == 0)\n+\t\tprintf(\"Link lanes: unknown\\n\");\n+\telse\n+\t\tprintf(\"Link lanes: %u\\n\", link.link_lanes);\n \tprintf(\"Link duplex: %s\\n\", (link.link_duplex == RTE_ETH_LINK_FULL_DUPLEX) ?\n \t       (\"full-duplex\") : (\"half-duplex\"));\n \tprintf(\"Autoneg status: %s\\n\", (link.link_autoneg == RTE_ETH_LINK_AUTONEG) ?\ndiff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst\nindex c17334ac25..46aceeee93 100644\n--- a/doc/guides/rel_notes/release_24_03.rst\n+++ b/doc/guides/rel_notes/release_24_03.rst\n@@ -79,6 +79,7 @@ New Features\n * **Support setting lanes for ethdev.**\n   * Support setting lanes by extended ``RTE_ETH_LINK_SPEED_*``.\n   * Added function to convert bitmap flag to the struct of link speed info.\n+  ``rte_eth_speed_capa_to_info()``\n \n * **Added hash calculation of an encapsulated packet as done by the HW.**\n \ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 2fbf9220d8..087f7fe853 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -190,6 +190,7 @@ For example:\n    memory allocation on the socket: 0\n    Link status: up\n    Link speed: 40000 Mbps\n+   Link lanes: 4\n    Link duplex: full-duplex\n    Promiscuous mode: enabled\n    Allmulticast mode: disabled\n@@ -2065,7 +2066,7 @@ port config - speed\n Set the speed and duplex mode for all ports or a specific port::\n \n    testpmd> port config (port_id|all) speed (10|100|1000|2500|5000|10000|25000|40000|50000|100000|200000|400000|auto) \\\n-            duplex (half|full|auto)\n+            lanes 1|2|4|8 duplex (half|full|auto)\n \n port config - queues/descriptors\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n",
    "prefixes": [
        "3/3"
    ]
}