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

Function sfc_ft_match

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

Source from the content-addressed store, hash-verified

284}
285
286int
287sfc_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
313fail:
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
321int
322sfc_ft_item_release(struct rte_eth_dev *dev, struct rte_flow_item *pmd_items,

Callers

nothing calls this directly

Calls 4

sfc_adapter_by_eth_devFunction · 0.85
sfc_ft_is_activeFunction · 0.85
sfc_ft_ctx_attachFunction · 0.85
rte_flow_error_setFunction · 0.85

Tested by

no test coverage detected