| 249 | } |
| 250 | |
| 251 | int |
| 252 | sfc_ft_decap_set(struct rte_eth_dev *dev, struct rte_flow_tunnel *tunnel, |
| 253 | struct rte_flow_action **pmd_actions, uint32_t *num_of_actions, |
| 254 | struct rte_flow_error *err) |
| 255 | { |
| 256 | struct sfc_adapter *sa = sfc_adapter_by_eth_dev(dev); |
| 257 | struct sfc_ft_ctx *ft_ctx; |
| 258 | int rc; |
| 259 | |
| 260 | sfc_adapter_lock(sa); |
| 261 | |
| 262 | if (!sfc_ft_is_active(sa)) { |
| 263 | rc = ENOTSUP; |
| 264 | goto fail; |
| 265 | } |
| 266 | |
| 267 | rc = sfc_ft_ctx_attach(sa, tunnel, &ft_ctx); |
| 268 | if (rc != 0) |
| 269 | goto fail; |
| 270 | |
| 271 | *pmd_actions = &ft_ctx->action; |
| 272 | *num_of_actions = 1; |
| 273 | |
| 274 | sfc_adapter_unlock(sa); |
| 275 | |
| 276 | return 0; |
| 277 | |
| 278 | fail: |
| 279 | sfc_adapter_unlock(sa); |
| 280 | |
| 281 | return rte_flow_error_set(err, rc, |
| 282 | RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL, |
| 283 | "FT: decap_set failed"); |
| 284 | } |
| 285 | |
| 286 | int |
| 287 | sfc_ft_match(struct rte_eth_dev *dev, struct rte_flow_tunnel *tunnel, |
nothing calls this directly
no test coverage detected