summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX
diff options
context:
space:
mode:
authorPatrice Buriez <patrice.buriez@intel.com>2018-09-03 18:55:24 +0200
committerPatrice Buriez <patrice.buriez@intel.com>2018-09-04 16:35:33 +0200
commita3a7fbb44e261987e2cd800fb049c20b16381e4d (patch)
treef15f05a8beef85ef142d7980595aa07ec1aaedde /VNFs/DPPD-PROX
parent4e70037968d120b27b5360107ef3ab2e5a5f57b7 (diff)
Workaround DPDK net/virtio queue setup issue
JIRA: SAMPLEVNF-127 PROX was crashing in the VM with vector mode enabled and multiple OVS queues. This was not really a PROX bug, but a DPDK issue, which has been fixed by DPDK commit https://git.dpdk.org/dpdk/commit/?id=efc83a1e7fc3 This "net/virtio: fix queue setup consistency" is included in DPDK 17.11 and subsequent versions, and has been backported into: - DPDK 16.11.4: https://git.dpdk.org/dpdk-stable/commit/?h=16.11&id=516447a5056c - DPDK 17.08.1: https://git.dpdk.org/dpdk-stable/commit/?h=17.08&id=907fe4fc263e This means the fix is not included into any DPDK 17.02.x used by NSB. Fortunately, a simple workaround consists of calling rte_eth_tx_queue_setup() before rte_eth_rx_queue_setup(). This change implements this simple workaround, in order to make PROX work, even with unfixed DPDK versions. Change-Id: I818e9bb812babe023c6b7225c8b9769a359d9bec Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX')
-rw-r--r--VNFs/DPPD-PROX/prox_port_cfg.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c
index d080f5a2..7b763c50 100644
--- a/VNFs/DPPD-PROX/prox_port_cfg.c
+++ b/VNFs/DPPD-PROX/prox_port_cfg.c
@@ -384,19 +384,6 @@ static void init_port(struct prox_port_cfg *port_cfg)
plog_info("\t\tMAC address set to "MAC_BYTES_FMT"\n", MAC_BYTES(port_cfg->eth_addr.addr_bytes));
- /* initialize RX queues */
- for (uint16_t queue_id = 0; queue_id < port_cfg->n_rxq; ++queue_id) {
- plog_info("\t\tSetting up RX queue %u on port %u on socket %u with %u desc (pool 0x%p)\n",
- queue_id, port_id, port_cfg->socket,
- port_cfg->n_rxd, port_cfg->pool[queue_id]);
-
- ret = rte_eth_rx_queue_setup(port_id, queue_id,
- port_cfg->n_rxd,
- port_cfg->socket, &port_cfg->rx_conf,
- port_cfg->pool[queue_id]);
-
- PROX_PANIC(ret < 0, "\t\t\trte_eth_rx_queue_setup() failed on port %u: error %s (%d)\n", port_id, strerror(-ret), ret);
- }
if (port_cfg->capabilities.tx_offload_cksum == 0) {
port_cfg->tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOOFFLOADS;
plog_info("\t\tDisabling TX offloads as pmd reports that it does not support them)\n");
@@ -406,7 +393,8 @@ static void init_port(struct prox_port_cfg *port_cfg)
port_cfg->tx_conf.txq_flags |= ETH_TXQ_FLAGS_NOMULTSEGS;
plog_info("\t\tDisabling multsegs on port %d as vmxnet3 does not support them\n", port_id);
}
- /* initialize one TX queue per logical core on each port */
+
+ /* initialize TX queues first */
for (uint16_t queue_id = 0; queue_id < port_cfg->n_txq; ++queue_id) {
plog_info("\t\tSetting up TX queue %u on socket %u with %u desc\n",
queue_id, port_cfg->socket, port_cfg->n_txd);
@@ -415,6 +403,18 @@ static void init_port(struct prox_port_cfg *port_cfg)
PROX_PANIC(ret < 0, "\t\t\trte_eth_tx_queue_setup() failed on port %u: error %d\n", port_id, ret);
}
+ /* initialize RX queues */
+ for (uint16_t queue_id = 0; queue_id < port_cfg->n_rxq; ++queue_id) {
+ plog_info("\t\tSetting up RX queue %u on port %u on socket %u with %u desc (pool 0x%p)\n",
+ queue_id, port_id, port_cfg->socket,
+ port_cfg->n_rxd, port_cfg->pool[queue_id]);
+ ret = rte_eth_rx_queue_setup(port_id, queue_id,
+ port_cfg->n_rxd,
+ port_cfg->socket, &port_cfg->rx_conf,
+ port_cfg->pool[queue_id]);
+ PROX_PANIC(ret < 0, "\t\t\trte_eth_rx_queue_setup() failed on port %u: error %s (%d)\n", port_id, strerror(-ret), ret);
+ }
+
plog_info("\t\tStarting up port %u ...", port_id);
ret = rte_eth_dev_start(port_id);