From 24085885208d74298ca8f9e420010a35c8be595c Mon Sep 17 00:00:00 2001 From: Tonghao Zhang Date: Wed, 23 Aug 2017 01:09:32 -0700 Subject: [PATCH 1/2] dpdk-if: Change the TX_QUEUE_SIZE to 512. The ring length of some NIC devices(e.g vmxnet3 ) should be between 512-4096. We should change the TX_QUEUE_SIZE from 256 to 512 and make sure we can use the f-stack in vmxnet3. Signed-off-by: Tonghao Zhang --- lib/ff_dpdk_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ff_dpdk_if.c b/lib/ff_dpdk_if.c index 301f8bacd..9cb3d0bad 100644 --- a/lib/ff_dpdk_if.c +++ b/lib/ff_dpdk_if.c @@ -68,7 +68,7 @@ * Configurable number of RX/TX ring descriptors */ #define RX_QUEUE_SIZE 512 -#define TX_QUEUE_SIZE 256 +#define TX_QUEUE_SIZE 512 #define MAX_PKT_BURST 32 #define BURST_TX_DRAIN_US 100 /* TX drain every ~100us */ From 830124b89cb05d1ac8f7178eb2a7c2f7da557980 Mon Sep 17 00:00:00 2001 From: Tonghao Zhang Date: Wed, 23 Aug 2017 01:14:58 -0700 Subject: [PATCH 2/2] 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 --- dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c b/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c index cd9de7cc9..706b12980 100644 --- a/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c +++ b/dpdk/lib/librte_eal/linuxapp/eal/eal_pci.c @@ -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 */