| 6358 | } |
| 6359 | |
| 6360 | void |
| 6361 | set_qmap(portid_t port_id, uint8_t is_rx, uint16_t queue_id, uint8_t map_value) |
| 6362 | { |
| 6363 | int ret; |
| 6364 | |
| 6365 | if (port_id_is_invalid(port_id, ENABLED_WARN)) |
| 6366 | return; |
| 6367 | |
| 6368 | if (is_rx ? (rx_queue_id_is_invalid(queue_id)) : (tx_queue_id_is_invalid(queue_id))) |
| 6369 | return; |
| 6370 | |
| 6371 | if (map_value >= RTE_ETHDEV_QUEUE_STAT_CNTRS) { |
| 6372 | fprintf(stderr, "map_value not in required range 0..%d\n", |
| 6373 | RTE_ETHDEV_QUEUE_STAT_CNTRS - 1); |
| 6374 | return; |
| 6375 | } |
| 6376 | |
| 6377 | if (!is_rx) { /* tx */ |
| 6378 | ret = rte_eth_dev_set_tx_queue_stats_mapping(port_id, queue_id, |
| 6379 | map_value); |
| 6380 | if (ret) { |
| 6381 | fprintf(stderr, |
| 6382 | "failed to set tx queue stats mapping.\n"); |
| 6383 | return; |
| 6384 | } |
| 6385 | } else { /* rx */ |
| 6386 | ret = rte_eth_dev_set_rx_queue_stats_mapping(port_id, queue_id, |
| 6387 | map_value); |
| 6388 | if (ret) { |
| 6389 | fprintf(stderr, |
| 6390 | "failed to set rx queue stats mapping.\n"); |
| 6391 | return; |
| 6392 | } |
| 6393 | } |
| 6394 | } |
| 6395 | |
| 6396 | void |
| 6397 | set_xstats_hide_zero(uint8_t on_off) |
no test coverage detected