| 228 | } |
| 229 | |
| 230 | static int |
| 231 | dsw_configure(const struct rte_eventdev *dev) |
| 232 | { |
| 233 | struct dsw_evdev *dsw = dsw_pmd_priv(dev); |
| 234 | const struct rte_event_dev_config *conf = &dev->data->dev_conf; |
| 235 | int32_t min_max_in_flight; |
| 236 | |
| 237 | dsw->num_ports = conf->nb_event_ports; |
| 238 | dsw->num_queues = conf->nb_event_queues; |
| 239 | |
| 240 | /* Avoid a situation where consumer ports are holding all the |
| 241 | * credits, without making use of them. |
| 242 | */ |
| 243 | min_max_in_flight = conf->nb_event_ports * DSW_PORT_MAX_CREDITS; |
| 244 | |
| 245 | dsw->max_inflight = RTE_MAX(conf->nb_events_limit, min_max_in_flight); |
| 246 | |
| 247 | return 0; |
| 248 | } |
| 249 | |
| 250 | |
| 251 | static void |
nothing calls this directly
no test coverage detected