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 19907A00BE; Mon, 16 May 2022 21:43:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AACCA40A7A; Mon, 16 May 2022 21:43:31 +0200 (CEST) Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60073.outbound.protection.outlook.com [40.107.6.73]) by mails.dpdk.org (Postfix) with ESMTP id C64884068B for ; Mon, 16 May 2022 21:43:30 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DJyEaMevTKIQtTr9ZPlUulD82SQ4p0yDoYO77v5CyKO8N37JucDp/q5zMobgXcUJsGkBrxa3kjX7qU5RHXSg6Mdcf1Y/dn6Z1G+iUV1DyzQabcclW2h8jLUr5eeujIdB1PZ0B0Ap4gmM32kXuEvKYxv8B2a2d6/Z094tiHAkqrxG5qgTpZ4WtpM+yhDkaP2lUuok6zD7LXtLEW1+McxFF8JufAxRvC8ajRsB6yndFQc6b/Vi0Oubt+v+wDb3jw1InYcShKKV0OJHjmyfpgA29Ra+DLkvDLln2kqXzO37joDHEbiMJ7M6cH2BZnQs0NQD+mzdSFTle/URqsuI/qo6OA== 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=H/9pgyJBT9eBQeymfbLpwybqXtntUC3Ho9MNgxq5hR0=; b=EyBsYjii7yhKUJq9wYPRsf16grXKs7aTB6dTDC511RDBgTP2555yer3QUa6AQXm96Fzs5JmN5V2XX50tGBpoTK/mcIs5FYWjSQKONH27mbxb+iisS5ToAWH/ADHxyngyS/hXnWW1UlthF1qN9Py2x10nJ9SxQYnwfyX4BEY9JgkYVjiYNloig29E8G/aTQzRlQg2trH+Ku+frC8uKfl8MKXU37C+TDqUj2zK2P58FpN5dAoZh1QZDq6QFAt+BDPp5mJfSk3g4+Ni3v5S7epCjyyqwOKimsl/301puZooAr3Wbf6mrvToOKPRpQaGlyEoou1hIe4OU4brcb4PR3Yxmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=xsightlabs.com; dmarc=pass action=none header.from=xsightlabs.com; dkim=pass header.d=xsightlabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xsightlabs.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=H/9pgyJBT9eBQeymfbLpwybqXtntUC3Ho9MNgxq5hR0=; b=Uhfzr+eF+bB9n89xgGJkW5CgUHoEltTgMV3vCK5UOc168pDNsKfEn8vRdIr5UxXjlqYiohy+ZKxLurm3NjyO+/cFAJxfpVKBHj9obL0AGrB+GYBF+sZf+oF8+DZDC9KMrzPN1EwhuNLImVV2LZxPelP4Z9qy1YCUbzoEqfC20AM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=xsightlabs.com; Received: from DB9P193MB1482.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:2a6::7) by PAXP193MB1888.EURP193.PROD.OUTLOOK.COM (2603:10a6:102:1bf::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Mon, 16 May 2022 19:43:29 +0000 Received: from DB9P193MB1482.EURP193.PROD.OUTLOOK.COM ([fe80::3c11:328c:a5e5:7253]) by DB9P193MB1482.EURP193.PROD.OUTLOOK.COM ([fe80::3c11:328c:a5e5:7253%6]) with mapi id 15.20.5250.018; Mon, 16 May 2022 19:43:29 +0000 Message-ID: <3a576578-c9c8-79f1-53a7-a31f37d5f8e9@xsightlabs.com> Date: Mon, 16 May 2022 15:43:23 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v2] eal: allow worker lcore stacks to be allocated from hugepage memory To: Stephen Hemminger Cc: dev@dpdk.org, mb@smartsharesystems.com, anatoly.burakov@intel.com, dmitry.kozliuk@gmail.com, bruce.richardson@intel.com, Honnappa.Nagarahalli@arm.com, nd@arm.com, haiyue.wang@intel.com References: <20220502141058.12707-1-donw@xsightlabs.com> <20220513175822.69905-1-donw@xsightlabs.com> <20220513143805.2aa167b0@hermes.local> From: Don Wallwork In-Reply-To: <20220513143805.2aa167b0@hermes.local> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: VI1PR0902CA0032.eurprd09.prod.outlook.com (2603:10a6:802:1::21) To DB9P193MB1482.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:2a6::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f90b3815-d915-463b-4e9b-08da377459fd X-MS-TrafficTypeDiagnostic: PAXP193MB1888:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: H6TT2DENO3KwsoU2puoLa3OQEd9wDnsODdjt8PHy7rvLlHEWFLFJOGo2eKzrqres+BN4wV0W3Tl4TadvTLDjrP+kyr8GPB4z+a+p2shYVL8pqUCNS9K9tPe02uy0vX0h6l7rrrWz6cIEv+XuiJKSiNDXef28SBz6LfgRTyTQBjaxK/K86ofA62iXBLRmtIVrteeZPTs9LW2+KWZmuKBiHQu6Lpq4Zl3kO0MXaMvQuOP8ZdhaicHej2SChl6O4KZiT7G7b39dz1+KTYlVO96L7KA4QpI7sR5d+al9p/1tilIqKoz/yx0G0+aayNKU6wxVdpxGjMtGaqQbQAVr2ijx+Ul4FFCZis2u/9LF3qL9FHM5OyIRwJ/xpoKZwWMLpH0HuHtqclMY3ESNR8tUSlpHwp03BeEYum5RtWsgpFXmr81gAACFv+2IYxJ8x4GSVoNqrRuQEzifvKQtCkmj+yg0+xdQyz13FfWhBXynK3TujHk7Dz8CKwyCjCZnyoxqgv3PlXFFITqfVcUU7cSvys8tXrUzfQMGfXaZj20AppvaASbXhuaz/p722RFV5362J9ANcKPFYInL/5faMV5SpP56EEj9AXxhNRS+ecIX03+F1N05zl1VYFaT8mKFr3hal4XTWrvCxtmQ5Ya9SaKNvdITVTk3HUNeBBKJAzwn9IA/geMzA1WTQi9kBSJSxnVluCUwXNUYA0Ew8jqbA+HU10UfNj0ca8W2mtI1NUztpemIdHY1iVQRBK2gVZEFICZjxaad74Cuc8QxgWiSZtyQfCuKvQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9P193MB1482.EURP193.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(4326008)(66556008)(66946007)(4744005)(8676002)(66476007)(6512007)(6506007)(6486002)(26005)(6916009)(53546011)(316002)(2906002)(31686004)(36756003)(2616005)(186003)(8936002)(52116002)(38350700002)(86362001)(6666004)(38100700002)(5660300002)(508600001)(31696002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q2gxRnBxamRxaEhkQ2UrS29qVjJZNUJ6UHZHQ3NMMTZpYmJmMkJlM2NLZHlW?= =?utf-8?B?ZVUrZ3FoZEorUjJuNXpPcWpMSndzTWVRTGYzQndpR2UxSGx1ZHJXbTN4UVhB?= =?utf-8?B?Z0R5MXd4YWdpb1V0SUFvRVBPMnB6MHg2UU1EVTRyR2NLaUduTGw2TFJ1bHVk?= =?utf-8?B?SD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dKZ0pBMy9VcjhN?= =?utf-8?B?ZFpySTJsUmlOb25BRGFFY2RVeFU0dzJUamY5Z3VQQjB6aGJUT2pnN0NPc0hp?= =?utf-8?B?dmpucTRjSW9PL3NhM2xzbVVqMFAwSEVoMy9OVzlPbzFCWHE5Q3ZJdm9ZK0RE?= =?utf-8?B?MUdHUVRyeUo4YTVnMXBUdjR0aGkrVEdZZlEwZ2hrWVFsQnBMMjB2NzlBNDdi?= =?utf-8?B?OW1jYW15WW9PK2s1aFhjRVYyZ1pvbmVwQ1lyMVFmQm9Zb3NrN1R2K0RVNlBQ?= =?utf-8?B?Z1A3TEtJZTV2bCt1d0c4aE11OGIxaFN0ejZZTGIxK090ZnpWUEZUcUlMS0dK?= =?utf-8?B?QUpQdTdydTNqbWg4VkI4bVNablZsVE8vbkNNanNVanFzV3FVNWYrZz09?= X-OriginatorOrg: xsightlabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: f90b3815-d915-463b-4e9b-08da377459fd X-MS-Exchange-CrossTenant-AuthSource: DB9P193MB1482.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2022 19:43:29.3728 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 646a3e34-83ea-4273-9177-ab01923abaa9 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: woOxu1iZJRq5HJ3kBn8xg6zzDnryq/I7gst5aWMM6CPuit4aPZnWlpXrpoTHOPDkL4kQzzxF1NyGg4SsXJd09A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXP193MB1888 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 On 5/13/2022 5:38 PM, Stephen Hemminger wrote: > On Fri, 13 May 2022 13:58:22 -0400 > Don Wallwork wrote: > >> +static int >> +eal_parse_huge_worker_stack(const char *arg, size_t *huge_worker_stack_size) >> +{ >> + size_t worker_stack_size; >> + if (arg == NULL) { >> + *huge_worker_stack_size = USE_OS_STACK_SIZE; >> + return 0; >> + } >> + worker_stack_size = atoi(arg); >> + if (worker_stack_size == 0) >> + return -1; >> + > Since worker_stack_size is size_t you are better off using something > like strtoul() and check for more errors from that This and your other comment are addressed in the v3 patch.