8cdef59ac46b1a389f84c06599431cce5327808e
[dpdk.git] / drivers / net / ionic / ionic_ethdev.c
1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
2  * Copyright(c) 2018-2019 Pensando Systems, Inc. All rights reserved.
3  */
4
5 #include <rte_pci.h>
6 #include <rte_bus_pci.h>
7 #include <rte_ethdev.h>
8 #include <rte_ethdev_driver.h>
9 #include <rte_malloc.h>
10 #include <rte_ethdev_pci.h>
11
12 #include "ionic_logs.h"
13 #include "ionic.h"
14 #include "ionic_dev.h"
15 #include "ionic_mac_api.h"
16 #include "ionic_lif.h"
17 #include "ionic_ethdev.h"
18
19 static int  eth_ionic_dev_init(struct rte_eth_dev *eth_dev, void *init_params);
20 static int  eth_ionic_dev_uninit(struct rte_eth_dev *eth_dev);
21 static int  ionic_dev_info_get(struct rte_eth_dev *eth_dev,
22         struct rte_eth_dev_info *dev_info);
23 static int  ionic_dev_configure(struct rte_eth_dev *dev);
24 static int  ionic_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
25 static int  ionic_dev_start(struct rte_eth_dev *dev);
26 static void ionic_dev_stop(struct rte_eth_dev *dev);
27 static void ionic_dev_close(struct rte_eth_dev *dev);
28 static int  ionic_dev_set_link_up(struct rte_eth_dev *dev);
29 static int  ionic_dev_set_link_down(struct rte_eth_dev *dev);
30 static int  ionic_dev_link_update(struct rte_eth_dev *eth_dev,
31         int wait_to_complete);
32
33 int ionic_logtype;
34
35 static const struct rte_pci_id pci_id_ionic_map[] = {
36         { RTE_PCI_DEVICE(IONIC_PENSANDO_VENDOR_ID, IONIC_DEV_ID_ETH_PF) },
37         { RTE_PCI_DEVICE(IONIC_PENSANDO_VENDOR_ID, IONIC_DEV_ID_ETH_VF) },
38         { RTE_PCI_DEVICE(IONIC_PENSANDO_VENDOR_ID, IONIC_DEV_ID_ETH_MGMT) },
39         { .vendor_id = 0, /* sentinel */ },
40 };
41
42 static const struct eth_dev_ops ionic_eth_dev_ops = {
43         .dev_infos_get          = ionic_dev_info_get,
44         .dev_configure          = ionic_dev_configure,
45         .mtu_set                = ionic_dev_mtu_set,
46         .dev_start              = ionic_dev_start,
47         .dev_stop               = ionic_dev_stop,
48         .dev_close              = ionic_dev_close,
49         .link_update            = ionic_dev_link_update,
50         .dev_set_link_up        = ionic_dev_set_link_up,
51         .dev_set_link_down      = ionic_dev_set_link_down,
52 };
53
54 /*
55  * Set device link up, enable tx.
56  */
57 static int
58 ionic_dev_set_link_up(struct rte_eth_dev *eth_dev)
59 {
60         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
61         struct ionic_adapter *adapter = lif->adapter;
62         struct ionic_dev *idev = &adapter->idev;
63         int err;
64
65         IONIC_PRINT_CALL();
66
67         ionic_dev_cmd_port_state(idev, IONIC_PORT_ADMIN_STATE_UP);
68
69         err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
70         if (err) {
71                 IONIC_PRINT(WARNING, "Failed to bring port UP");
72                 return err;
73         }
74
75         return 0;
76 }
77
78 /*
79  * Set device link down, disable tx.
80  */
81 static int
82 ionic_dev_set_link_down(struct rte_eth_dev *eth_dev)
83 {
84         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
85         struct ionic_adapter *adapter = lif->adapter;
86         struct ionic_dev *idev = &adapter->idev;
87         int err;
88
89         IONIC_PRINT_CALL();
90
91         ionic_dev_cmd_port_state(idev, IONIC_PORT_ADMIN_STATE_DOWN);
92
93         err = ionic_dev_cmd_wait_check(idev, IONIC_DEVCMD_TIMEOUT);
94         if (err) {
95                 IONIC_PRINT(WARNING, "Failed to bring port DOWN");
96                 return err;
97         }
98
99         return 0;
100 }
101
102 static int
103 ionic_dev_link_update(struct rte_eth_dev *eth_dev,
104                 int wait_to_complete __rte_unused)
105 {
106         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
107         struct ionic_adapter *adapter = lif->adapter;
108         struct rte_eth_link link;
109
110         IONIC_PRINT_CALL();
111
112         /* Initialize */
113         memset(&link, 0, sizeof(link));
114         link.link_autoneg = ETH_LINK_AUTONEG;
115
116         if (!adapter->link_up) {
117                 /* Interface is down */
118                 link.link_status = ETH_LINK_DOWN;
119                 link.link_duplex = ETH_LINK_HALF_DUPLEX;
120                 link.link_speed = ETH_SPEED_NUM_NONE;
121         } else {
122                 /* Interface is up */
123                 link.link_status = ETH_LINK_UP;
124                 link.link_duplex = ETH_LINK_FULL_DUPLEX;
125                 switch (adapter->link_speed) {
126                 case  10000:
127                         link.link_speed = ETH_SPEED_NUM_10G;
128                         break;
129                 case  25000:
130                         link.link_speed = ETH_SPEED_NUM_25G;
131                         break;
132                 case  40000:
133                         link.link_speed = ETH_SPEED_NUM_40G;
134                         break;
135                 case  50000:
136                         link.link_speed = ETH_SPEED_NUM_50G;
137                         break;
138                 case 100000:
139                         link.link_speed = ETH_SPEED_NUM_100G;
140                         break;
141                 default:
142                         link.link_speed = ETH_SPEED_NUM_NONE;
143                         break;
144                 }
145         }
146
147         return rte_eth_linkstatus_set(eth_dev, &link);
148 }
149
150 /**
151  * Interrupt handler triggered by NIC for handling
152  * specific interrupt.
153  *
154  * @param param
155  *  The address of parameter registered before.
156  *
157  * @return
158  *  void
159  */
160 static void
161 ionic_dev_interrupt_handler(void *param)
162 {
163         struct ionic_adapter *adapter = (struct ionic_adapter *)param;
164         uint32_t i;
165
166         IONIC_PRINT(DEBUG, "->");
167
168         for (i = 0; i < adapter->nlifs; i++) {
169                 if (adapter->lifs[i])
170                         ionic_notifyq_handler(adapter->lifs[i], -1);
171         }
172 }
173
174 static int
175 ionic_dev_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
176 {
177         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
178         uint32_t max_frame_size;
179         int err;
180
181         IONIC_PRINT_CALL();
182
183         /*
184          * Note: mtu check against IONIC_MIN_MTU, IONIC_MAX_MTU
185          * is done by the the API.
186          */
187
188         /*
189          * Max frame size is MTU + Ethernet header + VLAN + QinQ
190          * (plus ETHER_CRC_LEN if the adapter is able to keep CRC)
191          */
192         max_frame_size = mtu + RTE_ETHER_HDR_LEN + 4 + 4;
193
194         if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len < max_frame_size)
195                 return -EINVAL;
196
197         err = ionic_lif_change_mtu(lif, mtu);
198         if (err)
199                 return err;
200
201         return 0;
202 }
203
204 static int
205 ionic_dev_info_get(struct rte_eth_dev *eth_dev,
206                 struct rte_eth_dev_info *dev_info)
207 {
208         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
209         struct ionic_adapter *adapter = lif->adapter;
210         struct ionic_identity *ident = &adapter->ident;
211
212         IONIC_PRINT_CALL();
213
214         dev_info->max_rx_queues = (uint16_t)
215                 ident->lif.eth.config.queue_count[IONIC_QTYPE_RXQ];
216         dev_info->max_tx_queues = (uint16_t)
217                 ident->lif.eth.config.queue_count[IONIC_QTYPE_TXQ];
218         /* Also add ETHER_CRC_LEN if the adapter is able to keep CRC */
219         dev_info->min_rx_bufsize = IONIC_MIN_MTU + RTE_ETHER_HDR_LEN;
220         dev_info->max_rx_pktlen = IONIC_MAX_MTU + RTE_ETHER_HDR_LEN;
221         dev_info->max_mac_addrs = adapter->max_mac_addrs;
222         dev_info->min_mtu = IONIC_MIN_MTU;
223         dev_info->max_mtu = IONIC_MAX_MTU;
224
225         dev_info->speed_capa =
226                 ETH_LINK_SPEED_10G |
227                 ETH_LINK_SPEED_25G |
228                 ETH_LINK_SPEED_40G |
229                 ETH_LINK_SPEED_50G |
230                 ETH_LINK_SPEED_100G;
231
232         return 0;
233 }
234
235 static int
236 ionic_dev_configure(struct rte_eth_dev *eth_dev)
237 {
238         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
239         int err;
240
241         IONIC_PRINT_CALL();
242
243         err = ionic_lif_configure(lif);
244         if (err) {
245                 IONIC_PRINT(ERR, "Cannot configure LIF: %d", err);
246                 return err;
247         }
248
249         return 0;
250 }
251
252 static inline uint32_t
253 ionic_parse_link_speeds(uint16_t link_speeds)
254 {
255         if (link_speeds & ETH_LINK_SPEED_100G)
256                 return 100000;
257         else if (link_speeds & ETH_LINK_SPEED_50G)
258                 return 50000;
259         else if (link_speeds & ETH_LINK_SPEED_40G)
260                 return 40000;
261         else if (link_speeds & ETH_LINK_SPEED_25G)
262                 return 25000;
263         else if (link_speeds & ETH_LINK_SPEED_10G)
264                 return 10000;
265         else
266                 return 0;
267 }
268
269 /*
270  * Configure device link speed and setup link.
271  * It returns 0 on success.
272  */
273 static int
274 ionic_dev_start(struct rte_eth_dev *eth_dev)
275 {
276         struct rte_eth_conf *dev_conf = &eth_dev->data->dev_conf;
277         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
278         struct ionic_adapter *adapter = lif->adapter;
279         struct ionic_dev *idev = &adapter->idev;
280         uint32_t allowed_speeds;
281         int err;
282
283         IONIC_PRINT_CALL();
284
285         allowed_speeds =
286                 ETH_LINK_SPEED_FIXED |
287                 ETH_LINK_SPEED_10G |
288                 ETH_LINK_SPEED_25G |
289                 ETH_LINK_SPEED_40G |
290                 ETH_LINK_SPEED_50G |
291                 ETH_LINK_SPEED_100G;
292
293         if (dev_conf->link_speeds & ~allowed_speeds) {
294                 IONIC_PRINT(ERR, "Invalid link setting");
295                 return -EINVAL;
296         }
297
298         err = ionic_lif_start(lif);
299         if (err) {
300                 IONIC_PRINT(ERR, "Cannot start LIF: %d", err);
301                 return err;
302         }
303
304         if (eth_dev->data->dev_conf.link_speeds & ETH_LINK_SPEED_FIXED) {
305                 uint32_t speed = ionic_parse_link_speeds(dev_conf->link_speeds);
306
307                 if (speed)
308                         ionic_dev_cmd_port_speed(idev, speed);
309         }
310
311         ionic_dev_link_update(eth_dev, 0);
312
313         return 0;
314 }
315
316 /*
317  * Stop device: disable rx and tx functions to allow for reconfiguring.
318  */
319 static void
320 ionic_dev_stop(struct rte_eth_dev *eth_dev)
321 {
322         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
323         int err;
324
325         IONIC_PRINT_CALL();
326
327         err = ionic_lif_stop(lif);
328         if (err)
329                 IONIC_PRINT(ERR, "Cannot stop LIF: %d", err);
330 }
331
332 /*
333  * Reset and stop device.
334  */
335 static void
336 ionic_dev_close(struct rte_eth_dev *eth_dev)
337 {
338         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
339         int err;
340
341         IONIC_PRINT_CALL();
342
343         err = ionic_lif_stop(lif);
344         if (err) {
345                 IONIC_PRINT(ERR, "Cannot stop LIF: %d", err);
346                 return;
347         }
348
349         err = eth_ionic_dev_uninit(eth_dev);
350         if (err) {
351                 IONIC_PRINT(ERR, "Cannot destroy LIF: %d", err);
352                 return;
353         }
354 }
355
356 static int
357 eth_ionic_dev_init(struct rte_eth_dev *eth_dev, void *init_params)
358 {
359         struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
360         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
361         struct ionic_adapter *adapter = (struct ionic_adapter *)init_params;
362         int err;
363
364         IONIC_PRINT_CALL();
365
366         eth_dev->dev_ops = &ionic_eth_dev_ops;
367
368         /* Multi-process not supported, primary does initialization anyway */
369         if (rte_eal_process_type() != RTE_PROC_PRIMARY)
370                 return 0;
371
372         rte_eth_copy_pci_info(eth_dev, pci_dev);
373
374         lif->index = adapter->nlifs;
375         lif->eth_dev = eth_dev;
376         lif->adapter = adapter;
377         adapter->lifs[adapter->nlifs] = lif;
378
379         IONIC_PRINT(DEBUG, "Up to %u MAC addresses supported",
380                 adapter->max_mac_addrs);
381
382         /* Allocate memory for storing MAC addresses */
383         eth_dev->data->mac_addrs = rte_zmalloc("ionic",
384                 RTE_ETHER_ADDR_LEN * adapter->max_mac_addrs, 0);
385
386         if (eth_dev->data->mac_addrs == NULL) {
387                 IONIC_PRINT(ERR, "Failed to allocate %u bytes needed to "
388                         "store MAC addresses",
389                         RTE_ETHER_ADDR_LEN * adapter->max_mac_addrs);
390                 err = -ENOMEM;
391                 goto err;
392         }
393
394         err = ionic_lif_alloc(lif);
395         if (err) {
396                 IONIC_PRINT(ERR, "Cannot allocate LIFs: %d, aborting",
397                         err);
398                 goto err;
399         }
400
401         err = ionic_lif_init(lif);
402         if (err) {
403                 IONIC_PRINT(ERR, "Cannot init LIFs: %d, aborting", err);
404                 goto err_free_lif;
405         }
406
407         /* Copy the MAC address */
408         rte_ether_addr_copy((struct rte_ether_addr *)lif->mac_addr,
409                 &eth_dev->data->mac_addrs[0]);
410
411         IONIC_PRINT(DEBUG, "Port %u initialized", eth_dev->data->port_id);
412
413         return 0;
414
415 err_free_lif:
416         ionic_lif_free(lif);
417 err:
418         return err;
419 }
420
421 static int
422 eth_ionic_dev_uninit(struct rte_eth_dev *eth_dev)
423 {
424         struct ionic_lif *lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
425         struct ionic_adapter *adapter = lif->adapter;
426
427         IONIC_PRINT_CALL();
428
429         if (rte_eal_process_type() != RTE_PROC_PRIMARY)
430                 return 0;
431
432         adapter->lifs[lif->index] = NULL;
433
434         ionic_lif_deinit(lif);
435         ionic_lif_free(lif);
436
437         eth_dev->dev_ops = NULL;
438
439         return 0;
440 }
441
442 static int
443 ionic_configure_intr(struct ionic_adapter *adapter)
444 {
445         struct rte_pci_device *pci_dev = adapter->pci_dev;
446         struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
447         int err;
448
449         IONIC_PRINT(DEBUG, "Configuring %u intrs", adapter->nintrs);
450
451         if (rte_intr_efd_enable(intr_handle, adapter->nintrs)) {
452                 IONIC_PRINT(ERR, "Fail to create eventfd");
453                 return -1;
454         }
455
456         if (rte_intr_dp_is_en(intr_handle))
457                 IONIC_PRINT(DEBUG,
458                         "Packet I/O interrupt on datapath is enabled");
459
460         if (!intr_handle->intr_vec) {
461                 intr_handle->intr_vec = rte_zmalloc("intr_vec",
462                         adapter->nintrs * sizeof(int), 0);
463
464                 if (!intr_handle->intr_vec) {
465                         IONIC_PRINT(ERR, "Failed to allocate %u vectors",
466                                 adapter->nintrs);
467                         return -ENOMEM;
468                 }
469         }
470
471         err = rte_intr_callback_register(intr_handle,
472                 ionic_dev_interrupt_handler,
473                 adapter);
474
475         if (err) {
476                 IONIC_PRINT(ERR,
477                         "Failure registering interrupts handler (%d)",
478                         err);
479                 return err;
480         }
481
482         /* enable intr mapping */
483         err = rte_intr_enable(intr_handle);
484
485         if (err) {
486                 IONIC_PRINT(ERR, "Failure enabling interrupts (%d)", err);
487                 return err;
488         }
489
490         return 0;
491 }
492
493 static void
494 ionic_unconfigure_intr(struct ionic_adapter *adapter)
495 {
496         struct rte_pci_device *pci_dev = adapter->pci_dev;
497         struct rte_intr_handle *intr_handle = &pci_dev->intr_handle;
498
499         rte_intr_disable(intr_handle);
500
501         rte_intr_callback_unregister(intr_handle,
502                 ionic_dev_interrupt_handler,
503                 adapter);
504 }
505
506 static int
507 eth_ionic_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
508                 struct rte_pci_device *pci_dev)
509 {
510         char name[RTE_ETH_NAME_MAX_LEN];
511         struct rte_mem_resource *resource;
512         struct ionic_adapter *adapter;
513         struct ionic_hw *hw;
514         unsigned long i;
515         int err;
516
517         /* Check structs (trigger error at compilation time) */
518         ionic_struct_size_checks();
519
520         /* Multi-process not supported */
521         if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
522                 err = -EPERM;
523                 goto err;
524         }
525
526         IONIC_PRINT(DEBUG, "Initializing device %s",
527                 pci_dev->device.name);
528
529         adapter = rte_zmalloc("ionic", sizeof(*adapter), 0);
530         if (!adapter) {
531                 IONIC_PRINT(ERR, "OOM");
532                 err = -ENOMEM;
533                 goto err;
534         }
535
536         adapter->pci_dev = pci_dev;
537         hw = &adapter->hw;
538
539         hw->device_id = pci_dev->id.device_id;
540         hw->vendor_id = pci_dev->id.vendor_id;
541
542         err = ionic_init_mac(hw);
543         if (err != 0) {
544                 IONIC_PRINT(ERR, "Mac init failed: %d", err);
545                 err = -EIO;
546                 goto err_free_adapter;
547         }
548
549         adapter->is_mgmt_nic = (pci_dev->id.device_id == IONIC_DEV_ID_ETH_MGMT);
550
551         adapter->num_bars = 0;
552         for (i = 0; i < PCI_MAX_RESOURCE && i < IONIC_BARS_MAX; i++) {
553                 resource = &pci_dev->mem_resource[i];
554                 if (resource->phys_addr == 0 || resource->len == 0)
555                         continue;
556                 adapter->bars[adapter->num_bars].vaddr = resource->addr;
557                 adapter->bars[adapter->num_bars].bus_addr = resource->phys_addr;
558                 adapter->bars[adapter->num_bars].len = resource->len;
559                 adapter->num_bars++;
560         }
561
562         /* Discover ionic dev resources */
563
564         err = ionic_setup(adapter);
565         if (err) {
566                 IONIC_PRINT(ERR, "Cannot setup device: %d, aborting", err);
567                 goto err_free_adapter;
568         }
569
570         err = ionic_identify(adapter);
571         if (err) {
572                 IONIC_PRINT(ERR, "Cannot identify device: %d, aborting",
573                         err);
574                 goto err_free_adapter;
575         }
576
577         err = ionic_init(adapter);
578         if (err) {
579                 IONIC_PRINT(ERR, "Cannot init device: %d, aborting", err);
580                 goto err_free_adapter;
581         }
582
583         /* Configure the ports */
584         err = ionic_port_identify(adapter);
585         if (err) {
586                 IONIC_PRINT(ERR, "Cannot identify port: %d, aborting",
587                         err);
588                 goto err_free_adapter;
589         }
590
591         err = ionic_port_init(adapter);
592         if (err) {
593                 IONIC_PRINT(ERR, "Cannot init port: %d, aborting", err);
594                 goto err_free_adapter;
595         }
596
597         /* Configure LIFs */
598         err = ionic_lif_identify(adapter);
599         if (err) {
600                 IONIC_PRINT(ERR, "Cannot identify lif: %d, aborting", err);
601                 goto err_free_adapter;
602         }
603
604         /* Allocate and init LIFs */
605         err = ionic_lifs_size(adapter);
606         if (err) {
607                 IONIC_PRINT(ERR, "Cannot size LIFs: %d, aborting", err);
608                 goto err_free_adapter;
609         }
610
611         adapter->max_mac_addrs = adapter->ident.lif.eth.max_ucast_filters;
612
613         adapter->nlifs = 0;
614         for (i = 0; i < adapter->ident.dev.nlifs; i++) {
615                 snprintf(name, sizeof(name), "net_%s_lif_%lu",
616                         pci_dev->device.name, i);
617
618                 err = rte_eth_dev_create(&pci_dev->device, name,
619                         sizeof(struct ionic_lif),
620                         NULL, NULL,
621                         eth_ionic_dev_init, adapter);
622                 if (err) {
623                         IONIC_PRINT(ERR, "Cannot create eth device for "
624                                 "ionic lif %s", name);
625                         break;
626                 }
627
628                 adapter->nlifs++;
629         }
630
631         err = ionic_configure_intr(adapter);
632
633         if (err) {
634                 IONIC_PRINT(ERR, "Failed to configure interrupts");
635                 goto err_free_adapter;
636         }
637
638         return 0;
639
640 err_free_adapter:
641         rte_free(adapter);
642 err:
643         return err;
644 }
645
646 static int
647 eth_ionic_pci_remove(struct rte_pci_device *pci_dev __rte_unused)
648 {
649         char name[RTE_ETH_NAME_MAX_LEN];
650         struct ionic_adapter *adapter = NULL;
651         struct rte_eth_dev *eth_dev;
652         struct ionic_lif *lif;
653         uint32_t i;
654
655         /* Adapter lookup is using (the first) eth_dev name */
656         snprintf(name, sizeof(name), "net_%s_lif_0",
657                 pci_dev->device.name);
658
659         eth_dev = rte_eth_dev_allocated(name);
660         if (eth_dev) {
661                 lif = IONIC_ETH_DEV_TO_LIF(eth_dev);
662                 adapter = lif->adapter;
663         }
664
665         if (adapter) {
666                 ionic_unconfigure_intr(adapter);
667
668                 for (i = 0; i < adapter->nlifs; i++) {
669                         lif = adapter->lifs[i];
670                         rte_eth_dev_destroy(lif->eth_dev, eth_ionic_dev_uninit);
671                 }
672
673                 rte_free(adapter);
674         }
675
676         return 0;
677 }
678
679 static struct rte_pci_driver rte_ionic_pmd = {
680         .id_table = pci_id_ionic_map,
681         .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC,
682         .probe = eth_ionic_pci_probe,
683         .remove = eth_ionic_pci_remove,
684 };
685
686 RTE_PMD_REGISTER_PCI(net_ionic, rte_ionic_pmd);
687 RTE_PMD_REGISTER_PCI_TABLE(net_ionic, pci_id_ionic_map);
688 RTE_PMD_REGISTER_KMOD_DEP(net_ionic, "* igb_uio | uio_pci_generic | vfio-pci");
689
690 RTE_INIT(ionic_init_log)
691 {
692         ionic_logtype = rte_log_register("pmd.net.ionic");
693         if (ionic_logtype >= 0)
694                 rte_log_set_level(ionic_logtype, RTE_LOG_NOTICE);
695 }