From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [dpdk-stable] [PATCH 2/2] eal: fix corelist validation with disabled cores Date: Thu, 07 Mar 2019 21:23:51 +0100 Message-ID: <1660386.vIg6TEdDp7@xps> References: <1550088419-10812-1-git-send-email-david.marchand@redhat.com> <1550088419-10812-2-git-send-email-david.marchand@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: stable@dpdk.org, dev@dpdk.org, didier.pallard@6wind.com, hari.kumarx.vemula@intel.com, stable@dpdk.org To: David Marchand Return-path: In-Reply-To: <1550088419-10812-2-git-send-email-david.marchand@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 13/02/2019 21:06, David Marchand: > -l and -c options are two ways to select the cores used by DPDK. > Their format differs, but the checks on the selected cores are the same. > Use an intermediate array to separate the specific parsing checks from > the common consistency checks. > The parsing functions now concentrate on validating the passed string > and do nothing more. > > We can report all invalid core indexes rather than only the first error. > In the error log message, reporting [0, cfg->lcore_count - 1] as a valid > range is then wrong when the core list is not continuous. > > Example on my 8 cpus laptop with core 2 and 6 disabled. > echo 0 > /sys/devices/system/cpu/cpu2/online > echo 0 > /sys/devices/system/cpu/cpu6/online > > Before: > ./master/app/testpmd -l 0-7 --no-huge -m 512 -- --total-num-mbufs 2048 > EAL: Detected 6 lcore(s) > EAL: Detected 1 NUMA nodes > EAL: invalid core list, please check core numbers are in [0, 5] range > ... > > After: > ./master/app/testpmd -l 0-7 --no-huge -m 512 -- --total-num-mbufs 2048 > EAL: Detected 6 lcore(s) > EAL: Detected 1 NUMA nodes > EAL: lcore 2 unavailable > EAL: lcore 6 unavailable > EAL: invalid core list, please check specified cores are part of 0-1,3-5,7 > ... > > Fixes: d888cb8b9613 ("eal: add core list input format") > Fixes: b38693b612b4 ("eal: fix core number validation") > Signed-off-by: David Marchand +Cc: stable@dpdk.org Applied, thanks