From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0094.outbound.protection.outlook.com [157.56.110.94]) by dpdk.org (Postfix) with ESMTP id 0F9C947CE for ; Fri, 22 Apr 2016 11:58:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=a3CEy65Yk3ZkBWfBs5zRleBMc4eNm3JgHbisaqfyo1M=; b=Wy6y3ffSXST5xkjx3Bytj2LLAP6zjE4dbfIdNWk8PsTcczKIg4gNfQT1PHVQR4ld9MA4t1zfJSn4wxbcYKijBuuErsRW4R7hQe+toesHEUKMUC0juH7NKA6dWJZZcRyWn/9IVlPQwyrAeU18bQBJZMTP97EV4bvJT1eZkwfMitk= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from hp-mjc.semihalf.local (213.17.239.108) by DM2PR0701MB1034.namprd07.prod.outlook.com (10.160.25.142) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 22 Apr 2016 09:58:44 +0000 From: To: CC: , Maciej Czekaj Date: Fri, 22 Apr 2016 11:58:18 +0200 Message-ID: <1461319098-22632-4-git-send-email-maciej.czekaj@caviumnetworks.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461319098-22632-1-git-send-email-maciej.czekaj@caviumnetworks.com> References: <1461319098-22632-1-git-send-email-maciej.czekaj@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [213.17.239.108] X-ClientProxiedBy: HE1PR06CA0030.eurprd06.prod.outlook.com (10.162.181.168) To DM2PR0701MB1034.namprd07.prod.outlook.com (10.160.25.142) X-MS-Office365-Filtering-Correlation-Id: ba8c4961-01b9-422c-4b3e-08d36a94b18a X-Microsoft-Exchange-Diagnostics: 1; DM2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qFnffdYpksPGKfitBtSDXxGEEFpwgz1n6UyPj/AZnrncrsW6Wj1fWktCJtzrbxYxkgnyfzcMrDhiVEHOgFveJTNjgrUWdERP5pj9f+QltVqSxHo3orv1hPrTsHYN8aV1O44dvSRmigYLgCjsk8shz/J+Ekrd5mYB0Y/3QfJuhJqdl/qSkr7sAErkxkKfdUN4D5aDW9AyAduHox+gxS91V9/WK03xubkoOowk5btYutRQK3NJXKllxV5Bh+r5Yad4emvDa2lIZ7U1KkoIOaU6d8FDBvpw70uT77juXUvIpdbpS/x1ByUKeasIAMtI= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(9101521026)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:DM2PR0701MB1034; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0701MB1034; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1034; 4:vCTBKEIOor7MZkNHx8oaJWv44KAiw27yJ8/FSdjmWfDiZk2ig1sA6XIlvyY1X3fxOxU1rraibOjDVBsAgWBkvJsnjtEb+C2RFAE5hk0ZBvUtzP3wZdo2wa4pGRSLFLG4ZMAgSRIdHsXWREJJGn8LReaWfVp8joMeJ0QR12jKZFc2ezccvPQEl9d5sqhYAWv83LLc7cSGlm9DJbQLzs2zSUEYqsZi065vbEu7RWFkSVTai1i9kKp8v5EWQsr149btsMGniRbHiT7wnwqEIUD6NfKfzjA3rkrTxQfEp2qHgo8Q6SQ0IRCHO4nc+XpRq82tob5LwKkYuqjCIadjicBIgyA7bhmPEhebsPWR7vGnXH+2JRO/3gkLMvkNdUd+Vb1eUaaBH3duEZDrxlrUWavuiw== X-Forefront-PRVS: 0920602B08 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(1096002)(4001430100002)(2876002)(5003940100001)(6116002)(33646002)(3846002)(19580395003)(19580405001)(76176999)(586003)(50986999)(5008740100001)(107886002)(50466002)(189998001)(2906002)(48376002)(36756003)(110136002)(66066001)(5004730100002)(86362001)(42186005)(2950100001)(86152002)(2351001)(50226001)(229853001)(77096005)(47776003)(4326007)(81166005)(92566002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1034; H:hp-mjc.semihalf.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1034; 23:4++roVvLRxNTAGWx8XSA1FS8AifGAcPcowNjoSX?= =?us-ascii?Q?/LazVH+dzLLlSaIQ5D+cKIP/OlO9ENFC5C48Yr8V89+qSSF/HhGSqD7z27r/?= =?us-ascii?Q?KnjKxniPPuFkDF+F6LN0C/fA/vBp1gyHdkioY0ezLoT1pGlMluHdy+gBMsBM?= =?us-ascii?Q?Ixko0yIOwvXw5NZQwIGnBvPg7vtLBkpgSYwF+lUSSvZWUin13r7UR3mhY3yg?= =?us-ascii?Q?pWNgCl4+AeyqMcDcmkrG8Uqw1DNxD5QHxRcIA6HbSOHGxsg3UNB3k0TeB1j4?= =?us-ascii?Q?PgvZBuEO0r740JF+8w9AebKcno1q5qwqRzjOASexogyHSpNSaErI2RuI3y57?= =?us-ascii?Q?oC39cBWT45Xt1vAjnegQTeh+SgAGFTBND5OjD1os/Dud/qoyv6834bSOmAdJ?= =?us-ascii?Q?CkFrzgbVEFIUx+JGLwMR64pWa2O16vV2PexYiiRJq6gkK2eHdxPxFhUWtZ+9?= =?us-ascii?Q?wOn1IXe2GeXuCjkZ3nISwwl2M9xR6ZZXrfcwe6KMOvCkEdbPblenUwiAHWpG?= =?us-ascii?Q?3V3q4Lokx4RUTadfJEK66MhvX5mZTH/qIrFQ9Swka75qWd5JwiEqbFUe7yCm?= =?us-ascii?Q?io0kZS1PzCSIZcR65mKY81H+gfwXY3QsCd/ee5bbYgxzTJgc91gVUVDr/VVN?= =?us-ascii?Q?TKrY8v4zEQv9vPTDt7dRpPMHCItQKX1T7RovATA5wYED1vRXF/V2pz3yw+6Q?= =?us-ascii?Q?bGWjsugdK6V8JTesYHpzlGPlqcb8hjGbVWBIxMzp835ZE044FMFI/zHxPeEy?= =?us-ascii?Q?JF45eRq32vg7KW4fkOMAfyJgzYGqNLCjD1L5AGtLm5QnwlcaY3flPWPjYNph?= =?us-ascii?Q?DelhN1QJlCCLDu1gK5+Nd8EDpGstXfBT2H+1GSf2XTt+S+yLgWmdyZNFxiQB?= =?us-ascii?Q?uu593KppbSVxRd2jsafBx3u2YTZo889I7uKlP755iCq4yRo6WPznVKt+UeMG?= =?us-ascii?Q?H52csYtVoJjUctZLESXOAg+lzIRtclQs6bER+mRQPVbiB4qqoK54Gi83VHKW?= =?us-ascii?Q?b8mQ=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1034; 5:6DumROKzsMNX095SoZEtXBvcasfFuTyVeYixt+7QJjhWkTk7h+uV7kDCl0lmuElZyowb8vCmIqanVRgZPYrHY+8eoTHblib6cXMWbXHw4aVCuuyZZpCHUOtcV+xuHD2vHQ2mwyi5cgalV/IIQBvSeUlTOa6yb2svm5W4bDJ838tqm/aTjnoLnvHH1svyxRaR; 24:iJ1ogV2EXCs9DJfET7a2HDQqCatzloHeR5Aq5231Aordb56sMeBkqDsQrqNcClx2sxVkKeYv0sAc5NOHf4J6fIS5/L1Ja/vkDxGAdpxgsV4=; 7:1MEq1T5Oe0qWqQbN/wJyPcjsPfIJjSJKylQcYH8JCHl6pt1LMe5QFLFCIqhMaiD/FOBgd6HZu6li/Ittg+sxQcYRr/jJPAjIYRgxFJQarZRs9+RUeZD3iiHbYyLIFN51G1D0vRfXbz7uN53TwUVnlbk5RVbAm5CwSNZuuZ/65pK7dgYvxErMhI1Hx1IoBy/6kpxLAzRpn/j1jgdKrhIzBaBLkdQfIH7+s+gtbUH9PLM= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2016 09:58:44.5081 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1034 Subject: [dpdk-dev] [PATCH 3/3] app/testpmd: support setting up txq_flags value in command line X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Apr 2016 09:58:46 -0000 From: Maciej Czekaj "port config all txqflags " allows for specifying txq_flags value in command line. Signed-off-by: Maciej Czekaj --- app/test-pmd/cmdline.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 929d19a..680164f 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2730,6 +2730,69 @@ cmdline_parse_inst_t cmd_set_txsplit = { }, }; +/* *** CONFIG TX QUEUE FLAGS *** */ + +struct cmd_config_txqflags_result { + cmdline_fixed_string_t port; + cmdline_fixed_string_t config; + cmdline_fixed_string_t all; + cmdline_fixed_string_t what; + int32_t hexvalue; +}; + +static void cmd_config_txqflags_parsed(void *parsed_result, + __attribute__((unused)) struct cmdline *cl, + __attribute__((unused)) void *data) +{ + struct cmd_config_txqflags_result *res = parsed_result; + + if (!all_ports_stopped()) { + printf("Please stop all ports first\n"); + return; + } + + if (!strcmp(res->what, "txqflags")) { + txq_flags = res->hexvalue; + } else { + printf("Unknown parameter\n"); + return; + } + + init_port_config(); + + cmd_reconfig_device_queue(RTE_PORT_ALL, 1, 1); +} + +cmdline_parse_token_string_t cmd_config_txqflags_port = + TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, port, + "port"); +cmdline_parse_token_string_t cmd_config_txqflags_config = + TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, config, + "config"); +cmdline_parse_token_string_t cmd_config_txqflags_all = + TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, all, + "all"); +cmdline_parse_token_string_t cmd_config_txqflags_what = + TOKEN_STRING_INITIALIZER(struct cmd_config_txqflags_result, what, + "txqflags"); +cmdline_parse_token_num_t cmd_config_txqflags_value = + TOKEN_NUM_INITIALIZER(struct cmd_config_txqflags_result, + hexvalue, INT32); + +cmdline_parse_inst_t cmd_config_txqflags = { + .f = cmd_config_txqflags_parsed, + .data = NULL, + .help_str = "port config all txqflags value", + .tokens = { + (void *)&cmd_config_txqflags_port, + (void *)&cmd_config_txqflags_config, + (void *)&cmd_config_txqflags_all, + (void *)&cmd_config_txqflags_what, + (void *)&cmd_config_txqflags_value, + NULL, + }, +}; + /* *** ADD/REMOVE ALL VLAN IDENTIFIERS TO/FROM A PORT VLAN RX FILTER *** */ struct cmd_rx_vlan_filter_all_result { cmdline_fixed_string_t rx_vlan; @@ -10487,6 +10550,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_config_rx_mode_flag, (cmdline_parse_inst_t *)&cmd_config_rss, (cmdline_parse_inst_t *)&cmd_config_rxtx_queue, + (cmdline_parse_inst_t *)&cmd_config_txqflags, (cmdline_parse_inst_t *)&cmd_config_rss_reta, (cmdline_parse_inst_t *)&cmd_showport_reta, (cmdline_parse_inst_t *)&cmd_config_burst, -- 1.9.1