From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7B4A843F5D; Wed, 1 May 2024 19:19:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40F7F402A7; Wed, 1 May 2024 19:19:05 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2081.outbound.protection.outlook.com [40.107.243.81]) by mails.dpdk.org (Postfix) with ESMTP id 081D64021E for ; Wed, 1 May 2024 19:19:03 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aUPRNqfR2OTTMR1szmxpwfTgNTICn63eDKbaa631DsXl8eD4Bq2+dYLcWEbVwiMOX+S/NIUljbfCgg2fk9AQyw6BebhqU1z9wq8SaCGLlL0awXPlvDrF1z1B67oB5Tade+f+MyP/GWCX+DcGUZSPCFHDNzl0DGdEik9hO3GjwNUS+Zd3tm8A8dmSih7kaWLVizWj43ojht/ydZfA+maAcroj3QCNNQ7dSsA+eD2dTm7W10T+CoeT+r82+/E+r9JLUISRMntzDE+G8Hc4taUvXEXe3hykMQm/knpeM7zFufaG6gd+JITkb/WjNdxTV8SP5BCt0SBXK82RPxPqkdLx1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iJRVew0YFdCPipNNBe7MrfKuOWTuNgNPyyBpPrurl/E=; b=O0OW2qN97gTdsw/sK8BcxYBUXgC0Td+PmVXGJDjNFe6AW1EfaeU+fqUPKmBnSPzRAC1kv3zwCxm9vWux9JZoyXbedh/TBztFx16kkVAWHj5A3wgnzUsjR2mxIs+t0/kpyfk0mYSs04WuRaKClcArzsYL9JYNBgBBDyrZYxh/NIE/Vytp6wEy75y3W12ABru/GtnIhav2tNvElAOn+VDoR2VmUrDyhTPi7E9t+X8B/rKgs6L3vL1WLKZu5xp19KVQKgxwtJM4PXUB4beQdjwfHxAgA1D0F9mX2HIeSqlMH4+vtFLWUIM7Vln5nygF1zJ6YspgnUqfxuYUvmWYqjU5ZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iJRVew0YFdCPipNNBe7MrfKuOWTuNgNPyyBpPrurl/E=; b=uJ5hQXtquPj0MXleghJ5yKxrxfUcBC0TyyPkNSP/BE8JPz23RP7jqzeLnJ/dUV/xKxdcYa8WmyzLR1YwwSVxJc+6Rny3FrU6cx6jp7Q1uKSnNDVUrYe52bA5qZkFtIfMDd4ng2cdj03ltMmHDJ+pgln/B7WsnuSEV0dEVU8aqcsaRr3f7+eDAX468EXw/HlywXDe5eus+QlIxw0eL4y6xhjlYvNsJWKRHdPob29BookzkK22PV9Ift3+ti3WBjKoYl+F6LzYvcxyxiCRi+fKNr5zw0OUVzUWj3XQfnHEf0r6/km8hbijdQnGyONgJEOcQBC9QD4NnQsLaOnrQpP2yA== Received: from MN2PR20CA0001.namprd20.prod.outlook.com (2603:10b6:208:e8::14) by MN0PR12MB5786.namprd12.prod.outlook.com (2603:10b6:208:375::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35; Wed, 1 May 2024 17:19:00 +0000 Received: from BN3PEPF0000B370.namprd21.prod.outlook.com (2603:10b6:208:e8:cafe::ff) by MN2PR20CA0001.outlook.office365.com (2603:10b6:208:e8::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34 via Frontend Transport; Wed, 1 May 2024 17:19:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN3PEPF0000B370.mail.protection.outlook.com (10.167.243.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.0 via Frontend Transport; Wed, 1 May 2024 17:18:59 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 1 May 2024 10:18:36 -0700 Received: from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 1 May 2024 10:18:34 -0700 From: Gregory Etelson To: CC: , , , Subject: [PATCH v2] cmdline: increase input buffer size Date: Wed, 1 May 2024 20:18:06 +0300 Message-ID: <20240501171806.307533-1-getelson@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240501052659.231457-1-getelson@nvidia.com> References: <20240501052659.231457-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B370:EE_|MN0PR12MB5786:EE_ X-MS-Office365-Filtering-Correlation-Id: 888d90fe-c837-41de-00ad-08dc6a02ca9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|1800799015|82310400014|376005|36860700004; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?jjrfv10dq/vW2StHNHAMwl8xVfZUPObnh0hDDKihtdZ33jgK52ouN/2S6raK?= =?us-ascii?Q?ewd0Rra2CJNj6nZ7460JuMhYisvAVpX4nFHMdzTXeHQTzy/FLTe/nq9CSHHQ?= =?us-ascii?Q?sDFKb49sOVqpPF+MQ4PQ0hxQesOLq4BYi0QcqiMhg0X7GE9XeN2WV73fSIOt?= =?us-ascii?Q?72VjCAf0bguWm+Tt3QLlzpvdRtjDOFK6wS2Q/1LG4SkaN+u6i/riW7blwW5G?= =?us-ascii?Q?yi9a9c9Q2RcUsVAQqMZbipjKGktloN2QK4MT6TcDPotYbBtk0JvGrfFCoeiY?= =?us-ascii?Q?1XiMMTJyHxV8JNPJmVzq2Texx5iYN3pBqfhAJNJ65KviBbIk61d5l9qsPPNc?= =?us-ascii?Q?xAukLFyZu+OpIX8bvHi8EjgFlCQxTPolNY8brKLkd3LqGEaUj5mE2Ee0tAcZ?= =?us-ascii?Q?kABhgYMfzoM6QmbMF3fhbl8Nf0QIK+fgyZw8Qjos6yjaGX378HTUIqxI7rER?= =?us-ascii?Q?DlBfaXHPzV2MS/6urN8BCd87qmCFtPckBorZ4LWpuEhRQl6gYPqwTI0o0YWN?= =?us-ascii?Q?k2eZeZ4fnJtmWISto0UyMb4LIZJerAttJOoVofSHEJAlQw2Ndy8aYSXe35xX?= =?us-ascii?Q?SgCovfE03rp1mNnNkWHgonGKlDgPXYUZd/q+aM+hY9a8Sl0tSD9lnQthUrMP?= =?us-ascii?Q?10ONKDMqsYEMJmpwu1p29Vvy5MmpJAjiDOvs6ivkKEtQ79R6nj4Xc9dI/2ne?= =?us-ascii?Q?tw2y1dZGJnffAsTDcWJqTFe2E3S4VykMhTYCPWjJBpE/uiKBK6sEpZ+8JZ/4?= =?us-ascii?Q?Je4EQI+NPXAGPc8GtgHlTxLvM7vGc/8o3harRfOTmPMsvkzPxwE3NnjMdZ3H?= =?us-ascii?Q?WV04oX42ur5YDSLWuvX31Z8ppMOByvLSJYomo1oHFTymjn1rCJ0AK4vQyvIK?= =?us-ascii?Q?x6zRPEZ+/EIWZw22z6MqLo1/jy8mzsXR9qYZrRxmkNpNZxnF08IiWpg7cMUT?= =?us-ascii?Q?ESxBoYH5VByapWTedXN8HVN7vx7hZtphyaNeKij0BMn2X6qwZ8mpuocIifMz?= =?us-ascii?Q?+zpBIBhTyDdI8tdY7SS8Ry5MSnRyhlFX9yvNngzaCeDLIBGxapTd/WzlEAqx?= =?us-ascii?Q?C15dLhwdq5nR91GWfl7/LQNvhsUZEKO8pfj9GoJFpu4ckuQrIwLYMlIXbhsz?= =?us-ascii?Q?ipbiOVWx/Chs+nxbFxdgtyTOV+lJPYjgoCsAG1NekdvpMVGfO62dAw+Da/s7?= =?us-ascii?Q?IY5jYn7tkf2rqfqhgwzI1tz01pHglWn/WefPJKvLF7hSYArnjoSIESq+dWPt?= =?us-ascii?Q?SbuizF6x1BVrU84O1PnINp02meuLkSjFY5yHAvJRK+Y+WGel+GI+bjHlBUE/?= =?us-ascii?Q?/dpSErsVsgpDn0M3tvMwwjSWBgAYWbn0qmcjSu9WJ48dnrmOJxJHUyLGgh8P?= =?us-ascii?Q?WqB1m0sTd1IIr3BYiMk79dQ2snJ8?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(1800799015)(82310400014)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 May 2024 17:18:59.9280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 888d90fe-c837-41de-00ad-08dc6a02ca9c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5786 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org DPDK defines cmdline input buffer size to 512 characters. That buffer size can be too small for long application input. For example, the following flow template API testpmd command is 444 bytes long: ``` flow queue 0 create 0 template_table 1000 \ pattern_template 0 actions_template 0 postpone no \ pattern eth / ipv4 / udp / end \ actions modify_field op set dst_type tag dst_level 0 dst_offset 0 \ src_type value src_value 0x31 width 32 / \ modify_field op set dst_type ipv4_src src_type value \ src_value 10101010 width 32 / modify_field op add dst_type \ ipv4_ttl dst_level 0 dst_offset 0 src_type value \ src_value ff width 8 / count / jump group 100 / end ``` The patch increases cmdline input buffer size to the LINE_MAX value. Signed-off-by: Gregory Etelson --- v2: set RDLINE_BUF_SIZE to LINE_MAX change the patch subject --- lib/cmdline/cmdline_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cmdline/cmdline_private.h b/lib/cmdline/cmdline_private.h index b64f363903..3d0168ce03 100644 --- a/lib/cmdline/cmdline_private.h +++ b/lib/cmdline/cmdline_private.h @@ -17,7 +17,7 @@ #include -#define RDLINE_BUF_SIZE 512 +#define RDLINE_BUF_SIZE LINE_MAX #define RDLINE_PROMPT_SIZE 32 #define RDLINE_VT100_BUF_SIZE 8 #define RDLINE_HISTORY_BUF_SIZE BUFSIZ -- 2.43.0