From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0079.outbound.protection.outlook.com [207.46.100.79]) by dpdk.org (Postfix) with ESMTP id 71B013990 for ; Fri, 22 Apr 2016 16:51:58 +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=HnvK6BALvDnmveQhZ/KhYVXCUG2lchB1Q4717CsqZCM=; b=qi9+u1rh/HmpAG3f9j6bUywaJ4hnloTwlrJ2jvqXsMZbGPdeaXD25qPZ4OMbYJh5LR+uiCcz3NsAyEUklzWz/QLQ9s1y1LyN2DJn1bq/0z0D8U+SicE1nGcVYmJoF73ctXyJnjmUfGZIO/7WNLeB2BqCV+DeDQCVereL5fUA3ss= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from hp-mjc.semihalf.local (213.17.239.108) by DM2PR0701MB1033.namprd07.prod.outlook.com (10.160.25.141) with Microsoft SMTP Server (TLS) id 15.1.466.19; Fri, 22 Apr 2016 14:51:55 +0000 From: To: CC: , , Maciej Czekaj Date: Fri, 22 Apr 2016 16:51:20 +0200 Message-ID: <1461336680-7581-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: HE1PR02CA0059.eurprd02.prod.outlook.com (10.163.170.27) To DM2PR0701MB1033.namprd07.prod.outlook.com (10.160.25.141) X-MS-Office365-Filtering-Correlation-Id: 9a686ed1-c83b-4222-8661-08d36abda6b2 X-Microsoft-Exchange-Diagnostics: 1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M07bv5YjliHNtDPj19d3L/6SqSTbPdaKickFXw9PXhdyI+Ij4XGxAFMzTRJcF7uyC36y+MI5PEG2YlifUG2j8gcrs+Eh9l5air7rVL7KTICLZ4jK4XtZXHHZqfunZKw6+RB8ZAw6eRKvTQTnBvdjcx2rOI3S2W+dt9fSbub0IeBZyQ7TV3cQUPBnpC0d60NcoAZlhtgRyzmzoSWwtRLvKhrEb5Wi3p17257qD3B+5JES6Y13M+poWScWLXDYfi7fbOVZ3acBUwEa27r/lLzy4w9DUS6Jdy3YFcCOfgfgVZJVTV0r7fesJ9sqbsfBoCmbM= 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)(3002001)(10201501046); SRVR:DM2PR0701MB1033; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0701MB1033; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1033; 4:njfVRwW670VuK0AlaUck/rm6zZk4O/HbDYWS35xi+sgY5uIBSbHnUYKwrZ4ayRxFQLZGJhrTRwj9nYs/8XFh1oFCPKiNQlW8dqL4v6igGFVJw1fMA+mvPe05ga7rAxXgjL8h+6h8iep2Ghot55UI7H6YQqMz1SEwH1Oq6tmiZWpf0sBhlkx5MN8nntoFhK9b9iebwO/foFQruL3XkIDEOykvl/Smo0Q7w8qeSiP+lPiAd+7cPS7s1K+/yDiGFq73/+8WEltuy/Gr5fhR8uE1qW49qeR2RTItjX1EIrtRdx22RUez2217VpbWvUVk2ZxsbB/YdFf4OkkS8FKh/N4O9vRxwP0oHawaEIZo6hUjBOW/drNiBgQdonC0cZiB9xbNeKuFQ0lUB/OoeaQ1t7L86g== X-Forefront-PRVS: 0920602B08 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(42186005)(6116002)(3846002)(5004730100002)(4326007)(86152002)(48376002)(19580395003)(19580405001)(586003)(50226001)(2876002)(36756003)(1096002)(5008740100001)(86362001)(2950100001)(50986999)(229853001)(50466002)(189998001)(2351001)(5003940100001)(76176999)(107886002)(92566002)(81166005)(77096005)(2906002)(47776003)(110136002)(4001430100002)(66066001)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB1033; H:hp-mjc.semihalf.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB1033; 23:tFGznyUH4WOV6GLgOfyTg3O6ZbbLBH7tgmVWJq2?= =?us-ascii?Q?zge5eBat0vEf3NT80L1WSVficoGxZpj+pkmCJ+n4gY3iR4DoaSzfIcn+/GBX?= =?us-ascii?Q?9UjTYkGqr4F6e4yVuiww77FqRdYXvdl/mf5dpAPAeEmo57enN9JQ6jiJ9rSH?= =?us-ascii?Q?CwZV5PfMzcnbCjAA5pbY/2IzYoYQRX4rwJHpRtyKV4bPypukqdoxgcL2IWqj?= =?us-ascii?Q?OopTVTZqBE14opOkMU4VYl7C7L+XWxsG6I/qZdC0u4WosQzmpQ7DAUwTktiB?= =?us-ascii?Q?OwhKnosDqcjvx5jM8IDeOnS3YbkGgxCIA5qLbkd0dAcrGcEChBtsa0J5MQEX?= =?us-ascii?Q?59UCYMjyTjMznkcRd0wceAaLcSsbxm9+JhGllKLk2SB5vbM/x5g5zYvYoAes?= =?us-ascii?Q?gozqZWsqkQrc40qIme5b/IstH7C8eB7N48OHUX78DqlpdyuoCt2u0UCdnvDn?= =?us-ascii?Q?Vw1qRNxNF0JjYnuvqSkng8mb/GaXkwuly6gXbc53Opbf5FWtTiXs/9Wz3v7n?= =?us-ascii?Q?KHP9imG3sssbpHyf50oqiqjF4wdJSA0h3Qh7oOUPkhuYA80lax57HWQplIig?= =?us-ascii?Q?gaeZ9KCMdgqkbob1EH0xtMw1ZtJAIuIhEXOXFh7teijheVrbCwf/mMxpJsgk?= =?us-ascii?Q?oyVcK2Z0z2kgJPsNEk+t4cvQzVA+hfOhLvGBp3XqtYGFEsuoiyZ6l0AQAD+t?= =?us-ascii?Q?AlX1hkaMNsGvYM85losoLcJcJh2RANCeA/y8VhEPOii9s7IWgxPIfZMCG1NY?= =?us-ascii?Q?Nfjet8xnfs68ida+8PTDpCepLPO540hUTDu0B0Mo1FCIcn3a1qpq8vl323tF?= =?us-ascii?Q?OfwfqTPEQoVhTYFsiHathrw1SlJcoZFm2qpCgxE5mj52kCjB5oypkmGfwcXR?= =?us-ascii?Q?xAut4ViE+o/LShDXEIth6k/hXfZNdzxzBhu5D+3aZE8TeW5gwZyKaER9cmZf?= =?us-ascii?Q?aeIbXRp1lXqjH3+RNeMErsPWM9fKIYtuD2pp04/s4IyL9FQHpWboWs7QgmDP?= =?us-ascii?Q?XZns=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB1033; 5:CYDZlqkQUNRyYVCchZBCSzvSvbYimZib50MvDoDHHgroFb0QmMXxhdyY3UA8fkNqndQIt6GIPfUraDS10WQzeTtkNfSkittw9NHCtYeh7J4/TLzeqBcGzN/13XXJLmzY3E6sw0LkQShzME1w52sQ2ZSYjY/MItgADhyUBYtuMGjtnm3hAcpomvOLp+lFOEN1; 24:7fEjnJa7dTx5+DXQacq9WI775Wi6ZK+kXGuV3iUMFSRq9R1VKxgla2RSltxQw7W/TlViS/SLLZRuFvfJXInSypF7wbXxrvg3XiK+Fiky+jU=; 7:3YpEDu1NWB3cErYMw8UoV6MlSp91RsgqTOwmt/ddHOMjl3ijUBlPVBu22nJyaoxB4mYQEVR0a6PUzoCMaxVNoBF3h8SX9m966OI6+QZ124cIOXSa44bqhRtr50T1rfaZeCde5DmAD1eL9n+BPJGcYAl32G28jKaRpuM0yjtqtt1PDWRBPgQasf48NxzCZWy0IBkuy7afxRg7OlxTs6BwzCgpcfsq1GP6sly7M0J19mk= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2016 14:51:55.3546 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB1033 Subject: [dpdk-dev] [PATCH v2 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 14:51:59 -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 | 69 +++++++++++++++++++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 ++++ 2 files changed, 78 insertions(+) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 929d19a..1921612 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -2730,6 +2730,74 @@ 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")) { + printf("Unknown parameter\n"); + return; + } + + if (res->hexvalue >= 0) { + txq_flags = res->hexvalue; + } else { + printf("txqflags must be >= 0\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 +10555,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, diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index f2755cb..1545350 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -1198,6 +1198,15 @@ RX scatter mode is off by default. The ``on`` option is equivalent to the ``--enable-scatter`` command-line option. +port config - TX queue flags +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Set a hexadecimal bitmap of TX queue flags for all ports:: + + testpmd> port config all txqflags value + +This command is equivalent to the ``--txqflags`` command-line option. + port config - RX Checksum ~~~~~~~~~~~~~~~~~~~~~~~~~ -- 1.9.1