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 1B4FCA00C3; Fri, 13 May 2022 23:38:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B383540E64; Fri, 13 May 2022 23:38:10 +0200 (CEST) Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by mails.dpdk.org (Postfix) with ESMTP id 2E23640DF7 for ; Fri, 13 May 2022 23:38:09 +0200 (CEST) Received: by mail-pf1-f178.google.com with SMTP id a11so8788188pff.1 for ; Fri, 13 May 2022 14:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lwSfJKMP2IDq6q9x4Wa8C7yvuO8X4RIprgP7cX5lOdA=; b=7qNST9WQ7kopimv8rvbfySR7i1OQ8V16tyqWQGJU8y/zyL4hlVFL99kqqAjwgsFPJU GqKSGo5U8+A2EyfTgHFTZDA/ldxnI750sxEL6jNAeHRnEDo76q8Yj19cIK/ohdlaUErx GjHkWSniR+yGktAKfo2raCbhzMSc/p48Jys/RKPHdU9nKBQn1TLnOpmwyHVmbrZHpUuW sjxS3Xfi52jHSxEQVpxSObJVs8M+gFdmJgKnDshiviqKPiyM+RMipY/xWgwAWqalcYo5 zShjsJ/vr5D95PAOnXDLxPG7vwVenbfqnSAkCtrsWxAQW4ag60Fpm+VQolTOmEhImavH ARBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lwSfJKMP2IDq6q9x4Wa8C7yvuO8X4RIprgP7cX5lOdA=; b=LkLxiCTWZ/Egx/MxBh2xv1lo6pi476C4lAutodJjyKonXLn3lOg9EWANLYKzczpgP3 Vwa/lggVk1IwGouPBXz8QndBVz6Nif4hZ3gsOVkM94xoGXsS1A81OR/NstBlR/J47H+j wgcwKdSdSZ5tr6Vtoe6cJe/9RNbawrEpjFfTe48mCWRxFYJZvMMKYIgs3MOHkMr5bmQ1 chj21nQilexipuj1IE9cmSmYeDnGYpD70vwb8BRJyWgCoRfUX2v8/e41CG9z2DrObcE3 qtvjSdmKVbF+KOz6A2M+J06GQEKGMruuVoqAkmf66Zq2HRiOtkEJHBMtwI80NFsFVUv/ oryg== X-Gm-Message-State: AOAM530dVupeo/VuQxeD2/1IPOnzeEcDYPtVzGXWun6AXXFW5Ws9TIUJ 82D+GsfqW7l/VvXvf9NO5E1qIw== X-Google-Smtp-Source: ABdhPJwD4MT2qsTaVOlqpmpwLqFEaRxztykTN5NvjmUttqGuTZ8pDbD0d4k30aYy5MTn86s/JvC5Jw== X-Received: by 2002:a63:894a:0:b0:3ab:2edc:b973 with SMTP id v71-20020a63894a000000b003ab2edcb973mr5555380pgd.219.1652477888285; Fri, 13 May 2022 14:38:08 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id 12-20020a17090a030c00b001dcf49d92a1sm2015177pje.28.2022.05.13.14.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 14:38:07 -0700 (PDT) Date: Fri, 13 May 2022 14:38:05 -0700 From: Stephen Hemminger To: Don Wallwork 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 Subject: Re: [PATCH v2] eal: allow worker lcore stacks to be allocated from hugepage memory Message-ID: <20220513143805.2aa167b0@hermes.local> In-Reply-To: <20220513175822.69905-1-donw@xsightlabs.com> References: <20220502141058.12707-1-donw@xsightlabs.com> <20220513175822.69905-1-donw@xsightlabs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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