| 1623 | } |
| 1624 | |
| 1625 | int |
| 1626 | rte_flow_info_get(uint16_t port_id, |
| 1627 | struct rte_flow_port_info *port_info, |
| 1628 | struct rte_flow_queue_info *queue_info, |
| 1629 | struct rte_flow_error *error) |
| 1630 | { |
| 1631 | struct rte_eth_dev *dev = &rte_eth_devices[port_id]; |
| 1632 | const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error); |
| 1633 | int ret; |
| 1634 | |
| 1635 | if (unlikely(!ops)) |
| 1636 | return -rte_errno; |
| 1637 | if (dev->data->dev_configured == 0) { |
| 1638 | RTE_FLOW_LOG(INFO, |
| 1639 | "Device with port_id=%"PRIu16" is not configured.\n", |
| 1640 | port_id); |
| 1641 | return -EINVAL; |
| 1642 | } |
| 1643 | if (port_info == NULL) { |
| 1644 | RTE_FLOW_LOG(ERR, "Port %"PRIu16" info is NULL.\n", port_id); |
| 1645 | return -EINVAL; |
| 1646 | } |
| 1647 | if (likely(!!ops->info_get)) { |
| 1648 | ret = flow_err(port_id, |
| 1649 | ops->info_get(dev, port_info, queue_info, error), |
| 1650 | error); |
| 1651 | |
| 1652 | rte_flow_trace_info_get(port_id, port_info, queue_info, ret); |
| 1653 | |
| 1654 | return ret; |
| 1655 | } |
| 1656 | return rte_flow_error_set(error, ENOTSUP, |
| 1657 | RTE_FLOW_ERROR_TYPE_UNSPECIFIED, |
| 1658 | NULL, rte_strerror(ENOTSUP)); |
| 1659 | } |
| 1660 | |
| 1661 | int |
| 1662 | rte_flow_configure(uint16_t port_id, |
no test coverage detected