MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tap_flow_implicit_destroy

Function tap_flow_implicit_destroy

dpdk/drivers/net/tap/tap_flow.c:1787–1803  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

1785 * @return -1 if one of the implicit rules couldn't be created, 0 otherwise.
1786 */
1787int 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.

Callers 3

tap_promisc_disableFunction · 0.85
tap_allmulti_disableFunction · 0.85
tap_mac_setFunction · 0.85

Calls 1

tap_flow_destroy_pmdFunction · 0.85

Tested by

no test coverage detected