event/opdl: rework loops to comply with dpdk style
[dpdk.git] / drivers / event / opdl / opdl_evdev.c
1 /*-
2  * SPDX-License-Identifier: BSD-3-Clause
3  * Copyright(c) 2010-2014 Intel Corporation
4  */
5
6 #include <inttypes.h>
7 #include <string.h>
8
9 #include <rte_bus_vdev.h>
10 #include <rte_lcore.h>
11 #include <rte_memzone.h>
12 #include <rte_kvargs.h>
13 #include <rte_errno.h>
14 #include <rte_cycles.h>
15
16 #include "opdl_evdev.h"
17 #include "opdl_ring.h"
18 #include "opdl_log.h"
19
20 #define EVENTDEV_NAME_OPDL_PMD event_opdl
21 #define NUMA_NODE_ARG "numa_node"
22 #define DO_VALIDATION_ARG "do_validation"
23 #define DO_TEST_ARG "self_test"
24
25
26 static void
27 opdl_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info);
28
29 uint16_t
30 opdl_event_enqueue_burst(void *port,
31                          const struct rte_event ev[],
32                          uint16_t num)
33 {
34         struct opdl_port *p = port;
35
36         if (unlikely(!p->opdl->data->dev_started))
37                 return 0;
38
39
40         /* either rx_enqueue or disclaim*/
41         return p->enq(p, ev, num);
42 }
43
44 uint16_t
45 opdl_event_enqueue(void *port, const struct rte_event *ev)
46 {
47         struct opdl_port *p = port;
48
49         if (unlikely(!p->opdl->data->dev_started))
50                 return 0;
51
52
53         return p->enq(p, ev, 1);
54 }
55
56 uint16_t
57 opdl_event_dequeue_burst(void *port,
58                          struct rte_event *ev,
59                          uint16_t num,
60                          uint64_t wait)
61 {
62         struct opdl_port *p = (void *)port;
63
64         RTE_SET_USED(wait);
65
66         if (unlikely(!p->opdl->data->dev_started))
67                 return 0;
68
69         /* This function pointer can point to tx_dequeue or claim*/
70         return p->deq(p, ev, num);
71 }
72
73 uint16_t
74 opdl_event_dequeue(void *port,
75                    struct rte_event *ev,
76                    uint64_t wait)
77 {
78         struct opdl_port *p = (void *)port;
79
80         if (unlikely(!p->opdl->data->dev_started))
81                 return 0;
82
83         RTE_SET_USED(wait);
84
85         return p->deq(p, ev, 1);
86 }
87
88 static int
89 opdl_port_link(struct rte_eventdev *dev,
90                void *port,
91                const uint8_t queues[],
92                const uint8_t priorities[],
93                uint16_t num)
94 {
95         struct opdl_port *p = port;
96
97         RTE_SET_USED(priorities);
98         RTE_SET_USED(dev);
99
100         if (unlikely(dev->data->dev_started)) {
101                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
102                              "Attempt to link queue (%u) to port %d while device started\n",
103                              dev->data->dev_id,
104                                 queues[0],
105                                 p->id);
106                 rte_errno = -EINVAL;
107                 return 0;
108         }
109
110         /* Max of 1 queue per port */
111         if (num > 1) {
112                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
113                              "Attempt to link more than one queue (%u) to port %d requested\n",
114                              dev->data->dev_id,
115                                 num,
116                                 p->id);
117                 rte_errno = -EDQUOT;
118                 return 0;
119         }
120
121         if (!p->configured) {
122                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
123                              "port %d not configured, cannot link to %u\n",
124                              dev->data->dev_id,
125                                 p->id,
126                                 queues[0]);
127                 rte_errno = -EINVAL;
128                 return 0;
129         }
130
131         if (p->external_qid != OPDL_INVALID_QID) {
132                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
133                              "port %d already linked to queue %u, cannot link to %u\n",
134                              dev->data->dev_id,
135                                 p->id,
136                                 p->external_qid,
137                                 queues[0]);
138                 rte_errno = -EINVAL;
139                 return 0;
140         }
141
142         p->external_qid = queues[0];
143
144         return 1;
145 }
146
147 static int
148 opdl_port_unlink(struct rte_eventdev *dev,
149                  void *port,
150                  uint8_t queues[],
151                  uint16_t nb_unlinks)
152 {
153         struct opdl_port *p = port;
154
155         RTE_SET_USED(queues);
156         RTE_SET_USED(nb_unlinks);
157
158         if (unlikely(dev->data->dev_started)) {
159                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
160                              "Attempt to unlink queue (%u) to port %d while device started\n",
161                              dev->data->dev_id,
162                              queues[0],
163                              p->id);
164                 rte_errno = -EINVAL;
165                 return 0;
166         }
167         RTE_SET_USED(nb_unlinks);
168
169         /* Port Stuff */
170         p->queue_id = OPDL_INVALID_QID;
171         p->p_type = OPDL_INVALID_PORT;
172         p->external_qid = OPDL_INVALID_QID;
173
174         /* always unlink 0 queue due to statice pipeline */
175         return 0;
176 }
177
178 static int
179 opdl_port_setup(struct rte_eventdev *dev,
180                 uint8_t port_id,
181                 const struct rte_event_port_conf *conf)
182 {
183         struct opdl_evdev *device = opdl_pmd_priv(dev);
184         struct opdl_port *p = &device->ports[port_id];
185
186         RTE_SET_USED(conf);
187
188         /* Check if port already configured */
189         if (p->configured) {
190                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
191                              "Attempt to setup port %d which is already setup\n",
192                              dev->data->dev_id,
193                              p->id);
194                 return -EDQUOT;
195         }
196
197         *p = (struct opdl_port){0}; /* zero entire structure */
198         p->id = port_id;
199         p->opdl = device;
200         p->queue_id = OPDL_INVALID_QID;
201         p->external_qid = OPDL_INVALID_QID;
202         dev->data->ports[port_id] = p;
203         rte_smp_wmb();
204         p->configured = 1;
205         device->nb_ports++;
206         return 0;
207 }
208
209 static void
210 opdl_port_release(void *port)
211 {
212         struct opdl_port *p = (void *)port;
213
214         if (p == NULL ||
215             p->opdl->data->dev_started) {
216                 return;
217         }
218
219         p->configured = 0;
220         p->initialized = 0;
221 }
222
223 static void
224 opdl_port_def_conf(struct rte_eventdev *dev, uint8_t port_id,
225                 struct rte_event_port_conf *port_conf)
226 {
227         RTE_SET_USED(dev);
228         RTE_SET_USED(port_id);
229
230         port_conf->new_event_threshold = MAX_OPDL_CONS_Q_DEPTH;
231         port_conf->dequeue_depth = MAX_OPDL_CONS_Q_DEPTH;
232         port_conf->enqueue_depth = MAX_OPDL_CONS_Q_DEPTH;
233 }
234
235 static int
236 opdl_queue_setup(struct rte_eventdev *dev,
237                  uint8_t queue_id,
238                  const struct rte_event_queue_conf *conf)
239 {
240         enum queue_type type;
241
242         struct opdl_evdev *device = opdl_pmd_priv(dev);
243
244         /* Extra sanity check, probably not needed */
245         if (queue_id == OPDL_INVALID_QID) {
246                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
247                              "Invalid queue id %u requested\n",
248                              dev->data->dev_id,
249                              queue_id);
250                 return -EINVAL;
251         }
252
253         if (device->nb_q_md > device->max_queue_nb) {
254                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
255                              "Max number of queues %u exceeded by request %u\n",
256                              dev->data->dev_id,
257                              device->max_queue_nb,
258                              device->nb_q_md);
259                 return -EINVAL;
260         }
261
262         if (RTE_EVENT_QUEUE_CFG_ALL_TYPES
263             & conf->event_queue_cfg) {
264                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
265                              "QUEUE_CFG_ALL_TYPES not supported\n",
266                              dev->data->dev_id);
267                 return -ENOTSUP;
268         } else if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK
269                    & conf->event_queue_cfg) {
270                 type = OPDL_Q_TYPE_SINGLE_LINK;
271         } else {
272                 switch (conf->schedule_type) {
273                 case RTE_SCHED_TYPE_ORDERED:
274                         type = OPDL_Q_TYPE_ORDERED;
275                         break;
276                 case RTE_SCHED_TYPE_ATOMIC:
277                         type = OPDL_Q_TYPE_ATOMIC;
278                         break;
279                 case RTE_SCHED_TYPE_PARALLEL:
280                         type = OPDL_Q_TYPE_ORDERED;
281                         break;
282                 default:
283                         PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
284                                      "Unknown queue type %d requested\n",
285                                      dev->data->dev_id,
286                                      conf->event_queue_cfg);
287                         return -EINVAL;
288                 }
289         }
290         /* Check if queue id has been setup already */
291         uint32_t i;
292         for (i = 0; i < device->nb_q_md; i++) {
293                 if (device->q_md[i].ext_id == queue_id) {
294                         PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
295                                      "queue id %u already setup\n",
296                                      dev->data->dev_id,
297                                      queue_id);
298                         return -EINVAL;
299                 }
300         }
301
302         device->q_md[device->nb_q_md].ext_id = queue_id;
303         device->q_md[device->nb_q_md].type = type;
304         device->q_md[device->nb_q_md].setup = 1;
305         device->nb_q_md++;
306
307         return 1;
308 }
309
310 static void
311 opdl_queue_release(struct rte_eventdev *dev, uint8_t queue_id)
312 {
313         struct opdl_evdev *device = opdl_pmd_priv(dev);
314
315         RTE_SET_USED(queue_id);
316
317         if (device->data->dev_started)
318                 return;
319
320 }
321
322 static void
323 opdl_queue_def_conf(struct rte_eventdev *dev,
324                     uint8_t queue_id,
325                     struct rte_event_queue_conf *conf)
326 {
327         RTE_SET_USED(dev);
328         RTE_SET_USED(queue_id);
329
330         static const struct rte_event_queue_conf default_conf = {
331                 .nb_atomic_flows = 1024,
332                 .nb_atomic_order_sequences = 1,
333                 .event_queue_cfg = 0,
334                 .schedule_type = RTE_SCHED_TYPE_ORDERED,
335                 .priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
336         };
337
338         *conf = default_conf;
339 }
340
341
342 static int
343 opdl_dev_configure(const struct rte_eventdev *dev)
344 {
345         struct opdl_evdev *opdl = opdl_pmd_priv(dev);
346         const struct rte_eventdev_data *data = dev->data;
347         const struct rte_event_dev_config *conf = &data->dev_conf;
348
349         opdl->max_queue_nb = conf->nb_event_queues;
350         opdl->max_port_nb = conf->nb_event_ports;
351         opdl->nb_events_limit = conf->nb_events_limit;
352
353         if (conf->event_dev_cfg & RTE_EVENT_DEV_CFG_PER_DEQUEUE_TIMEOUT) {
354                 PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
355                              "DEQUEUE_TIMEOUT not supported\n",
356                              dev->data->dev_id);
357                 return -ENOTSUP;
358         }
359
360         return 0;
361 }
362
363 static void
364 opdl_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
365 {
366         RTE_SET_USED(dev);
367
368         static const struct rte_event_dev_info evdev_opdl_info = {
369                 .driver_name = OPDL_PMD_NAME,
370                 .max_event_queues = RTE_EVENT_MAX_QUEUES_PER_DEV,
371                 .max_event_queue_flows = OPDL_QID_NUM_FIDS,
372                 .max_event_queue_priority_levels = OPDL_Q_PRIORITY_MAX,
373                 .max_event_priority_levels = OPDL_IQS_MAX,
374                 .max_event_ports = OPDL_PORTS_MAX,
375                 .max_event_port_dequeue_depth = MAX_OPDL_CONS_Q_DEPTH,
376                 .max_event_port_enqueue_depth = MAX_OPDL_CONS_Q_DEPTH,
377                 .max_num_events = OPDL_INFLIGHT_EVENTS_TOTAL,
378                 .event_dev_cap = RTE_EVENT_DEV_CAP_BURST_MODE,
379         };
380
381         *info = evdev_opdl_info;
382 }
383
384 static void
385 opdl_dump(struct rte_eventdev *dev, FILE *f)
386 {
387         struct opdl_evdev *device = opdl_pmd_priv(dev);
388
389         if (!device->do_validation)
390                 return;
391
392         fprintf(f,
393                 "\n\n -- RING STATISTICS --\n");
394         uint32_t i;
395         for (i = 0; i < device->nb_opdls; i++)
396                 opdl_ring_dump(device->opdl[i], f);
397
398         fprintf(f,
399                 "\n\n -- PORT STATISTICS --\n"
400                 "Type Port Index  Port Id  Queue Id     Av. Req Size  "
401                 "Av. Grant Size     Av. Cycles PP"
402                 "      Empty DEQs   Non Empty DEQs   Pkts Processed\n");
403
404         for (i = 0; i < device->max_port_nb; i++) {
405                 char queue_id[64];
406                 char total_cyc[64];
407                 const char *p_type;
408
409                 uint64_t cne, cpg;
410                 struct opdl_port *port = &device->ports[i];
411
412                 if (port->initialized) {
413                         cne = port->port_stat[claim_non_empty];
414                         cpg = port->port_stat[claim_pkts_granted];
415                         if (port->p_type == OPDL_REGULAR_PORT)
416                                 p_type = "REG";
417                         else if (port->p_type == OPDL_PURE_RX_PORT)
418                                 p_type = "  RX";
419                         else if (port->p_type == OPDL_PURE_TX_PORT)
420                                 p_type = "  TX";
421                         else if (port->p_type == OPDL_ASYNC_PORT)
422                                 p_type = "SYNC";
423                         else
424                                 p_type = "????";
425
426                         sprintf(queue_id, "%02u", port->external_qid);
427                         if (port->p_type == OPDL_REGULAR_PORT ||
428                                         port->p_type == OPDL_ASYNC_PORT)
429                                 sprintf(total_cyc,
430                                         " %'16"PRIu64"",
431                                         (cpg != 0 ?
432                                          port->port_stat[total_cycles] / cpg
433                                          : 0));
434                         else
435                                 sprintf(total_cyc,
436                                         "             ----");
437                         fprintf(f,
438                                 "%4s %10u %8u %9s %'16"PRIu64" %'16"PRIu64" %s "
439                                 "%'16"PRIu64" %'16"PRIu64" %'16"PRIu64"\n",
440                                 p_type,
441                                 i,
442                                 port->id,
443                                 (port->external_qid == OPDL_INVALID_QID ? "---"
444                                  : queue_id),
445                                 (cne != 0 ?
446                                  port->port_stat[claim_pkts_requested] / cne
447                                  : 0),
448                                 (cne != 0 ?
449                                  port->port_stat[claim_pkts_granted] / cne
450                                  : 0),
451                                 total_cyc,
452                                 port->port_stat[claim_empty],
453                                 port->port_stat[claim_non_empty],
454                                 port->port_stat[claim_pkts_granted]);
455                 }
456         }
457         fprintf(f, "\n");
458 }
459
460
461 static void
462 opdl_stop(struct rte_eventdev *dev)
463 {
464         struct opdl_evdev *device = opdl_pmd_priv(dev);
465
466         opdl_xstats_uninit(dev);
467
468         destroy_queues_and_rings(dev);
469
470
471         device->started = 0;
472
473         rte_smp_wmb();
474 }
475
476 static int
477 opdl_start(struct rte_eventdev *dev)
478 {
479         int err = 0;
480
481         if (!err)
482                 err = create_queues_and_rings(dev);
483
484
485         if (!err)
486                 err = assign_internal_queue_ids(dev);
487
488
489         if (!err)
490                 err = initialise_queue_zero_ports(dev);
491
492
493         if (!err)
494                 err = initialise_all_other_ports(dev);
495
496
497         if (!err)
498                 err = check_queues_linked(dev);
499
500
501         if (!err)
502                 err = opdl_add_event_handlers(dev);
503
504
505         if (!err)
506                 err = build_all_dependencies(dev);
507
508         if (!err) {
509                 opdl_xstats_init(dev);
510
511                 struct opdl_evdev *device = opdl_pmd_priv(dev);
512
513                 PMD_DRV_LOG(INFO, "DEV_ID:[%02d] : "
514                               "SUCCESS : Created %u total queues (%u ex, %u in),"
515                               " %u opdls, %u event_dev ports, %u input ports",
516                               opdl_pmd_dev_id(device),
517                               device->nb_queues,
518                               (device->nb_queues - device->nb_opdls),
519                               device->nb_opdls,
520                               device->nb_opdls,
521                               device->nb_ports,
522                               device->queue[0].nb_ports);
523         } else
524                 opdl_stop(dev);
525
526         return err;
527 }
528
529 static int
530 opdl_close(struct rte_eventdev *dev)
531 {
532         struct opdl_evdev *device = opdl_pmd_priv(dev);
533         uint32_t i;
534
535         for (i = 0; i < device->max_port_nb; i++) {
536                 memset(&device->ports[i],
537                        0,
538                        sizeof(struct opdl_port));
539         }
540
541         memset(&device->s_md,
542                         0x0,
543                         sizeof(struct opdl_stage_meta_data)*OPDL_PORTS_MAX);
544
545         memset(&device->q_md,
546                         0xFF,
547                         sizeof(struct opdl_queue_meta_data)*OPDL_MAX_QUEUES);
548
549
550         memset(device->q_map_ex_to_in,
551                         0,
552                         sizeof(uint8_t)*OPDL_INVALID_QID);
553
554         opdl_xstats_uninit(dev);
555
556         device->max_port_nb = 0;
557
558         device->max_queue_nb = 0;
559
560         device->nb_opdls = 0;
561
562         device->nb_queues   = 0;
563
564         device->nb_ports    = 0;
565
566         device->nb_q_md     = 0;
567
568         dev->data->nb_queues = 0;
569
570         dev->data->nb_ports = 0;
571
572
573         return 0;
574 }
575
576 static int
577 assign_numa_node(const char *key __rte_unused, const char *value, void *opaque)
578 {
579         int *socket_id = opaque;
580         *socket_id = atoi(value);
581         if (*socket_id >= RTE_MAX_NUMA_NODES)
582                 return -1;
583         return 0;
584 }
585
586 static int
587 set_do_validation(const char *key __rte_unused, const char *value, void *opaque)
588 {
589         int *do_val = opaque;
590         *do_val = atoi(value);
591         if (*do_val != 0)
592                 *do_val = 1;
593
594         return 0;
595 }
596 static int
597 set_do_test(const char *key __rte_unused, const char *value, void *opaque)
598 {
599         int *do_test = opaque;
600
601         *do_test = atoi(value);
602
603         if (*do_test != 0)
604                 *do_test = 1;
605         return 0;
606 }
607
608 static int
609 opdl_probe(struct rte_vdev_device *vdev)
610 {
611         static const struct rte_eventdev_ops evdev_opdl_ops = {
612                 .dev_configure = opdl_dev_configure,
613                 .dev_infos_get = opdl_info_get,
614                 .dev_close = opdl_close,
615                 .dev_start = opdl_start,
616                 .dev_stop = opdl_stop,
617                 .dump = opdl_dump,
618
619                 .queue_def_conf = opdl_queue_def_conf,
620                 .queue_setup = opdl_queue_setup,
621                 .queue_release = opdl_queue_release,
622                 .port_def_conf = opdl_port_def_conf,
623                 .port_setup = opdl_port_setup,
624                 .port_release = opdl_port_release,
625                 .port_link = opdl_port_link,
626                 .port_unlink = opdl_port_unlink,
627
628
629                 .xstats_get = opdl_xstats_get,
630                 .xstats_get_names = opdl_xstats_get_names,
631                 .xstats_get_by_name = opdl_xstats_get_by_name,
632                 .xstats_reset = opdl_xstats_reset,
633         };
634
635         static const char *const args[] = {
636                 NUMA_NODE_ARG,
637                 DO_VALIDATION_ARG,
638                 DO_TEST_ARG,
639                 NULL
640         };
641         const char *name;
642         const char *params;
643         struct rte_eventdev *dev;
644         struct opdl_evdev *opdl;
645         int socket_id = rte_socket_id();
646         int do_validation = 0;
647         int do_test = 0;
648         int str_len;
649         int test_result = 0;
650
651         name = rte_vdev_device_name(vdev);
652         params = rte_vdev_device_args(vdev);
653         if (params != NULL && params[0] != '\0') {
654                 struct rte_kvargs *kvlist = rte_kvargs_parse(params, args);
655
656                 if (!kvlist) {
657                         PMD_DRV_LOG(INFO,
658                                         "Ignoring unsupported parameters when creating device '%s'\n",
659                                         name);
660                 } else {
661                         int ret = rte_kvargs_process(kvlist, NUMA_NODE_ARG,
662                                         assign_numa_node, &socket_id);
663                         if (ret != 0) {
664                                 PMD_DRV_LOG(ERR,
665                                                 "%s: Error parsing numa node parameter",
666                                                 name);
667
668                                 rte_kvargs_free(kvlist);
669                                 return ret;
670                         }
671
672                         ret = rte_kvargs_process(kvlist, DO_VALIDATION_ARG,
673                                         set_do_validation, &do_validation);
674                         if (ret != 0) {
675                                 PMD_DRV_LOG(ERR,
676                                         "%s: Error parsing do validation parameter",
677                                         name);
678                                 rte_kvargs_free(kvlist);
679                                 return ret;
680                         }
681
682                         ret = rte_kvargs_process(kvlist, DO_TEST_ARG,
683                                         set_do_test, &do_test);
684                         if (ret != 0) {
685                                 PMD_DRV_LOG(ERR,
686                                         "%s: Error parsing do test parameter",
687                                         name);
688                                 rte_kvargs_free(kvlist);
689                                 return ret;
690                         }
691
692                         rte_kvargs_free(kvlist);
693                 }
694         }
695         dev = rte_event_pmd_vdev_init(name,
696                         sizeof(struct opdl_evdev), socket_id);
697
698         if (dev == NULL) {
699                 PMD_DRV_LOG(ERR, "eventdev vdev init() failed");
700                 return -EFAULT;
701         }
702
703         PMD_DRV_LOG(INFO, "DEV_ID:[%02d] : "
704                       "Success - creating eventdev device %s, numa_node:[%d], do_valdation:[%s]"
705                           " , self_test:[%s]\n",
706                       dev->data->dev_id,
707                       name,
708                       socket_id,
709                       (do_validation ? "true" : "false"),
710                           (do_test ? "true" : "false"));
711
712         dev->dev_ops = &evdev_opdl_ops;
713
714         dev->enqueue = opdl_event_enqueue;
715         dev->enqueue_burst = opdl_event_enqueue_burst;
716         dev->enqueue_new_burst = opdl_event_enqueue_burst;
717         dev->enqueue_forward_burst = opdl_event_enqueue_burst;
718         dev->dequeue = opdl_event_dequeue;
719         dev->dequeue_burst = opdl_event_dequeue_burst;
720
721         if (rte_eal_process_type() != RTE_PROC_PRIMARY)
722                 return 0;
723
724         opdl = dev->data->dev_private;
725         opdl->data = dev->data;
726         opdl->socket = socket_id;
727         opdl->do_validation = do_validation;
728         opdl->do_test = do_test;
729         str_len = strlen(name);
730         memcpy(opdl->service_name, name, str_len);
731
732         if (do_test == 1)
733                 test_result =  opdl_selftest();
734
735         return test_result;
736 }
737
738 static int
739 opdl_remove(struct rte_vdev_device *vdev)
740 {
741         const char *name;
742
743         name = rte_vdev_device_name(vdev);
744         if (name == NULL)
745                 return -EINVAL;
746
747         PMD_DRV_LOG(INFO, "Closing eventdev opdl device %s\n", name);
748
749         return rte_event_pmd_vdev_uninit(name);
750 }
751
752 static struct rte_vdev_driver evdev_opdl_pmd_drv = {
753         .probe = opdl_probe,
754         .remove = opdl_remove
755 };
756
757 RTE_INIT(opdl_init_log);
758
759 static void
760 opdl_init_log(void)
761 {
762         opdl_logtype_driver = rte_log_register("eventdev.opdl.driver");
763         if (opdl_logtype_driver >= 0)
764                 rte_log_set_level(opdl_logtype_driver, RTE_LOG_INFO);
765 }
766
767
768 RTE_PMD_REGISTER_VDEV(EVENTDEV_NAME_OPDL_PMD, evdev_opdl_pmd_drv);
769 RTE_PMD_REGISTER_PARAM_STRING(event_opdl, NUMA_NODE_ARG "=<int>"
770                               DO_VALIDATION_ARG "=<int>" DO_TEST_ARG "=<int>");