From b1857bf9f5a28b75227ac6393763eb9c952330b8 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Tue, 24 Sep 2019 18:54:17 +0200 Subject: Fix setting rx and tx queue stats mapping rx_queue_stats_mapping and tx_queue_stats_mapping were called unrespective of the number of active queues, and failing on all unactive queues. this caused lot of errros in prox.log Change-Id: I15ecb7adfb562caff8efb0eb24c341a3ba354571 Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/prox_port_cfg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'VNFs/DPPD-PROX/prox_port_cfg.c') diff --git a/VNFs/DPPD-PROX/prox_port_cfg.c b/VNFs/DPPD-PROX/prox_port_cfg.c index 481fa368..d6cede9e 100644 --- a/VNFs/DPPD-PROX/prox_port_cfg.c +++ b/VNFs/DPPD-PROX/prox_port_cfg.c @@ -676,11 +676,13 @@ static void init_port(struct prox_port_cfg *port_cfg) strcmp(port_cfg->short_name, "i40e") && strcmp(port_cfg->short_name, "i40e_vf") && strcmp(port_cfg->short_name, "vmxnet3")) { - for (uint8_t i = 0; i < 16; ++i) { + for (uint8_t i = 0; i < port_cfg->n_rxq; ++i) { ret = rte_eth_dev_set_rx_queue_stats_mapping(port_id, i, i); if (ret) { plog_info("\t\trte_eth_dev_set_rx_queue_stats_mapping() failed: error %d\n", ret); } + } + for (uint8_t i = 0; i < port_cfg->n_txq; ++i) { ret = rte_eth_dev_set_tx_queue_stats_mapping(port_id, i, i); if (ret) { plog_info("\t\trte_eth_dev_set_tx_queue_stats_mapping() failed: error %d\n", ret); -- cgit 1.2.3-korg