Fix setting rx and tx queue stats mapping 36/68536/2
authorXavier Simonart <xavier.simonart@intel.com>
Tue, 24 Sep 2019 16:54:17 +0000 (18:54 +0200)
committerPatrice Buriez <patrice.buriez@intel.com>
Tue, 8 Oct 2019 19:30:36 +0000 (19:30 +0000)
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 <xavier.simonart@intel.com>
VNFs/DPPD-PROX/prox_port_cfg.c

index 481fa36..d6cede9 100644 (file)
@@ -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);