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

Function dsw_queue_setup

dpdk/drivers/event/dsw/dsw_evdev.c:96–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96static int
97dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
98 const struct rte_event_queue_conf *conf)
99{
100 struct dsw_evdev *dsw = dsw_pmd_priv(dev);
101 struct dsw_queue *queue = &dsw->queues[queue_id];
102
103 if (RTE_EVENT_QUEUE_CFG_ALL_TYPES & conf->event_queue_cfg)
104 return -ENOTSUP;
105
106 /* SINGLE_LINK is better off treated as TYPE_ATOMIC, since it
107 * avoid the "fake" TYPE_PARALLEL flow_id assignment. Since
108 * the queue will only have a single serving port, no
109 * migration will ever happen, so the extra TYPE_ATOMIC
110 * migration overhead is avoided.
111 */
112 if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK & conf->event_queue_cfg)
113 queue->schedule_type = RTE_SCHED_TYPE_ATOMIC;
114 else {
115 if (conf->schedule_type == RTE_SCHED_TYPE_ORDERED)
116 return -ENOTSUP;
117 /* atomic or parallel */
118 queue->schedule_type = conf->schedule_type;
119 }
120
121 queue->num_serving_ports = 0;
122
123 return 0;
124}
125
126static void
127dsw_queue_def_conf(struct rte_eventdev *dev __rte_unused,

Callers

nothing calls this directly

Calls 1

dsw_pmd_privFunction · 0.85

Tested by

no test coverage detected