From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0053.outbound.protection.outlook.com [104.47.1.53]) by dpdk.org (Postfix) with ESMTP id CE9661B63C for ; Tue, 26 Dec 2017 10:45:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=SRNJYOPkSHQBTX6ZH9oz7TFWGSORlDjqf0rDPWEoZ4k=; b=LOI2E+hNTi+8fZVcd77BiLauVDp0/98ut5wNyqM8CD2raD5UXKx0VW+F8d0tn7/mNDDLKjgp4gMnBsa4GCcD5BWSWFs14/uW7yjculVHUhHIadF7ZIoSdkCGFcdGNEg8eg9kYSo1DTCbNUwbTGDi3ff+yfQv1YpyYAf7CoXXVHM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shahafs@mellanox.com; Received: from mellanox.com (82.166.227.17) by VI1PR05MB3150.eurprd05.prod.outlook.com (2603:10a6:802:1b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Tue, 26 Dec 2017 09:45:01 +0000 From: Shahaf Shuler To: jingjing.wu@intel.com, ferruh.yigit@intel.com Cc: dev@dpdk.org Date: Tue, 26 Dec 2017 11:44:21 +0200 Message-Id: <54312c47a79ef3e35ee7465472472047c156c8e3.1514281260.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [82.166.227.17] X-ClientProxiedBy: DB6PR07CA0012.eurprd07.prod.outlook.com (2603:10a6:6:2d::22) To VI1PR05MB3150.eurprd05.prod.outlook.com (2603:10a6:802:1b::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b4ce52fa-bbed-43c0-c01a-08d54c4555eb X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(48565401081)(2017052603307)(7153060); SRVR:VI1PR05MB3150; X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3150; 3:ZFWBftJMo9/ptoLeEYqk99nLWFB7FNGGbw+kASk6OZuFdtVfbI/7QPYtp3p1qVjxfZQAvuMxlfyGJ+9fvCHLwfwjBWaNT7+0ziwv2TE3Xyd4oyXhoxmd/YM9ZQ1vtEEarZvn+1sG113kB2P2TUq/iDrty6/PW4xJmS2gJBpMyocMQUD5nhAO9Y3eM5ZHSkf0MCJiIQS75S6gYAFgjs4T2FdoCBcYq4sg5sApVbEo2Fio2pSjyQL2H/J1K0vSCiM/; 25:mXF2Q73Nq+SVZJ3lTrxmBX7yLX0uMJ71jkcsbVdlKLvx3A9O582HNzCYI0Crq2mXfZDSQ8IG93I8PEAPiHOvuO+pgTUvhk2Cx6lG84f/y8lNI7KHSJsH5gCGaAGtIomG/Bsw8O4mDlyjpoToaIeFv/FsXWaBGAzz6mKBtYtOWbml3RFdMgP2xHuJt9pcY7c13KecJnHBrJUwntwoPmIR+XafQw8mcETB1+g9v9ZDVtzDhBYv5gHRLbMxbVsBBpIpxPYK22eJhUS9tMzdXImFkxHxtGvq5NAEWHzGeOtNDf4+kMyADoa9pnPJslOG7h0zsYOsijcYv1oLx/6R2Q2MTw==; 31:J8yC4+Bm9VyoYjGG5+tT1gTkyI1f5obC31j7MrwYcmx5httB6IBBEXUqIFDD86TFYrOgO8H1fNYsYmiUt9hZsF0/rzFwa7dwMxud87vxYN+WepdMVSOvTUyBrb+nTTdPgbr7lQBi/RvZwXiOGR1a3W9+zuMhuSPHefgHSjtAIM0dacbCVfm94FoKkctwSmD+EEje+gn3LAYr6drntriu6CaegzYJlh3OAfhn8eZnfxE= X-MS-TrafficTypeDiagnostic: VI1PR05MB3150: X-Microsoft-Exchange-Diagnostics: 1; VI1PR05MB3150; 20:LrrpneB/NCcyhsy7u3ms7yL0e3VRl+/etkIUtuJ85d5f9IYmueWkj0je821eZFY0ublg5f4nBCIOkrvae0nSIG+1U4t5IlSOu6BgrqbbUOHgKYw5SMeEKQuPg+NvkoESsK+eD/lPBBkn+AHvxVFC/+9na5rjmWfrC12vW/pJXTgCrHBURdYgyLOsTFXCC06nAPSbk0DBIassW6/D86lJTDmGGrEJL1jSZTkCN2J65PjEdoABY9UkONNZJjzTcVYpgZhcf+3+pBuz+LAFpG3remyZm14Im+4+IjHtHV6NuhKoU/n9LIGbkzetZpfuqWqRVFLsplAj2zFMR/BxxbQ3zVrESMAoRPF48lqwkRGa8FSgqiSfa8vn/437FHcvgfv+C0pmCJ4yuXtiyV81/UWR7gHXXY9s7SBFOaejNaRTGdOQmyRHme7jKBa2FQ9NBNCoQiGGXCuAjqGsDBFlg/JbcPrSnzS2+MZfB4wGX29Kd50P5jbhPYfqX8NbCHTLKcCf; 4:Kaf5XAow1ikgO6MmaLLL5zqg2nYt1B2677jaiX9jpVJOovBc64XUYUixN/Ed7IQN1Q0yV1aZ4XgQfClsk81BO8kmXMxNaAI0iTn7JMazlGAJ4vWzxac2g/ZGeSzyArjse0XPtZ1EL/4yHECozcH5DFkZiivlrqs7+4p0dV8Ulr5nzYdZBQXgAS3R9DaG8BJV/d2KZS3JfPHTzxVWj4r/XIy4VGXoUgoWBcKH47ytQfR9B/orF/cDTLpEeBpUlZpuCRJLOxs7WDFAUvvWmA0nqA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3231023)(944501075)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041268)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:VI1PR05MB3150; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:VI1PR05MB3150; X-Forefront-PRVS: 053315510E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(346002)(39380400002)(376002)(199004)(189003)(33026002)(50226002)(52116002)(59450400001)(51416003)(55016002)(8936002)(76176011)(7696005)(81166006)(36756003)(575784001)(86362001)(68736007)(3846002)(81156014)(6116002)(386003)(16586007)(316002)(8676002)(50466002)(69596002)(48376002)(53936002)(2906002)(25786009)(2950100002)(6666003)(5660300001)(118296001)(16526018)(21086003)(4326008)(478600001)(97736004)(106356001)(47776003)(305945005)(7736002)(66066001)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB3150; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR05MB3150; 23:dKDlScx9X9rACmoJANmyIbhXknpAJmYHos2viYEWB?= =?us-ascii?Q?M5g3/Uqp6uM64JqgBnP9RSC99P7uSdWSVFVkKroyZPiRSY5wNtfWPAWVyEY2?= =?us-ascii?Q?PyzB21yG3ifcrL6igDx3BUacsL1YzN194vrl4685oaOalTfM6ojJiJeAi7Kj?= =?us-ascii?Q?80UEiSdOu/B1jaYu3VdLmHCM3+udQ4LZ7ldEwBARk1YNxcD/TIuhvQ2AHlmV?= =?us-ascii?Q?mxqvp5mlEnNgKP63R0ZdD8YOP62q8/ZPsiadyQwbOS2+FztKSPw6meSLYsAM?= =?us-ascii?Q?T2pX44W3hlwL+ewSB88GewqSRqmVxFJthwdarX/aGUmjA+wAeMkj791lO6Vk?= =?us-ascii?Q?lwJcuwTBGahxPNHn5qfZqwaW3cAmFAhc5JSTj4o2bZ+9b4qONpWmBf8d/js/?= =?us-ascii?Q?mTTS/sZNuPw8LLQiqN+PybOoAAxQWDV3ft40v70Tt0MR1pQ6Y1XtuQbzNft8?= =?us-ascii?Q?+H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cqJqKWzz+huqhgONZzwpAlrh1KxudnqU3g9VMbNbpXQ2QJW/y0jJYcmHgghUaCp3BZAT521ebMn2EurjS3OJxdtStKF0ziZep0kQRuqcah0gbVuE+gPPgL368V/hfK2QmTswG9B6Vutg1UeO5L4m2QFU/iXWC8Cxwjt8Mnyy5LLSYH4RfjgmCE9BB19eX69ro0oG6zqE=; 5:Y1/oLGi6y9bXcCE7X7ytOZTlsIowUt2BZSYR+CafP7wojWcDk42gh0/HAuHFvuABLeZp90Q+PqKdsHSrObJBg9s+9bclSaNGay6V3sIfqBKKy7g/81K+HldbkXbQn5GR8XDow6/b5WJ0OXUL7YqhJtjBwRorc/NsehAJdR8UgyM=; 24:YkkJ42oiQLsRBQjSDw4R9UMI3WfA5/Ry7zNkMojVw6JAuV1n1NXCOqH4cFirE2LG10BX0FmUpl1ou4DLfA4MrMVgh9tvYhLKd8AYg75QOV0=; 7:13A2KenddUWUB5qxDvYtLKLnRvYXmuet6ycgG76vKUVTbwTb/ZeaQZ429Re0nZxHyRSOQRp4esS0wDGAeCI4fp2OvB6ZBwkSUUhEPd/cZTuk/f+rhwxhp9/Z/Zd9nG1O8oCZcYc5lJTy5A9yiH1tXJCGTIfi12r6VpCuGJvx+D2uiXB3EXNzamazPlqDILLiYSlbMKIXkXA8lndM8UnpFzFn/rlvOqywabW2bzo8W3HJa5nscbgSXKbecT0ixtJi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Dec 2017 09:45:01.4667 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b4ce52fa-bbed-43c0-c01a-08d54c4555eb X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR05MB3150 Subject: [dpdk-dev] [PATCH v3 07/10] app/testpmd: add command line option for Tx offloads X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 09:45:04 -0000 This patch adds command line option to set hex value for the ports Tx offloads flags. Signed-off-by: Shahaf Shuler --- app/test-pmd/parameters.c | 17 +++++++++++++++-- app/test-pmd/testpmd.c | 4 ++++ app/test-pmd/testpmd.h | 2 ++ doc/guides/testpmd_app_ug/run_app.rst | 5 +++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 263651cba..58889420f 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -99,7 +99,7 @@ usage(char* progname) "--rss-ip | --rss-udp | " "--rxpt= | --rxht= | --rxwt= | --rxfreet= | " "--txpt= | --txht= | --txwt= | --txfreet= | " - "--txrst= | --txqflags= ]\n", + "--txrst= | --txqflags= | --tx-offloads ]\n", progname); #ifdef RTE_LIBRTE_CMDLINE printf(" --interactive: run in interactive mode.\n"); @@ -216,6 +216,7 @@ usage(char* progname) "disable print of designated event or all of them.\n"); printf(" --flow-isolate-all: " "requests flow API isolated mode on all ports at initialization time.\n"); + printf(" --tx-offloads=0xXXXXXXXX: hexadecimal bitmask of TX queue offloads\n"); } #ifdef RTE_LIBRTE_CMDLINE @@ -566,8 +567,9 @@ launch_args_parse(int argc, char** argv) char **argvopt; int opt_idx; enum { TX, RX }; - /* Default Rx offloads for all ports. */ + /* Default offloads for all ports. */ uint64_t rx_offloads = rx_mode.offloads; + uint64_t tx_offloads = tx_mode.offloads; static struct option lgopts[] = { { "help", 0, 0, 0 }, @@ -645,6 +647,7 @@ launch_args_parse(int argc, char** argv) { "no-rmv-interrupt", 0, 0, 0 }, { "print-event", 1, 0, 0 }, { "mask-event", 1, 0, 0 }, + { "tx-offloads", 1, 0, 0 }, { 0, 0, 0, 0 }, }; @@ -1116,6 +1119,15 @@ launch_args_parse(int argc, char** argv) rmv_interrupt = 0; if (!strcmp(lgopts[opt_idx].name, "flow-isolate-all")) flow_isolate_all = 1; + if (!strcmp(lgopts[opt_idx].name, "tx-offloads")) { + char *end = NULL; + n = strtoull(optarg, &end, 16); + if (n >= 0) + tx_offloads = (uint64_t)n; + else + rte_exit(EXIT_FAILURE, + "tx-offloads must be >= 0\n"); + } if (!strcmp(lgopts[opt_idx].name, "print-event")) if (parse_event_printing_config(optarg, 1)) { rte_exit(EXIT_FAILURE, @@ -1142,4 +1154,5 @@ launch_args_parse(int argc, char** argv) /* Set offload configuration from command line parameters. */ rx_mode.offloads = rx_offloads; + tx_mode.offloads = tx_offloads; } diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 0087438bc..806548196 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -344,6 +344,8 @@ struct rte_eth_rxmode rx_mode = { .ignore_offload_bitfield = 1, }; +struct rte_eth_txmode tx_mode; + struct rte_fdir_conf fdir_conf = { .mode = RTE_FDIR_MODE_NONE, .pballoc = RTE_FDIR_PBALLOC_64K, @@ -604,6 +606,8 @@ init_config(void) RTE_ETH_FOREACH_DEV(pid) { port = &ports[pid]; + /* Apply default Tx configuration for all ports */ + port->dev_conf.txmode = tx_mode; rte_eth_dev_info_get(pid, &port->dev_info); if (numa_support) { diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index c6baa1066..3e63edfa1 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -395,6 +395,8 @@ extern portid_t fwd_ports_ids[RTE_MAX_ETHPORTS]; extern struct rte_port *ports; extern struct rte_eth_rxmode rx_mode; +extern struct rte_eth_txmode tx_mode; + extern uint64_t rss_hf; extern queueid_t nb_rxq; diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst index 4c0d2cede..fface6f58 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst @@ -509,3 +509,8 @@ The commandline options are: configured flow rules only (see flow command). Ports that do not support this mode are automatically discarded. + +* ``--tx-offloads=0xXXXXXXXX`` + + Set the hexadecimal bitmask of TX queue offloads. + The default value is 0. -- 2.12.0