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

Function rte_flow_ops_get

dpdk/lib/ethdev/rte_flow.c:334–358  ·  view source on GitHub ↗

Get generic flow operations structure from a port. */

Source from the content-addressed store, hash-verified

332
333/* Get generic flow operations structure from a port. */
334const struct rte_flow_ops *
335rte_flow_ops_get(uint16_t port_id, struct rte_flow_error *error)
336{
337 struct rte_eth_dev *dev = &rte_eth_devices[port_id];
338 const struct rte_flow_ops *ops;
339 int code;
340
341 if (unlikely(!rte_eth_dev_is_valid_port(port_id)))
342 code = ENODEV;
343 else if (unlikely(dev->dev_ops->flow_ops_get == NULL))
344 /* flow API not supported with this driver dev_ops */
345 code = ENOSYS;
346 else
347 code = dev->dev_ops->flow_ops_get(dev, &ops);
348 if (code == 0 && ops == NULL)
349 /* flow API not supported with this device */
350 code = ENOSYS;
351
352 if (code != 0) {
353 rte_flow_error_set(error, code, RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
354 NULL, rte_strerror(code));
355 return NULL;
356 }
357 return ops;
358}
359
360/* Check whether a flow rule can be created on a given port. */
361int

Callers 15

rte_flow_validateFunction · 0.85
rte_flow_createFunction · 0.85
rte_flow_destroyFunction · 0.85
rte_flow_actions_updateFunction · 0.85
rte_flow_flushFunction · 0.85
rte_flow_queryFunction · 0.85
rte_flow_isolateFunction · 0.85
rte_flow_dev_dumpFunction · 0.85
rte_flow_get_aged_flowsFunction · 0.85

Calls 3

rte_flow_error_setFunction · 0.85
rte_strerrorFunction · 0.85

Tested by

no test coverage detected