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

Function sfc_ft_decap_set

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

Source from the content-addressed store, hash-verified

249}
250
251int
252sfc_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
278fail:
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
286int
287sfc_ft_match(struct rte_eth_dev *dev, struct rte_flow_tunnel *tunnel,

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