mirror of https://github.com/F-Stack/f-stack.git
Merge pull request #58 from nickcooper-zhangtonghao/master
Fix bugs for f-stack when running in VMs.
This commit is contained in:
commit
642d53f0d6
|
@ -348,15 +348,11 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus,
|
||||||
/* get numa node */
|
/* get numa node */
|
||||||
snprintf(filename, sizeof(filename), "%s/numa_node",
|
snprintf(filename, sizeof(filename), "%s/numa_node",
|
||||||
dirname);
|
dirname);
|
||||||
if (access(filename, R_OK) != 0) {
|
if (eal_parse_sysfs_value(filename, &tmp) == 0 &&
|
||||||
/* if no NUMA support, set default to 0 */
|
tmp < RTE_MAX_NUMA_NODES) {
|
||||||
dev->numa_node = 0;
|
|
||||||
} else {
|
|
||||||
if (eal_parse_sysfs_value(filename, &tmp) < 0) {
|
|
||||||
free(dev);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
dev->numa_node = tmp;
|
dev->numa_node = tmp;
|
||||||
|
} else {
|
||||||
|
dev->numa_node = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse resources */
|
/* parse resources */
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
* Configurable number of RX/TX ring descriptors
|
* Configurable number of RX/TX ring descriptors
|
||||||
*/
|
*/
|
||||||
#define RX_QUEUE_SIZE 512
|
#define RX_QUEUE_SIZE 512
|
||||||
#define TX_QUEUE_SIZE 256
|
#define TX_QUEUE_SIZE 512
|
||||||
|
|
||||||
#define MAX_PKT_BURST 32
|
#define MAX_PKT_BURST 32
|
||||||
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
|
#define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */
|
||||||
|
|
Loading…
Reference in New Issue