DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Varghese, Vipin" <vipin.varghese@intel.com>
To: "Kadam, Pallavi" <pallavi.kadam@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"Menon, Ranjit" <ranjit.menon@intel.com>,
	"dmitry.kozliuk@gmail.com" <dmitry.kozliuk@gmail.com>,
	"talshn@nvidia.com" <talshn@nvidia.com>,
	"Narcisa.Vasile@microsoft.com" <Narcisa.Vasile@microsoft.com>
Subject: Re: [dpdk-dev] [PATCH] bus/pci: fix numa node return value
Date: Fri, 24 Sep 2021 09:13:51 +0000	[thread overview]
Message-ID: <PH0PR11MB48723410FBE0F7E16B04AF0590A49@PH0PR11MB4872.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210922211906.2135-1-pallavi.kadam@intel.com>

Hi Pallavi,

Assuming the intention is set SOCKET_ID_ANY for faulty cases, couple of observation. In Linux

```
        if (access(filename, F_OK) != -1) {
                if (eal_parse_sysfs_value(filename, &tmp) == 0)
                        dev->device.numa_node = tmp;
                else
                        dev->device.numa_node = -1;
        } else {
                dev->device.numa_node = 0;
        }
```

[snipped]
 
> @@ -243,7 +244,7 @@ get_device_resource_info(HDEVINFO dev_info,
>  		DWORD error = GetLastError();

Set the default value as ` dev->device.numa_node = SOCKET_ID_ANY;`

>  		if (error == ERROR_NOT_FOUND) {
>  			/* On older CPUs, NUMA is not bound to PCIe
> locality. */
> -			dev->device.numa_node = 0;
> +			dev->device.numa_node = SOCKET_ID_ANY;

If the API is unsuccessful for ` ERROR_NOT_FOUND ` then you can set it to  `0` (as recommened in documentation)

>  			return ERROR_SUCCESS;
>  		}
>  		RTE_LOG_WIN32_ERR("SetupDiGetDevicePropertyW"

Else if if it other errors it will ` SOCKET_ID_ANY`.
> --
> 2.31.1.windows.1


      parent reply	other threads:[~2021-09-24  9:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-22 21:19 Pallavi Kadam
2021-09-23 15:44 ` Tal Shnaiderman
2021-09-23 17:09   ` Thomas Monjalon
2021-09-24  9:13 ` Varghese, Vipin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR11MB48723410FBE0F7E16B04AF0590A49@PH0PR11MB4872.namprd11.prod.outlook.com \
    --to=vipin.varghese@intel.com \
    --cc=Narcisa.Vasile@microsoft.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    --cc=stable@dpdk.org \
    --cc=talshn@nvidia.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).