| 2476 | } |
| 2477 | |
| 2478 | static int |
| 2479 | sfc_flow_remove(struct sfc_adapter *sa, struct rte_flow *flow, |
| 2480 | struct rte_flow_error *error) |
| 2481 | { |
| 2482 | const struct sfc_flow_ops_by_spec *ops; |
| 2483 | int rc; |
| 2484 | |
| 2485 | ops = sfc_flow_get_ops_by_spec(flow); |
| 2486 | if (ops == NULL || ops->remove == NULL) { |
| 2487 | rte_flow_error_set(error, ENOTSUP, |
| 2488 | RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, |
| 2489 | "No backend to handle this flow"); |
| 2490 | return rte_errno; |
| 2491 | } |
| 2492 | |
| 2493 | rc = ops->remove(sa, flow); |
| 2494 | if (rc != 0) { |
| 2495 | rte_flow_error_set(error, rc, RTE_FLOW_ERROR_TYPE_UNSPECIFIED, |
| 2496 | NULL, "Failed to remove the flow rule"); |
| 2497 | } |
| 2498 | |
| 2499 | return rc; |
| 2500 | } |
| 2501 | |
| 2502 | static int |
| 2503 | sfc_flow_verify(struct sfc_adapter *sa, struct rte_flow *flow, |
no test coverage detected