From: Xavier Simonart Date: Tue, 24 Sep 2019 16:54:17 +0000 (+0200) Subject: Fix setting rx and tx queue stats mapping X-Git-Tag: opnfv-10.0.0~93 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F68536%2F2;p=samplevnf.git 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 --- 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);