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

Function sfc_flow_insert

dpdk/drivers/net/sfc/sfc_flow.c:2454–2476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2452}
2453
2454static int
2455sfc_flow_insert(struct sfc_adapter *sa, struct rte_flow *flow,
2456 struct rte_flow_error *error)
2457{
2458 const struct sfc_flow_ops_by_spec *ops;
2459 int rc;
2460
2461 ops = sfc_flow_get_ops_by_spec(flow);
2462 if (ops == NULL || ops->insert == NULL) {
2463 rte_flow_error_set(error, ENOTSUP,
2464 RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
2465 "No backend to handle this flow");
2466 return rte_errno;
2467 }
2468
2469 rc = ops->insert(sa, flow);
2470 if (rc != 0) {
2471 rte_flow_error_set(error, rc, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
2472 NULL, "Failed to insert the flow rule");
2473 }
2474
2475 return rc;
2476}
2477
2478static int
2479sfc_flow_remove(struct sfc_adapter *sa, struct rte_flow *flow,

Callers 2

sfc_flow_create_lockedFunction · 0.85
sfc_flow_startFunction · 0.85

Calls 2

sfc_flow_get_ops_by_specFunction · 0.85
rte_flow_error_setFunction · 0.85

Tested by

no test coverage detected