| 34 | } |
| 35 | |
| 36 | struct sfc_ft_ctx * |
| 37 | sfc_ft_ctx_pick(struct sfc_adapter *sa, uint32_t flow_mark) |
| 38 | { |
| 39 | uint8_t ft_ctx_mark = SFC_FT_FLOW_MARK_TO_CTX_MARK(flow_mark); |
| 40 | |
| 41 | SFC_ASSERT(sfc_adapter_is_locked(sa)); |
| 42 | |
| 43 | if (ft_ctx_mark != SFC_FT_CTX_MARK_INVALID) { |
| 44 | sfc_ft_ctx_id_t ft_ctx_id = SFC_FT_CTX_MARK_TO_CTX_ID(ft_ctx_mark); |
| 45 | struct sfc_ft_ctx *ft_ctx = &sa->ft_ctx_pool[ft_ctx_id]; |
| 46 | |
| 47 | ft_ctx->id = ft_ctx_id; |
| 48 | |
| 49 | return ft_ctx; |
| 50 | } |
| 51 | |
| 52 | return NULL; |
| 53 | } |
| 54 | |
| 55 | int |
| 56 | sfc_ft_tunnel_rule_detect(struct sfc_adapter *sa, |
no outgoing calls
no test coverage detected