| 319 | } |
| 320 | |
| 321 | int |
| 322 | sfc_ft_item_release(struct rte_eth_dev *dev, struct rte_flow_item *pmd_items, |
| 323 | uint32_t num_items, struct rte_flow_error *err) |
| 324 | { |
| 325 | struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev); |
| 326 | const struct rte_flow_item_mark *item_mark; |
| 327 | struct rte_flow_item *item = pmd_items; |
| 328 | int rc; |
| 329 | |
| 330 | sfc_adapter_lock(sa); |
| 331 | |
| 332 | if (!sfc_ft_is_active(sa)) { |
| 333 | rc = ENOTSUP; |
| 334 | goto fail; |
| 335 | } |
| 336 | |
| 337 | if (num_items != 1 || item == NULL || item->spec == NULL || |
| 338 | item->type != RTE_FLOW_ITEM_TYPE_MARK) { |
| 339 | sfc_err(sa, "FT: item_release: wrong input"); |
| 340 | rc = EINVAL; |
| 341 | goto fail; |
| 342 | } |
| 343 | |
| 344 | item_mark = item->spec; |
| 345 | |
| 346 | rc = sfc_ft_ctx_detach(sa, item_mark->id); |
| 347 | if (rc != 0) |
| 348 | goto fail; |
| 349 | |
| 350 | sfc_adapter_unlock(sa); |
| 351 | |
| 352 | return 0; |
| 353 | |
| 354 | fail: |
| 355 | sfc_adapter_unlock(sa); |
| 356 | |
| 357 | return rte_flow_error_set(err, rc, |
| 358 | RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, |
| 359 | "FT: item_release failed"); |
| 360 | } |
| 361 | |
| 362 | int |
| 363 | sfc_ft_action_decap_release(struct rte_eth_dev *dev, |
nothing calls this directly
no test coverage detected