| 284 | } |
| 285 | |
| 286 | int |
| 287 | sfc_ft_match(struct rte_eth_dev *dev, struct rte_flow_tunnel *tunnel, |
| 288 | struct rte_flow_item **pmd_items, uint32_t *num_of_items, |
| 289 | struct rte_flow_error *err) |
| 290 | { |
| 291 | struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev); |
| 292 | struct sfc_ft_ctx *ft_ctx; |
| 293 | int rc; |
| 294 | |
| 295 | sfc_adapter_lock(sa); |
| 296 | |
| 297 | if (!sfc_ft_is_active(sa)) { |
| 298 | rc = ENOTSUP; |
| 299 | goto fail; |
| 300 | } |
| 301 | |
| 302 | rc = sfc_ft_ctx_attach(sa, tunnel, &ft_ctx); |
| 303 | if (rc != 0) |
| 304 | goto fail; |
| 305 | |
| 306 | *pmd_items = &ft_ctx->item; |
| 307 | *num_of_items = 1; |
| 308 | |
| 309 | sfc_adapter_unlock(sa); |
| 310 | |
| 311 | return 0; |
| 312 | |
| 313 | fail: |
| 314 | sfc_adapter_unlock(sa); |
| 315 | |
| 316 | return rte_flow_error_set(err, rc, |
| 317 | RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, |
| 318 | "FT: tunnel_match failed"); |
| 319 | } |
| 320 | |
| 321 | int |
| 322 | sfc_ft_item_release(struct rte_eth_dev *dev, struct rte_flow_item *pmd_items, |
nothing calls this directly
no test coverage detected