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 90BBD45813; Mon, 19 Aug 2024 13:34:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C1294028A; Mon, 19 Aug 2024 13:34:54 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 63F5540267 for ; Mon, 19 Aug 2024 13:34:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724067291; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fVaUupQoGYtDJ1ohSlopGvpmvdJbJ+guWO8HkLVb+d8=; b=eUosGTDkR4Zs3Al+EIVOqi1dcSgy7eADGL3aukg/beVwRr2A0YPwWxxuSCSMj9Pcv+qv8O K1EEfJQM+DkWKw3CuFdv02abp5pLajvWeHoWN0N0fuuCoV3qkZLAFfNU++nWbebbj6K32N 3BEALvh8eaZSyAqf31Qh+5tKnCYuQRU= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-124-dIEZRsGmNriHI-Aob3IyDQ-1; Mon, 19 Aug 2024 07:34:50 -0400 X-MC-Unique: dIEZRsGmNriHI-Aob3IyDQ-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52fcf7eb289so4035251e87.3 for ; Mon, 19 Aug 2024 04:34:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724067289; x=1724672089; h=in-reply-to:references:user-agent:subject:to:from:cc:message-id :date:content-transfer-encoding:mime-version:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fVaUupQoGYtDJ1ohSlopGvpmvdJbJ+guWO8HkLVb+d8=; b=jVMq5plJAEgDUDEsw+iO7KyXXv3Y580ojaSzD9fvXwg8G3KEdAS+yg+MYe1YM/mZZc yuXGSbOIHB40f9RttG4m1HrcgYjdgNBHsndXr8qKP+63UH3Ka4RgftbxDpA6ZII9O4/9 VklWl3h6SulYvahLUayOSCPEWAzVeGffWZjJplj8RbgVMnIjvFiPc1OIGC4zUbPFOho1 0dvxqEduMTXYcoT2vD1wMyVxPNft/Hw1jarTPQyB70qUA5qd08zpQqdDu6kQIeiA69EO zMRL3PhIixfzp0IRpw7KJGHTc4siE8RJgUvmrKZXYP61LrPzwO1+IWd5tbpCZjtrQT6o hfig== X-Forwarded-Encrypted: i=1; AJvYcCUTrenUcNvSthda96J/j3mazfmc4FMfMRuFve/LlRg0o+xCscRnFJKiCCEJPtGp3dJZUNDQ0Z6A5XLFGT4= X-Gm-Message-State: AOJu0YzCaAr2aZI4+SA+lnnmSDkp5eaxiE/T3XezoboMy4gBj9ooVCvM 5u3rz6Q70uHPKJX1fGoEl54wld2RCAzn/Zokxa0F2J9TYqV8Rg1B/ZVPD4d0JMFNgZHam+81j+m MMlJLWMBMXFe4fJYv5IAo2JrgOmFL2jmyJk7f6RcW X-Received: by 2002:a05:6512:124b:b0:52c:e170:9d38 with SMTP id 2adb3069b0e04-5331c6b027bmr8067614e87.31.1724067289171; Mon, 19 Aug 2024 04:34:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPNPnas1AZM2eclJnChZBF5sZ7TJc0cF3rFGiSZ9rc+gQhI1yMszQ46hwQmO4G7XM5orIWoQ== X-Received: by 2002:a05:6512:124b:b0:52c:e170:9d38 with SMTP id 2adb3069b0e04-5331c6b027bmr8067587e87.31.1724067288490; Mon, 19 Aug 2024 04:34:48 -0700 (PDT) Received: from localhost (2a01cb00025433006239e1f47a0b2371.ipv6.abo.wanadoo.fr. [2a01:cb00:254:3300:6239:e1f4:7a0b:2371]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5330d3ff70fsm1516746e87.155.2024.08.19.04.34.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 19 Aug 2024 04:34:48 -0700 (PDT) Mime-Version: 1.0 Date: Mon, 19 Aug 2024 13:34:47 +0200 Message-Id: Cc: From: "Robin Jarry" To: "Anatoly Burakov" , Subject: Re: [PATCH v2 4/4] usertools/dpdk-devbind: print NUMA node User-Agent: aerc/0.18.2-23-g4abdbd4014f5-dirty References: In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed 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 Anatoly Burakov, Aug 16, 2024 at 14:16: > Currently, devbind does not print out any NUMA information, which makes > figuring out which NUMA node device belongs to not trivial. Add printouts > for NUMA information if NUMA support is enabled on the system. > > Signed-off-by: Anatoly Burakov > --- Acked-by: Robin Jarry NB: Although it is better than dpdk-hugepages.py, this script could also=20 benefit from a major cleanup as you did for cpu_layout.py. > usertools/dpdk-devbind.py | 27 +++++++++++++++++++-------- > 1 file changed, 19 insertions(+), 8 deletions(-) > > diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py > index b276e8efc8..c0611a501d 100755 > --- a/usertools/dpdk-devbind.py > +++ b/usertools/dpdk-devbind.py > @@ -110,6 +110,11 @@ > args =3D [] > =20 > =20 > +# check if this system has NUMA support > +def is_numa(): > + return os.path.exists('/sys/devices/system/node') > + > + > # check if a specific kernel module is loaded > def module_is_loaded(module): > global loaded_modules > @@ -579,18 +584,24 @@ def show_device_status(devices_type, device_name, i= f_field=3DFalse): > =20 > # print each category separately, so we can clearly see what's used = by DPDK > if dpdk_drv: > + extra_param =3D "drv=3D%(Driver_str)s unused=3D%(Module_str)s" > + if is_numa(): > + extra_param =3D "numa_node=3D%(NUMANode)s " + extra_param > display_devices("%s devices using DPDK-compatible driver" % devi= ce_name, > - dpdk_drv, "drv=3D%(Driver_str)s unused=3D%(Modul= e_str)s") > + dpdk_drv, extra_param) > if kernel_drv: > - if_text =3D "" > + extra_param =3D "drv=3D%(Driver_str)s unused=3D%(Module_str)s" > if if_field: > - if_text =3D "if=3D%(Interface)s " > - display_devices("%s devices using kernel driver" % device_name, = kernel_drv, > - if_text + "drv=3D%(Driver_str)s " > - "unused=3D%(Module_str)s %(Active)s") > + extra_param =3D "if=3D%(Interface)s " + extra_param > + if is_numa(): > + extra_param =3D "numa_node=3D%(NUMANode)s " + extra_param > + display_devices("%s devices using kernel driver" % device_name, > + kernel_drv, extra_param) > if no_drv: > - display_devices("Other %s devices" % device_name, no_drv, > - "unused=3D%(Module_str)s") > + extra_param =3D "unused=3D%(Module_str)s" > + if is_numa(): > + extra_param =3D "numa_node=3D%(NUMANode)s " + extra_param > + display_devices("Other %s devices" % device_name, no_drv, extra_= param) > =20 > =20 > def show_status(): > --=20 > 2.43.5