MCPcopy Create free account
hub / github.com/F-Stack/f-stack / sfc_ft_ctx_detach

Function sfc_ft_ctx_detach

dpdk/drivers/net/sfc/sfc_flow_tunnel.c:228–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228static int
229sfc_ft_ctx_detach(struct sfc_adapter *sa, uint32_t flow_mark)
230{
231 struct sfc_ft_ctx *ft_ctx;
232
233 SFC_ASSERT(sfc_adapter_is_locked(sa));
234
235 ft_ctx = sfc_ft_ctx_pick(sa, flow_mark);
236 if (ft_ctx == NULL) {
237 sfc_err(sa, "FT: invalid context");
238 return EINVAL;
239 }
240
241 if (ft_ctx->refcnt == 0) {
242 sfc_err(sa, "FT: inactive context (ID=%u)", ft_ctx->id);
243 return ENOENT;
244 }
245
246 --(ft_ctx->refcnt);
247
248 return 0;
249}
250
251int
252sfc_ft_decap_set(struct rte_eth_dev *dev, struct rte_flow_tunnel *tunnel,

Callers 2

sfc_ft_item_releaseFunction · 0.85

Calls 1

sfc_ft_ctx_pickFunction · 0.85

Tested by

no test coverage detected