MCPcopy Index your code
hub / github.com/F-Stack/f-stack / rte_flow_create

Function rte_flow_create

dpdk/lib/ethdev/rte_flow.c:397–424  ·  view source on GitHub ↗

Create a flow rule on a given port. */

Source from the content-addressed store, hash-verified

395
396/* Create a flow rule on a given port. */
397struct rte_flow *
398rte_flow_create(uint16_t port_id,
399 const struct rte_flow_attr *attr,
400 const struct rte_flow_item pattern[],
401 const struct rte_flow_action actions[],
402 struct rte_flow_error *error)
403{
404 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
405 struct rte_flow *flow;
406 const struct rte_flow_ops *ops = rte_flow_ops_get(port_id, error);
407
408 if (unlikely(!ops))
409 return NULL;
410 if (likely(!!ops->create)) {
411 fts_enter(dev);
412 flow = ops->create(dev, attr, pattern, actions, error);
413 fts_exit(dev);
414 if (flow == NULL)
415 flow_err(port_id, -rte_errno, error);
416
417 rte_flow_trace_create(port_id, attr, pattern, actions, flow);
418
419 return flow;
420 }
421 rte_flow_error_set(error, ENOSYS, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
422 NULL, rte_strerror(ENOSYS));
423 return NULL;
424}
425
426/* Destroy a flow rule on a given port. */
427int

Callers 15

create_tcp_flowFunction · 0.85
init_flowFunction · 0.85
create_ipip_flowFunction · 0.85
fdir_add_tcp_flowFunction · 0.85
member_rte_flow_prepareFunction · 0.85
bond_flow_createFunction · 0.85
fs_eth_dev_conf_applyFunction · 0.85
fs_flow_createFunction · 0.85
generate_flowFunction · 0.85
create_default_flowFunction · 0.85
create_default_flowFunction · 0.85

Calls 6

rte_flow_ops_getFunction · 0.85
fts_enterFunction · 0.85
fts_exitFunction · 0.85
flow_errFunction · 0.85
rte_flow_error_setFunction · 0.85
rte_strerrorFunction · 0.85

Tested by 2

create_default_flowFunction · 0.68
create_default_flowFunction · 0.68