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 9378EA00C4; Fri, 30 Sep 2022 10:11:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83BC540E5A; Fri, 30 Sep 2022 10:11:22 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id CAD8340684 for ; Fri, 30 Sep 2022 10:11:20 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id n40-20020a05600c3ba800b003b49aefc35fso1844892wms.5 for ; Fri, 30 Sep 2022 01:11:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=8jGn51D0MG1/n2eN2NrW5ejfI0MF0dz0TgH5xqcs3QU=; b=hUVmIrRvbX9TR7XCcBMWZA9Z2rml9mIqxYMblu2Aazh9tHKVDsFJjY2+0HnOWLjbij YPGuGFqIA10GDEF4o7WIqjvCMdOalEU54CAmaZpvZt5GhfxKfjWihVNF3WEtAfTL0byp t1GejoMHZ7D5eCXw8HuKpbNxvEV4YXLSaIPf1+iBWecE7skcFqAf9X6KzgdM8TBBkzd1 CUK3lCaro5hQjM7rEmTpxWN0jmD4C4CV0D7whAh31pAv1j6uYGoYSP52eW8zrH97kaMA Ut6UaRM3CWqFNjmUVtlmMtm5a8dMB1m3XekUBd0y6zRIQIvp5lzaESeRS3MYS00fh5d4 31Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=8jGn51D0MG1/n2eN2NrW5ejfI0MF0dz0TgH5xqcs3QU=; b=zwntSzXStj4qecpWgzvXiaS6+Bj83YBnmWcp1WYKyP+fVDyY2Aq2TZx8INfKiEZoiR PgvCYN88anUA2uoTaj1OY5/HZ5Zufmy8+2KGBWd+O3EMgBBKa6tGzp6x5z1vgN3mok1K cfqwEDqvw3ETThDMhQ79GTm6qLydlZ1gYtXumxOUUjPsmF5JbOd6c5XmC+0oADbNTlT7 OPnPfYGta6/XR+7+eUVYRjWJoYmmHm7cYDHYY24a7yi3Jl9H8fc+YYr+pnodgpxjWf7T IzLRURF3uvZa4/7C9mBa81M6eOgAgz6n7olKZ6Y85FQ7mP+ClB/OWMT7OY6m2kWlNqjQ E5mQ== X-Gm-Message-State: ACrzQf0nnr6oU6+gh/g5APo8XlY+LLnwdHbJEjzhbf2BzB4hSCfqgXb/ 8WOL3Pa9rFE3xZMur6Y5DNwpbQ== X-Google-Smtp-Source: AMsMyM65FrjTvSICBMp2T27Wa9OsEgvBGE7smS11jSI+EaRbU+kH0abqlLdoVILAHqzvhnzJi2lsdA== X-Received: by 2002:a05:600c:a14e:b0:3b4:7ff1:299b with SMTP id ib14-20020a05600ca14e00b003b47ff1299bmr13325411wmb.18.1664525480435; Fri, 30 Sep 2022 01:11:20 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id a14-20020adfed0e000000b0022ae4f8395dsm1309586wro.96.2022.09.30.01.11.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 01:11:19 -0700 (PDT) Date: Fri, 30 Sep 2022 10:11:19 +0200 From: Olivier Matz To: David Marchand Cc: dev@dpdk.org, Ray Kinsella , Parav Pandit , Xueming Li , Hemant Agrawal , Sachin Saxena , Stephen Hemminger , Long Li Subject: Re: [PATCH] drivers/bus: set device NUMA node to unknown by default Message-ID: References: <20220929120512.480-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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, Sep 30, 2022 at 09:10:55AM +0200, David Marchand wrote: > On Thu, Sep 29, 2022 at 2:05 PM Olivier Matz wrote: > > > > The dev->device.numa_node field is set by each bus driver for > > every device it manages to indicate on which NUMA node this device lies. > > > > When this information is unknown, the assigned value is not consistent > > across the bus drivers. > > > > Set the default value to SOCKET_ID_ANY (-1) by all bus drivers > > when the NUMA information is unavailable. > > > > Signed-off-by: Olivier Matz > > - The dma/idxd driver, which has its own bus, seems ok, though I > would align its code for readability. > > @@ -322,7 +322,7 @@ dsa_scan(void) > > while ((wq = readdir(dev_dir)) != NULL) { > struct rte_dsa_device *dev; > - int numa_node = -1; > + int numa_node = SOCKET_ID_ANY; > > if (strncmp(wq->d_name, "wq", 2) != 0) > continue; > > > - There is an impact on upper classes of devices. > > For ethdev, a port inherits the numa_node value from the rte_device object. > Yet, rte_eth_dev_socket_id() is described as: > * @return > * The NUMA socket ID to which the Ethernet device is connected or > * a default of zero if the socket could not be determined. > * -1 is returned is the port_id value is out of range. Good catches, I'll fix them in v2. Thanks, Olivier