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

Function sfc_ft_item_release

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

Source from the content-addressed store, hash-verified

319}
320
321int
322sfc_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
354fail:
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
362int
363sfc_ft_action_decap_release(struct rte_eth_dev *dev,

Callers

nothing calls this directly

Calls 4

sfc_adapter_by_eth_devFunction · 0.85
sfc_ft_is_activeFunction · 0.85
sfc_ft_ctx_detachFunction · 0.85
rte_flow_error_setFunction · 0.85

Tested by

no test coverage detected