Get info about flow management resources. */
| 1695 | |
| 1696 | /** Get info about flow management resources. */ |
| 1697 | int |
| 1698 | port_flow_get_info(portid_t port_id) |
| 1699 | { |
| 1700 | struct rte_flow_port_info port_info; |
| 1701 | struct rte_flow_queue_info queue_info; |
| 1702 | struct rte_flow_error error; |
| 1703 | |
| 1704 | if (port_id_is_invalid(port_id, ENABLED_WARN) || |
| 1705 | port_id == (portid_t)RTE_PORT_ALL) |
| 1706 | return -EINVAL; |
| 1707 | /* Poisoning to make sure PMDs update it in case of error. */ |
| 1708 | memset(&error, 0x99, sizeof(error)); |
| 1709 | memset(&port_info, 0, sizeof(port_info)); |
| 1710 | memset(&queue_info, 0, sizeof(queue_info)); |
| 1711 | if (rte_flow_info_get(port_id, &port_info, &queue_info, &error)) |
| 1712 | return port_flow_complain(&error); |
| 1713 | printf("Flow engine resources on port %u:\n" |
| 1714 | "Number of queues: %d\n" |
| 1715 | "Size of queues: %d\n" |
| 1716 | "Number of counters: %d\n" |
| 1717 | "Number of aging objects: %d\n" |
| 1718 | "Number of meter actions: %d\n", |
| 1719 | port_id, port_info.max_nb_queues, |
| 1720 | queue_info.max_size, |
| 1721 | port_info.max_nb_counters, |
| 1722 | port_info.max_nb_aging_objects, |
| 1723 | port_info.max_nb_meters); |
| 1724 | return 0; |
| 1725 | } |
| 1726 | |
| 1727 | /** Configure flow management resources. */ |
| 1728 | int |
no test coverage detected