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 DDE1644034; Wed, 15 May 2024 10:42:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 59DCC4025C; Wed, 15 May 2024 10:42:00 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2073.outbound.protection.outlook.com [40.107.92.73]) by mails.dpdk.org (Postfix) with ESMTP id 6950F4021D for ; Wed, 15 May 2024 10:41:58 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ViU5uK9y6JqTYxvfUU3Ishztrk/ug8Nqqw91wTOZ5sZ0t+h2lg0fA7PUl6whUgSEdHntHmpCIA3n7KNBsyLwIZcEV2IJWmL2714nraeRa3Ayj0FKv1DvTjQKP/cYYn4Fyxa/lY6xrpdwpFHzlYTffTapWgeWV7EczkxwG08eMBrhIb+Gsc0btuimALNkA+bQ1T7DErfz8gR2Zi0Z788TNCr0R3pwn8jKR/rjrU2TiukyavTF++cLGn35qULCooyiE5kt/pwDbztlnxVmGh8nQyzmar6+YT6ItL8wiODKg9o59qlsW2q5HtBjPcAMs9e4A6ktG9KiMo1BP/2oeKfCSQ== 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=CkP2IAOhYZB6Fw1MDMxdPXIQkOKXLbRaIvGbwhUmfwY=; b=W1s14ZAPS1aL7HYpxig+ADM41yzbxRZXCRvxwNwQWDzC9VTcI9ZJDd6gm9eLarAHoUNuIcKsuBt2g0fNhHoXIGJIzUlZ3KdA5RGXdsDBQuVjFVSw5+cku1iOw7azhabTfqq0DdNPm+mKkBnFs4EvWINGrz3mOBMwrMGZj9NfDLDrsSjwhXg6WLG1MtmaiGILgDT7VB753XEHrhVRI0qqmtHcuCqIrSAY0I1JN6o1BTZTAFdhCEqQMAxuEhArh2euF3SKvJwM1/qochIHIKcH6Hv6+Rny2tb8Xrx9YkzCX3CXFVFb5yNtCvRHxFRjqux56AbvouQQn4rgXoUr9n4JVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=CkP2IAOhYZB6Fw1MDMxdPXIQkOKXLbRaIvGbwhUmfwY=; b=chcyXJB0FYwYE+4xWn0WnFLpb+MAQD+nY73aJKhPvAG103zivxO5E6otpr7bS0zLuclc+GFscre01G7Z1SoA3ic6e2aMztae+VKQGBO/e64xGBN1FFrf815CEvdX7hoaU3J53uQiRK9SQvxhC2j86DwP9xkjtFoM7dGAm/PxRZqBGDxtQmydw9WwhJBPDtFFEN3gfNv9w8VCvXZJQCA1vHqUrNenkjERociu0353zwef2SAl55ZdaMcPHCr6T2KerpakgYYOnqGljstPSFj0TQwNz+8E1ebyE3guSG3dUI/H/w7UYbLhVV6wx5nCslkX4A8FWRcM/yvdO5HzMmVuNA== Received: from IA1PR12MB6332.namprd12.prod.outlook.com (2603:10b6:208:3e2::13) by DM6PR12MB4404.namprd12.prod.outlook.com (2603:10b6:5:2a7::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.27; Wed, 15 May 2024 08:41:56 +0000 Received: from IA1PR12MB6332.namprd12.prod.outlook.com ([fe80::fa11:4787:4eba:c196]) by IA1PR12MB6332.namprd12.prod.outlook.com ([fe80::fa11:4787:4eba:c196%6]) with mapi id 15.20.7544.052; Wed, 15 May 2024 08:41:55 +0000 From: Gregory Etelson CC: Ali Alnubani , "dev@dpdk.org" , Maayan Kashani , Raslan Darawsheh , "bruce.richardson@intel.com" , "stephen@networkplumber.org" , "mb@smartsharesystems.com" Subject: Re: [PATCH v3] cmdline: increase input buffer size Thread-Topic: [PATCH v3] cmdline: increase input buffer size Thread-Index: AQHanRJHG9cQ/CoWs0OoyyXb4fcaPrGYDP26 Date: Wed, 15 May 2024 08:41:55 +0000 Message-ID: References: <20240501052659.231457-1-getelson@nvidia.com> <20240503042715.344550-1-getelson@nvidia.com> In-Reply-To: <20240503042715.344550-1-getelson@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: IA1PR12MB6332:EE_|DM6PR12MB4404:EE_ x-ms-office365-filtering-correlation-id: 49f4d601-2e60-4f5f-2295-08dc74bae08a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|366007|1800799015|376005|38070700009; x-microsoft-antispam-message-info: =?iso-8859-1?Q?N+GqsvLTPmbt2xmr+6ib/cJ3Ur1GMe+9LfHs6M6QCiBNTMzbbKoNyIBkIA?= =?iso-8859-1?Q?4SqOUvOPQkfbOYinxBzdRpu8ASlt65p34zM1uckxQixcTD87XWc0Qdapri?= =?iso-8859-1?Q?XiScq9tsjVI3FsbMpLM4MF2JUsVeQRXNeiZzSq1U5fvL1lAtqXz4+45YYI?= =?iso-8859-1?Q?b5Aa9BMA4UAzvwEzQOKqO0ZqKTrOwUVjtvLobUtPMn72OuZcy5NQRpg83a?= =?iso-8859-1?Q?CCWgk8bMZxu5DZ8trZ+Q3Kpv5cv9XVyGBoyy7Bw2uuVvv158X8W7dtwiVF?= =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HLpZILtuT0?= =?iso-8859-1?Q?PWLpOxoRHcaLHmB2NO1CuokBViHyyNFmfbkK5HAfQNd76lwWpNEKhi9TQO?= =?iso-8859-1?Q?aVqjybbFSo+Jj7xeWNyBZyKIYH6tNWz27HcyIvr2A+NxXhckUwgWWA7lk8?= =?iso-8859-1?Q?PNNXx70ux1mkXklJTbM037xZrvydLiMrCAKY/heQJgwaQY47uYgavZJ5AQ?= =?iso-8859-1?Q?oYQRvz84YWl7DoT/XitLtKMdoqBH43og=3D=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:IA1PR12MB6332.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?YGFDaP6f17ldVK4VfZjEzzSZSNNOzuUH9DUCEgy9SVCR+U874MQZr8XMI1?= =?iso-8859-1?Q?T339aBHcX5Zrj7SlEJwDh7c0HT/aPTEe3Fhtjh+cFuH1GTPaZTcZwPzLrj?= =?iso-8859-1?Q?1PKxPFb+gUgdUKWxTMUeqfIbrHSOUsr/08VZX4UMghDos07uWuPSIkts0F?= =?iso-8859-1?Q?tx3qEUKtfrzgSDbQbPeeOdlMhezzmYpzWtnvv+kNnXI33N9bpu7fBS7Sxm?= =?iso-8859-1?Q?aINHpqPIaElWAjBWLgj7h7fl6P/DwQFD59UDYHLdDqd+OmCPEELqi5tiNZ?= =?iso-8859-1?Q?83UTINdMJZT6a+jfap1U+kE6fR6srg9PE3rgSU0QhWIkjve588JN8z+gDx?= =?iso-8859-1?Q?gMyqJluSuITJE3nRdTo7i9a5AZ0Zajq3Nm9LrNiIpN4lUh6Sw5bHPfSpPc?= =?iso-8859-1?Q?aFEgWoBFXmOy6ooWw+kPXeJkixuhhCQdReAXljOM14lenvnoZW+G+RTYoR?=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6yx0xWNu1pgCjyUrMEhmPUTwOQq6k7ZkLD2K?= =?iso-8859-1?Q?yU/BGbB+1xlNj8F2Ajh4HzLBfzZkD8XVya/vZ3kitZwiGCEo3fqR/pVZ5z?= =?iso-8859-1?Q?U5jXXQ3mUr9SEd5gFXegCxLvspftXwv75Hwn3qLIwuQCevyTpK1ldpZYi2?= =?iso-8859-1?Q?0gwjhd029GZoYln8XkBZEYEuFzZt5H7PDTn/YjID+JXbH39BDhOwsXARU5?= =?iso-8859-1?Q?smokYKcVGwdfyi1swcxV+iSTcbklH8Wiq18MdQzu+TIkbewaVsrasttjw0?= =?iso-8859-1?Q?03H+AjgqhH6rqpMvtZfuLGr+yDzAmJAvUt?= Content-Type: multipart/alternative; boundary="_000_IA1PR12MB633276D5DEA1CF16385B8043A5EC2IA1PR12MB6332namp_" MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB6332.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49f4d601-2e60-4f5f-2295-08dc74bae08a X-MS-Exchange-CrossTenant-originalarrivaltime: 15 May 2024 08:41:55.9452 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: SQWSX3rthtbZlr6XOukCVdV0o3OZ2sXh9ZBCb7UZ5wynjLWxmW/M5aUik/AlsPmnrhJ29+KBO2GExyL1UOQoQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4404 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 --_000_IA1PR12MB633276D5DEA1CF16385B8043A5EC2IA1PR12MB6332namp_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello, What is the status of that patch ? Regards, Gregory ________________________________ From: Gregory Etelson Sent: Friday, May 3, 2024 07:27 To: Gregory Etelson Cc: Ali Alnubani ; dev@dpdk.org ; Maayan = Kashani ; Raslan Darawsheh ; bruce= .richardson@intel.com ; stephen@networkplumber.= org ; mb@smartsharesystems.com Subject: [PATCH v3] cmdline: increase input buffer size 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, which typically is 2048 bytes. Signed-off-by: Gregory Etelson Acked-by: Bruce Richardson Reviewed-by: Morten Br=F8rup --- v2: set RDLINE_BUF_SIZE to LINE_MAX change the patch subject. v3: fix Windows compilation error. --- lib/cmdline/cmdline_private.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/cmdline/cmdline_private.h b/lib/cmdline/cmdline_private.h index b64f363903..f00b025ecb 100644 --- a/lib/cmdline/cmdline_private.h +++ b/lib/cmdline/cmdline_private.h @@ -11,13 +11,20 @@ #include #ifdef RTE_EXEC_ENV_WINDOWS #include +#ifndef LINE_MAX +/** + * The LINE_MAX value is derived from POSIX. + * Windows environment may not have POSIX definitions. + */ +#define LINE_MAX 2048 +#endif #else #include #endif #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 --_000_IA1PR12MB633276D5DEA1CF16385B8043A5EC2IA1PR12MB6332namp_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hello,

What is the status of that patch ?

Regards,
Gregory

From: Gregory Etelson <g= etelson@nvidia.com>
Sent: Friday, May 3, 2024 07:27
To: Gregory Etelson <getelson@nvidia.com>
Cc: Ali Alnubani <alialnu@nvidia.com>; dev@dpdk.org <dev@dp= dk.org>; Maayan Kashani <mkashani@nvidia.com>; Raslan Darawsheh &l= t;rasland@nvidia.com>; bruce.richardson@intel.com <bruce.richardson@i= ntel.com>; stephen@networkplumber.org <stephen@networkplumber.org>= ; mb@smartsharesystems.com <mb@smartsharesystems.com>
Subject: [PATCH v3] cmdline: increase input buffer size
 
DPDK defines cmdline input buffer size to 512 char= acters.
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 \<= br>     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_ty= pe \
    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,
which typically is 2048 bytes.

Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Morten Br=F8rup <mb@smartsharesystems.com>
---
v2: set RDLINE_BUF_SIZE to LINE_MAX
    change the patch subject.
v3: fix Windows compilation error.
---
 lib/cmdline/cmdline_private.h | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/cmdline/cmdline_private.h b/lib/cmdline/cmdline_private.h<= br> index b64f363903..f00b025ecb 100644
--- a/lib/cmdline/cmdline_private.h
+++ b/lib/cmdline/cmdline_private.h
@@ -11,13 +11,20 @@
 #include <rte_os_shim.h>
 #ifdef RTE_EXEC_ENV_WINDOWS
 #include <rte_windows.h>
+#ifndef LINE_MAX
+/**
+ * The LINE_MAX value is derived from POSIX.
+ * Windows environment may not have POSIX definitions.
+ */
+#define LINE_MAX 2048
+#endif
 #else
 #include <termios.h>
 #endif
 
 #include <cmdline.h>
 
-#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

--_000_IA1PR12MB633276D5DEA1CF16385B8043A5EC2IA1PR12MB6332namp_--