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 98692A0A0C; Tue, 29 Jun 2021 20:00:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 65FED411A5; Tue, 29 Jun 2021 20:00:21 +0200 (CEST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mails.dpdk.org (Postfix) with ESMTP id F0A5040E01 for ; Tue, 29 Jun 2021 20:00:19 +0200 (CEST) Received: by mail-pg1-f178.google.com with SMTP id u190so19247143pgd.8 for ; Tue, 29 Jun 2021 11:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l1RimQlU8LFaFeox1ZHSORvcvWhQSSE9j45w+RpJiIM=; b=fwMrKs7BBxqiAbG7etaJzQpjyXvCA+E6jQLHJKD+XXGcTqIg2QHlv5+e+rTMzDX5Vw tCcIfa32w65rcSgCJg9c+4F4d2VDlKH/I3zCBGtXctVFC5uZAtiQ6lsZhaWZTVyCZ6XH PyFEYB705Hq1i3QZinydAiipFwIE19ub7aKBhB6vCBP6glWVcpjLbgcPZ+PBJM6aJxmz wYYIjmbhVPBwRNRfVRl1SzTttPFEsOtKgUW4iJ9PetZFBFJebhVkraz4qg6FYDr+Ch1J W7P0YgNvipbbkNC57hlSB1WdvVeN3T3f6k73wqc/sn083W7zv4fPHymv5j1QWgBJSJS1 GakA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l1RimQlU8LFaFeox1ZHSORvcvWhQSSE9j45w+RpJiIM=; b=DzRtDTa+toaUnLQ+XQFBrLEmsKNJ2l2sB5Qu3isLdis/WxtJ0wFvdZBZK699qtaUl9 DBwYihPm7p57MOpgices2kVS5rJJku+Tk3GEK5T49GSoUvYQ5Eibq97yS1/Ns9k6DfHo Qcff2Meg8cDtbmioBJ7Y5wWQKkqnex2a71kznB8sF/8L9lQSfy/vZe1SFINXTKbeIuBb pLYh+xNke/uPH/T4uKkD/AXTUSCfgUt20VzmkVTe/H+qNkHEHEj89zavhK1EJlE06eqZ Brv9auD2DVEv0EEOa0LKYDFvxufuP68CnpFPGxXKxauO3AhY5NhSosAXuqvIjcW5TzRq fA/Q== X-Gm-Message-State: AOAM532MZmfSsrLm7PyYwSgmi7qyv0FLcJiHQn8G1bBhSLTPR9CZ1GeE pIZmvG6wO7nGF6wKM/hfFZv/OA== X-Google-Smtp-Source: ABdhPJzGiDRnWQWDNzojsaIt6HhkusM6sSdWcRQuYq+eFX1rJ2WcwWqc2ZpqQc0YCtrHDGXACvCtZA== X-Received: by 2002:a63:d213:: with SMTP id a19mr29786084pgg.28.1624989619122; Tue, 29 Jun 2021 11:00:19 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id t27sm6344953pga.90.2021.06.29.11.00.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 11:00:18 -0700 (PDT) Date: Tue, 29 Jun 2021 11:00:15 -0700 From: Stephen Hemminger To: Juraj =?UTF-8?B?TGlua2XFoQ==?= Cc: thomas@monjalon.net, david.marchand@redhat.com, bruce.richardson@intel.com, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, ferruh.yigit@intel.com, jerinjacobk@gmail.com, dev@dpdk.org Message-ID: <20210629110015.47a10d63@hermes.local> In-Reply-To: <1624964105-6525-1-git-send-email-juraj.linkes@pantheon.tech> References: <1618827522-31828-1-git-send-email-juraj.linkes@pantheon.tech> <1624964105-6525-1-git-send-email-juraj.linkes@pantheon.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v4] build: optional NUMA and cpu counts detection 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 Sender: "dev" On Tue, 29 Jun 2021 12:55:05 +0200 Juraj Linke=C5=A1 wrote: > diff --git a/buildtools/get-numa-count.py b/buildtools/get-numa-count.py > new file mode 100644 > index 0000000000..3b67564fd4 > --- /dev/null > +++ b/buildtools/get-numa-count.py > @@ -0,0 +1,24 @@ > +#!/usr/bin/env python3 > +# SPDX-License-Identifier: BSD-3-Clause > +# Copyright (c) 2021 PANTHEON.tech s.r.o. > + > +import ctypes > +import glob > +import os > +import subprocess > + > +if os.name =3D=3D 'posix': > + if os.path.isdir('/sys/devices/system/node'): > + numa_nodes =3D glob.glob('/sys/devices/system/node/node*') > + numa_nodes.sort() > + print(os.path.basename(numa_nodes[-1])[4:]) > + else: > + subprocess.run(['sysctl', '-n', 'vm.ndomains']) > + python lint has warning here buildtools/get-numa-count.py:16:8: W1510: Using subprocess.run without expl= icitly set `check` is not recommended. (subprocess-run-check)