* Remove specific implicit flow rule on the remote device. * * @param[in, out] pmd * Pointer to private structure. * @param[in] idx * The idx in the implicit_rte_flows array specifying which rule to remove. * * @return -1 if one of the implicit rules couldn't be created, 0 otherwise. */
| 1785 | * @return -1 if one of the implicit rules couldn't be created, 0 otherwise. |
| 1786 | */ |
| 1787 | int tap_flow_implicit_destroy(struct pmd_internals *pmd, |
| 1788 | enum implicit_rule_index idx) |
| 1789 | { |
| 1790 | struct rte_flow *remote_flow; |
| 1791 | int cur_prio = -1; |
| 1792 | int idx_prio = implicit_rte_flows[idx].attr.priority + PRIORITY_OFFSET; |
| 1793 | |
| 1794 | for (remote_flow = LIST_FIRST(&pmd->implicit_flows); |
| 1795 | remote_flow; |
| 1796 | remote_flow = LIST_NEXT(remote_flow, next)) { |
| 1797 | cur_prio = (remote_flow->msg.t.tcm_info >> 16) & PRIORITY_MASK; |
| 1798 | if (cur_prio != idx_prio) |
| 1799 | continue; |
| 1800 | return tap_flow_destroy_pmd(pmd, remote_flow, NULL); |
| 1801 | } |
| 1802 | return 0; |
| 1803 | } |
| 1804 | |
| 1805 | /** |
| 1806 | * Destroy all implicit flows. |
no test coverage detected