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

Function rte_event_dev_attr_get

dpdk/lib/eventdev/rte_eventdev.c:816–844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

814}
815
816int
817rte_event_dev_attr_get(uint8_t dev_id, uint32_t attr_id,
818 uint32_t *attr_value)
819{
820 struct rte_eventdev *dev;
821
822 if (!attr_value)
823 return -EINVAL;
824 RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
825 dev = &rte_eventdevs[dev_id];
826
827 switch (attr_id) {
828 case RTE_EVENT_DEV_ATTR_PORT_COUNT:
829 *attr_value = dev->data->nb_ports;
830 break;
831 case RTE_EVENT_DEV_ATTR_QUEUE_COUNT:
832 *attr_value = dev->data->nb_queues;
833 break;
834 case RTE_EVENT_DEV_ATTR_STARTED:
835 *attr_value = dev->data->dev_started;
836 break;
837 default:
838 return -EINVAL;
839 }
840
841 rte_eventdev_trace_attr_get(dev_id, dev, attr_id, *attr_value);
842
843 return 0;
844}
845
846int
847rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id,

Calls

no outgoing calls