mirror of https://github.com/F-Stack/f-stack.git
dpdk: Set default numa node for broken systems.
This bug has been fixed in dpdk upstream. But in the f-stack, we should use it for voiding ERROR. More info: http://dpdk.org/browse/dpdk/commit/?id=8a04cb6125896e9ea25a4d15a316f0d873822c7b Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
This commit is contained in:
parent
2408588520
commit
830124b89c
|
@ -348,15 +348,11 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus,
|
|||
/* get numa node */
|
||||
snprintf(filename, sizeof(filename), "%s/numa_node",
|
||||
dirname);
|
||||
if (access(filename, R_OK) != 0) {
|
||||
/* if no NUMA support, set default to 0 */
|
||||
dev->numa_node = 0;
|
||||
} else {
|
||||
if (eal_parse_sysfs_value(filename, &tmp) < 0) {
|
||||
free(dev);
|
||||
return -1;
|
||||
}
|
||||
if (eal_parse_sysfs_value(filename, &tmp) == 0 &&
|
||||
tmp < RTE_MAX_NUMA_NODES) {
|
||||
dev->numa_node = tmp;
|
||||
} else {
|
||||
dev->numa_node = 0;
|
||||
}
|
||||
|
||||
/* parse resources */
|
||||
|
|
Loading…
Reference in New Issue