Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/62852/?format=api
http://patches.dpdk.org/api/patches/62852/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/00a3b3099ac7bc7f12b1ab98b80acf0461e70b64.1573494112.git.dekelp@mellanox.com/", "project": { "id": 1, "url": "http://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": "<00a3b3099ac7bc7f12b1ab98b80acf0461e70b64.1573494112.git.dekelp@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/00a3b3099ac7bc7f12b1ab98b80acf0461e70b64.1573494112.git.dekelp@mellanox.com", "date": "2019-11-11T17:47:35", "name": "[v7,3/3] app/testpmd: use API to set max LRO packet size", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "55d602327399002764c70b37c45d857ab6708907", "submitter": { "id": 1082, "url": "http://patches.dpdk.org/api/people/1082/?format=api", "name": "Dekel Peled", "email": "dekelp@mellanox.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/00a3b3099ac7bc7f12b1ab98b80acf0461e70b64.1573494112.git.dekelp@mellanox.com/mbox/", "series": [ { "id": 7392, "url": "http://patches.dpdk.org/api/series/7392/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7392", "date": "2019-11-11T17:47:33", "name": "support API to set max LRO packet size", "version": 7, "mbox": "http://patches.dpdk.org/series/7392/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/62852/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/62852/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9E51FA04AB;\n\tMon, 11 Nov 2019 18:48:16 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 8979F2B99;\n\tMon, 11 Nov 2019 18:48:00 +0100 (CET)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 75B942A66\n for <dev@dpdk.org>; Mon, 11 Nov 2019 18:47:56 +0100 (CET)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n dekelp@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 11 Nov 2019 19:47:50 +0200", "from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx\n [10.128.130.87])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id xABHlm0Y024859;\n Mon, 11 Nov 2019 19:47:50 +0200" ], "From": "Dekel Peled <dekelp@mellanox.com>", "To": "john.mcnamara@intel.com, marko.kovacevic@intel.com, nhorman@tuxdriver.com,\n ajit.khaparde@broadcom.com, somnath.kotur@broadcom.com,\n anatoly.burakov@intel.com, xuanziyang2@huawei.com,\n cloud.wangxiaoyun@huawei.com, zhouguoyang@huawei.com,\n wenzhuo.lu@intel.com, konstantin.ananyev@intel.com, matan@mellanox.com,\n shahafs@mellanox.com, viacheslavo@mellanox.com, rmody@marvell.com,\n shshaikh@marvell.com, maxime.coquelin@redhat.com, tiwei.bie@intel.com,\n zhihong.wang@intel.com, yongwang@vmware.com, thomas@monjalon.net,\n ferruh.yigit@intel.com, arybchenko@solarflare.com,\n jingjing.wu@intel.com, bernard.iremonger@intel.com", "Cc": "dev@dpdk.org", "Date": "Mon, 11 Nov 2019 19:47:35 +0200", "Message-Id": "\n <00a3b3099ac7bc7f12b1ab98b80acf0461e70b64.1573494112.git.dekelp@mellanox.com>", "X-Mailer": "git-send-email 1.7.1", "In-Reply-To": "<cover.1573494112.git.dekelp@mellanox.com>", "References": "<20191108230753.32221-1-thomas@monjalon.net>\n <cover.1573494112.git.dekelp@mellanox.com>", "Subject": "[dpdk-dev] [PATCH v7 3/3] app/testpmd: use API to set max LRO\n\tpacket size", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch implements use of the API for LRO aggregated packet\nmax size.\nIt adds command-line and runtime commands to configure this value,\nand adds option to show the supported value.\nDocumentation is updated accordingly.\n\nSigned-off-by: Dekel Peled <dekelp@mellanox.com>\nAcked-by: Bernard Iremonger <bernard.iremonger@intel.com>\nAcked-by: Matan Azrad <matan@mellanox.com>\n---\n app/test-pmd/cmdline.c | 76 +++++++++++++++++++++++++++++\n app/test-pmd/config.c | 2 +\n app/test-pmd/parameters.c | 7 +++\n doc/guides/testpmd_app_ug/run_app.rst | 4 ++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 ++++\n 5 files changed, 98 insertions(+)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 48627c8..5cf7a4d 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -777,6 +777,9 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\"port config all max-pkt-len (value)\\n\"\n \t\t\t\" Set the max packet length.\\n\\n\"\n \n+\t\t\t\"port config all max-lro-pkt-size (value)\\n\"\n+\t\t\t\" Set the max LRO aggregated packet size.\\n\\n\"\n+\n \t\t\t\"port config all drop-en (on|off)\\n\"\n \t\t\t\" Enable or disable packet drop on all RX queues of all ports when no \"\n \t\t\t\"receive buffers available.\\n\\n\"\n@@ -2040,6 +2043,78 @@ struct cmd_config_max_pkt_len_result {\n \t},\n };\n \n+/* *** config max LRO aggregated packet size *** */\n+struct cmd_config_max_lro_pkt_size_result {\n+\tcmdline_fixed_string_t port;\n+\tcmdline_fixed_string_t keyword;\n+\tcmdline_fixed_string_t all;\n+\tcmdline_fixed_string_t name;\n+\tuint32_t value;\n+};\n+\n+static void\n+cmd_config_max_lro_pkt_size_parsed(void *parsed_result,\n+\t\t\t\t__attribute__((unused)) struct cmdline *cl,\n+\t\t\t\t__attribute__((unused)) void *data)\n+{\n+\tstruct cmd_config_max_lro_pkt_size_result *res = parsed_result;\n+\tportid_t pid;\n+\n+\tif (!all_ports_stopped()) {\n+\t\tprintf(\"Please stop all ports first\\n\");\n+\t\treturn;\n+\t}\n+\n+\tRTE_ETH_FOREACH_DEV(pid) {\n+\t\tstruct rte_port *port = &ports[pid];\n+\n+\t\tif (!strcmp(res->name, \"max-lro-pkt-size\")) {\n+\t\t\tif (res->value ==\n+\t\t\t\t\tport->dev_conf.rxmode.max_lro_pkt_size)\n+\t\t\t\treturn;\n+\n+\t\t\tport->dev_conf.rxmode.max_lro_pkt_size = res->value;\n+\t\t} else {\n+\t\t\tprintf(\"Unknown parameter\\n\");\n+\t\t\treturn;\n+\t\t}\n+\t}\n+\n+\tinit_port_config();\n+\n+\tcmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1);\n+}\n+\n+cmdline_parse_token_string_t cmd_config_max_lro_pkt_size_port =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_config_max_lro_pkt_size_result,\n+\t\t\t\t port, \"port\");\n+cmdline_parse_token_string_t cmd_config_max_lro_pkt_size_keyword =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_config_max_lro_pkt_size_result,\n+\t\t\t\t keyword, \"config\");\n+cmdline_parse_token_string_t cmd_config_max_lro_pkt_size_all =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_config_max_lro_pkt_size_result,\n+\t\t\t\t all, \"all\");\n+cmdline_parse_token_string_t cmd_config_max_lro_pkt_size_name =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_config_max_lro_pkt_size_result,\n+\t\t\t\t name, \"max-lro-pkt-size\");\n+cmdline_parse_token_num_t cmd_config_max_lro_pkt_size_value =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_config_max_lro_pkt_size_result,\n+\t\t\t value, UINT32);\n+\n+cmdline_parse_inst_t cmd_config_max_lro_pkt_size = {\n+\t.f = cmd_config_max_lro_pkt_size_parsed,\n+\t.data = NULL,\n+\t.help_str = \"port config all max-lro-pkt-size <value>\",\n+\t.tokens = {\n+\t\t(void *)&cmd_config_max_lro_pkt_size_port,\n+\t\t(void *)&cmd_config_max_lro_pkt_size_keyword,\n+\t\t(void *)&cmd_config_max_lro_pkt_size_all,\n+\t\t(void *)&cmd_config_max_lro_pkt_size_name,\n+\t\t(void *)&cmd_config_max_lro_pkt_size_value,\n+\t\tNULL,\n+\t},\n+};\n+\n /* *** configure port MTU *** */\n struct cmd_config_mtu_result {\n \tcmdline_fixed_string_t port;\n@@ -19124,6 +19199,7 @@ struct cmd_show_rx_tx_desc_status_result {\n \t(cmdline_parse_inst_t *)&cmd_config_rx_tx,\n \t(cmdline_parse_inst_t *)&cmd_config_mtu,\n \t(cmdline_parse_inst_t *)&cmd_config_max_pkt_len,\n+\t(cmdline_parse_inst_t *)&cmd_config_max_lro_pkt_size,\n \t(cmdline_parse_inst_t *)&cmd_config_rx_mode_flag,\n \t(cmdline_parse_inst_t *)&cmd_config_rss,\n \t(cmdline_parse_inst_t *)&cmd_config_rxtx_ring_size,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 2a51d96..d599682 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -624,6 +624,8 @@ static int bus_match_all(const struct rte_bus *bus, const void *data)\n \tprintf(\"Minimum size of RX buffer: %u\\n\", dev_info.min_rx_bufsize);\n \tprintf(\"Maximum configurable length of RX packet: %u\\n\",\n \t\tdev_info.max_rx_pktlen);\n+\tprintf(\"Maximum configurable size of LRO aggregated packet: %u\\n\",\n+\t\tdev_info.max_lro_pkt_size);\n \tif (dev_info.max_vfs)\n \t\tprintf(\"Maximum number of VFs: %u\\n\", dev_info.max_vfs);\n \tif (dev_info.max_vmdq_pools)\ndiff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c\nindex 9b6e35b..deca7a6 100644\n--- a/app/test-pmd/parameters.c\n+++ b/app/test-pmd/parameters.c\n@@ -107,6 +107,8 @@\n \tprintf(\" --total-num-mbufs=N: set the number of mbufs to be allocated \"\n \t \"in mbuf pools.\\n\");\n \tprintf(\" --max-pkt-len=N: set the maximum size of packet to N bytes.\\n\");\n+\tprintf(\" --max-lro-pkt-size=N: set the maximum LRO aggregated packet \"\n+\t \"size to N bytes.\\n\");\n #ifdef RTE_LIBRTE_CMDLINE\n \tprintf(\" --eth-peers-configfile=name: config file with ethernet addresses \"\n \t \"of peer ports.\\n\");\n@@ -594,6 +596,7 @@\n \t\t{ \"mbuf-size\",\t\t\t1, 0, 0 },\n \t\t{ \"total-num-mbufs\",\t\t1, 0, 0 },\n \t\t{ \"max-pkt-len\",\t\t1, 0, 0 },\n+\t\t{ \"max-lro-pkt-size\",\t\t1, 0, 0 },\n \t\t{ \"pkt-filter-mode\", 1, 0, 0 },\n \t\t{ \"pkt-filter-report-hash\", 1, 0, 0 },\n \t\t{ \"pkt-filter-size\", 1, 0, 0 },\n@@ -891,6 +894,10 @@\n \t\t\t\t\t\t \"Invalid max-pkt-len=%d - should be > %d\\n\",\n \t\t\t\t\t\t n, RTE_ETHER_MIN_LEN);\n \t\t\t}\n+\t\t\tif (!strcmp(lgopts[opt_idx].name, \"max-lro-pkt-size\")) {\n+\t\t\t\tn = atoi(optarg);\n+\t\t\t\trx_mode.max_lro_pkt_size = (uint32_t) n;\n+\t\t\t}\n \t\t\tif (!strcmp(lgopts[opt_idx].name, \"pkt-filter-mode\")) {\n \t\t\t\tif (!strcmp(optarg, \"signature\"))\n \t\t\t\t\tfdir_conf.mode =\ndiff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst\nindex 8c7fe44..9ab4d70 100644\n--- a/doc/guides/testpmd_app_ug/run_app.rst\n+++ b/doc/guides/testpmd_app_ug/run_app.rst\n@@ -112,6 +112,10 @@ The command line options are:\n \n Set the maximum packet size to N bytes, where N >= 64. The default value is 1518.\n \n+* ``--max-lro-pkt-size=N``\n+\n+ Set the maximum LRO aggregated packet size to N bytes, where N >= 64.\n+\n * ``--eth-peers-configfile=name``\n \n Use a configuration file containing the Ethernet addresses of the peer ports.\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 9a5e5cb..9cfc82a 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -2147,6 +2147,15 @@ Set the maximum packet length::\n \n This is equivalent to the ``--max-pkt-len`` command-line option.\n \n+port config - max-lro-pkt-size\n+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n+\n+Set the maximum LRO aggregated packet size::\n+\n+ testpmd> port config all max-lro-pkt-size (value)\n+\n+This is equivalent to the ``--max-lro-pkt-size`` command-line option.\n+\n port config - Drop Packets\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n", "prefixes": [ "v7", "3/3" ] }{ "id": 62852, "url": "