| 1773 | } |
| 1774 | |
| 1775 | int |
| 1776 | rte_flow_pattern_template_destroy(uint16_t port_id, |
| 1777 | struct rte_flow_pattern_template *pattern_template, |
| 1778 | struct rte_flow_error *error) |
| 1779 | { |
| 1780 | struct rte_eth_dev *dev = &rte_eth_devices[port_id]; |
| 1781 | const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error); |
| 1782 | int ret; |
| 1783 | |
| 1784 | if (unlikely(!ops)) |
| 1785 | return -rte_errno; |
| 1786 | if (unlikely(pattern_template == NULL)) |
| 1787 | return 0; |
| 1788 | if (likely(!!ops->pattern_template_destroy)) { |
| 1789 | ret = flow_err(port_id, |
| 1790 | ops->pattern_template_destroy(dev, |
| 1791 | pattern_template, |
| 1792 | error), |
| 1793 | error); |
| 1794 | |
| 1795 | rte_flow_trace_pattern_template_destroy(port_id, pattern_template, |
| 1796 | ret); |
| 1797 | |
| 1798 | return ret; |
| 1799 | } |
| 1800 | return rte_flow_error_set(error, ENOTSUP, |
| 1801 | RTE_FLOW_ERROR_TYPE_UNSPECIFIED, |
| 1802 | NULL, rte_strerror(ENOTSUP)); |
| 1803 | } |
| 1804 | |
| 1805 | struct rte_flow_actions_template * |
| 1806 | rte_flow_actions_template_create(uint16_t port_id, |
no test coverage detected