net/liquidio: add Tx data path for single segment
[dpdk.git] / drivers / net / liquidio / lio_ethdev.c
1 /*
2  *   BSD LICENSE
3  *
4  *   Copyright(c) 2017 Cavium, Inc.. All rights reserved.
5  *   All rights reserved.
6  *
7  *   Redistribution and use in source and binary forms, with or without
8  *   modification, are permitted provided that the following conditions
9  *   are met:
10  *
11  *     * Redistributions of source code must retain the above copyright
12  *       notice, this list of conditions and the following disclaimer.
13  *     * Redistributions in binary form must reproduce the above copyright
14  *       notice, this list of conditions and the following disclaimer in
15  *       the documentation and/or other materials provided with the
16  *       distribution.
17  *     * Neither the name of Cavium, Inc. nor the names of its
18  *       contributors may be used to endorse or promote products derived
19  *       from this software without specific prior written permission.
20  *
21  *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  *   OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33
34 #include <rte_ethdev.h>
35 #include <rte_cycles.h>
36 #include <rte_malloc.h>
37 #include <rte_alarm.h>
38
39 #include "lio_logs.h"
40 #include "lio_23xx_vf.h"
41 #include "lio_ethdev.h"
42 #include "lio_rxtx.h"
43
44 static uint64_t
45 lio_hweight64(uint64_t w)
46 {
47         uint64_t res = w - ((w >> 1) & 0x5555555555555555ul);
48
49         res =
50             (res & 0x3333333333333333ul) + ((res >> 2) & 0x3333333333333333ul);
51         res = (res + (res >> 4)) & 0x0F0F0F0F0F0F0F0Ful;
52         res = res + (res >> 8);
53         res = res + (res >> 16);
54
55         return (res + (res >> 32)) & 0x00000000000000FFul;
56 }
57
58 /**
59  * Setup our receive queue/ringbuffer. This is the
60  * queue the Octeon uses to send us packets and
61  * responses. We are given a memory pool for our
62  * packet buffers that are used to populate the receive
63  * queue.
64  *
65  * @param eth_dev
66  *    Pointer to the structure rte_eth_dev
67  * @param q_no
68  *    Queue number
69  * @param num_rx_descs
70  *    Number of entries in the queue
71  * @param socket_id
72  *    Where to allocate memory
73  * @param rx_conf
74  *    Pointer to the struction rte_eth_rxconf
75  * @param mp
76  *    Pointer to the packet pool
77  *
78  * @return
79  *    - On success, return 0
80  *    - On failure, return -1
81  */
82 static int
83 lio_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
84                        uint16_t num_rx_descs, unsigned int socket_id,
85                        const struct rte_eth_rxconf *rx_conf __rte_unused,
86                        struct rte_mempool *mp)
87 {
88         struct lio_device *lio_dev = LIO_DEV(eth_dev);
89         struct rte_pktmbuf_pool_private *mbp_priv;
90         uint32_t fw_mapped_oq;
91         uint16_t buf_size;
92
93         if (q_no >= lio_dev->nb_rx_queues) {
94                 lio_dev_err(lio_dev, "Invalid rx queue number %u\n", q_no);
95                 return -EINVAL;
96         }
97
98         lio_dev_dbg(lio_dev, "setting up rx queue %u\n", q_no);
99
100         fw_mapped_oq = lio_dev->linfo.rxpciq[q_no].s.q_no;
101
102         if ((lio_dev->droq[fw_mapped_oq]) &&
103             (num_rx_descs != lio_dev->droq[fw_mapped_oq]->max_count)) {
104                 lio_dev_err(lio_dev,
105                             "Reconfiguring Rx descs not supported. Configure descs to same value %u or restart application\n",
106                             lio_dev->droq[fw_mapped_oq]->max_count);
107                 return -ENOTSUP;
108         }
109
110         mbp_priv = rte_mempool_get_priv(mp);
111         buf_size = mbp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM;
112
113         if (lio_setup_droq(lio_dev, fw_mapped_oq, num_rx_descs, buf_size, mp,
114                            socket_id)) {
115                 lio_dev_err(lio_dev, "droq allocation failed\n");
116                 return -1;
117         }
118
119         eth_dev->data->rx_queues[q_no] = lio_dev->droq[fw_mapped_oq];
120
121         return 0;
122 }
123
124 /**
125  * Release the receive queue/ringbuffer. Called by
126  * the upper layers.
127  *
128  * @param rxq
129  *    Opaque pointer to the receive queue to release
130  *
131  * @return
132  *    - nothing
133  */
134 static void
135 lio_dev_rx_queue_release(void *rxq)
136 {
137         struct lio_droq *droq = rxq;
138         struct lio_device *lio_dev = droq->lio_dev;
139         int oq_no;
140
141         /* Run time queue deletion not supported */
142         if (lio_dev->port_configured)
143                 return;
144
145         if (droq != NULL) {
146                 oq_no = droq->q_no;
147                 lio_delete_droq_queue(droq->lio_dev, oq_no);
148         }
149 }
150
151 /**
152  * Allocate and initialize SW ring. Initialize associated HW registers.
153  *
154  * @param eth_dev
155  *   Pointer to structure rte_eth_dev
156  *
157  * @param q_no
158  *   Queue number
159  *
160  * @param num_tx_descs
161  *   Number of ringbuffer descriptors
162  *
163  * @param socket_id
164  *   NUMA socket id, used for memory allocations
165  *
166  * @param tx_conf
167  *   Pointer to the structure rte_eth_txconf
168  *
169  * @return
170  *   - On success, return 0
171  *   - On failure, return -errno value
172  */
173 static int
174 lio_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t q_no,
175                        uint16_t num_tx_descs, unsigned int socket_id,
176                        const struct rte_eth_txconf *tx_conf __rte_unused)
177 {
178         struct lio_device *lio_dev = LIO_DEV(eth_dev);
179         int fw_mapped_iq = lio_dev->linfo.txpciq[q_no].s.q_no;
180         int retval;
181
182         if (q_no >= lio_dev->nb_tx_queues) {
183                 lio_dev_err(lio_dev, "Invalid tx queue number %u\n", q_no);
184                 return -EINVAL;
185         }
186
187         lio_dev_dbg(lio_dev, "setting up tx queue %u\n", q_no);
188
189         if ((lio_dev->instr_queue[fw_mapped_iq] != NULL) &&
190             (num_tx_descs != lio_dev->instr_queue[fw_mapped_iq]->max_count)) {
191                 lio_dev_err(lio_dev,
192                             "Reconfiguring Tx descs not supported. Configure descs to same value %u or restart application\n",
193                             lio_dev->instr_queue[fw_mapped_iq]->max_count);
194                 return -ENOTSUP;
195         }
196
197         retval = lio_setup_iq(lio_dev, q_no, lio_dev->linfo.txpciq[q_no],
198                               num_tx_descs, lio_dev, socket_id);
199
200         if (retval) {
201                 lio_dev_err(lio_dev, "Runtime IQ(TxQ) creation failed.\n");
202                 return retval;
203         }
204
205         retval = lio_setup_sglists(lio_dev, q_no, fw_mapped_iq,
206                                 lio_dev->instr_queue[fw_mapped_iq]->max_count,
207                                 socket_id);
208
209         if (retval) {
210                 lio_delete_instruction_queue(lio_dev, fw_mapped_iq);
211                 return retval;
212         }
213
214         eth_dev->data->tx_queues[q_no] = lio_dev->instr_queue[fw_mapped_iq];
215
216         return 0;
217 }
218
219 static int lio_dev_configure(struct rte_eth_dev *eth_dev)
220 {
221         struct lio_device *lio_dev = LIO_DEV(eth_dev);
222         uint16_t timeout = LIO_MAX_CMD_TIMEOUT;
223         int retval, num_iqueues, num_oqueues;
224         uint8_t mac[ETHER_ADDR_LEN], i;
225         struct lio_if_cfg_resp *resp;
226         struct lio_soft_command *sc;
227         union lio_if_cfg if_cfg;
228         uint32_t resp_size;
229
230         PMD_INIT_FUNC_TRACE();
231
232         /* Re-configuring firmware not supported.
233          * Can't change tx/rx queues per port from initial value.
234          */
235         if (lio_dev->port_configured) {
236                 if ((lio_dev->nb_rx_queues != eth_dev->data->nb_rx_queues) ||
237                     (lio_dev->nb_tx_queues != eth_dev->data->nb_tx_queues)) {
238                         lio_dev_err(lio_dev,
239                                     "rxq/txq re-conf not supported. Restart application with new value.\n");
240                         return -ENOTSUP;
241                 }
242                 return 0;
243         }
244
245         lio_dev->nb_rx_queues = eth_dev->data->nb_rx_queues;
246         lio_dev->nb_tx_queues = eth_dev->data->nb_tx_queues;
247
248         resp_size = sizeof(struct lio_if_cfg_resp);
249         sc = lio_alloc_soft_command(lio_dev, 0, resp_size, 0);
250         if (sc == NULL)
251                 return -ENOMEM;
252
253         resp = (struct lio_if_cfg_resp *)sc->virtrptr;
254
255         /* Firmware doesn't have capability to reconfigure the queues,
256          * Claim all queues, and use as many required
257          */
258         if_cfg.if_cfg64 = 0;
259         if_cfg.s.num_iqueues = lio_dev->nb_tx_queues;
260         if_cfg.s.num_oqueues = lio_dev->nb_rx_queues;
261         if_cfg.s.base_queue = 0;
262
263         if_cfg.s.gmx_port_id = lio_dev->pf_num;
264
265         lio_prepare_soft_command(lio_dev, sc, LIO_OPCODE,
266                                  LIO_OPCODE_IF_CFG, 0,
267                                  if_cfg.if_cfg64, 0);
268
269         /* Setting wait time in seconds */
270         sc->wait_time = LIO_MAX_CMD_TIMEOUT / 1000;
271
272         retval = lio_send_soft_command(lio_dev, sc);
273         if (retval == LIO_IQ_SEND_FAILED) {
274                 lio_dev_err(lio_dev, "iq/oq config failed status: %x\n",
275                             retval);
276                 /* Soft instr is freed by driver in case of failure. */
277                 goto nic_config_fail;
278         }
279
280         /* Sleep on a wait queue till the cond flag indicates that the
281          * response arrived or timed-out.
282          */
283         while ((*sc->status_word == LIO_COMPLETION_WORD_INIT) && --timeout) {
284                 lio_process_ordered_list(lio_dev);
285                 rte_delay_ms(1);
286         }
287
288         retval = resp->status;
289         if (retval) {
290                 lio_dev_err(lio_dev, "iq/oq config failed\n");
291                 goto nic_config_fail;
292         }
293
294         lio_swap_8B_data((uint64_t *)(&resp->cfg_info),
295                          sizeof(struct octeon_if_cfg_info) >> 3);
296
297         num_iqueues = lio_hweight64(resp->cfg_info.iqmask);
298         num_oqueues = lio_hweight64(resp->cfg_info.oqmask);
299
300         if (!(num_iqueues) || !(num_oqueues)) {
301                 lio_dev_err(lio_dev,
302                             "Got bad iqueues (%016lx) or oqueues (%016lx) from firmware.\n",
303                             (unsigned long)resp->cfg_info.iqmask,
304                             (unsigned long)resp->cfg_info.oqmask);
305                 goto nic_config_fail;
306         }
307
308         lio_dev_dbg(lio_dev,
309                     "interface %d, iqmask %016lx, oqmask %016lx, numiqueues %d, numoqueues %d\n",
310                     eth_dev->data->port_id,
311                     (unsigned long)resp->cfg_info.iqmask,
312                     (unsigned long)resp->cfg_info.oqmask,
313                     num_iqueues, num_oqueues);
314
315         lio_dev->linfo.num_rxpciq = num_oqueues;
316         lio_dev->linfo.num_txpciq = num_iqueues;
317
318         for (i = 0; i < num_oqueues; i++) {
319                 lio_dev->linfo.rxpciq[i].rxpciq64 =
320                     resp->cfg_info.linfo.rxpciq[i].rxpciq64;
321                 lio_dev_dbg(lio_dev, "index %d OQ %d\n",
322                             i, lio_dev->linfo.rxpciq[i].s.q_no);
323         }
324
325         for (i = 0; i < num_iqueues; i++) {
326                 lio_dev->linfo.txpciq[i].txpciq64 =
327                     resp->cfg_info.linfo.txpciq[i].txpciq64;
328                 lio_dev_dbg(lio_dev, "index %d IQ %d\n",
329                             i, lio_dev->linfo.txpciq[i].s.q_no);
330         }
331
332         lio_dev->linfo.hw_addr = resp->cfg_info.linfo.hw_addr;
333         lio_dev->linfo.gmxport = resp->cfg_info.linfo.gmxport;
334         lio_dev->linfo.link.link_status64 =
335                         resp->cfg_info.linfo.link.link_status64;
336
337         /* 64-bit swap required on LE machines */
338         lio_swap_8B_data(&lio_dev->linfo.hw_addr, 1);
339         for (i = 0; i < ETHER_ADDR_LEN; i++)
340                 mac[i] = *((uint8_t *)(((uint8_t *)&lio_dev->linfo.hw_addr) +
341                                        2 + i));
342
343         /* Copy the permanent MAC address */
344         ether_addr_copy((struct ether_addr *)mac, &eth_dev->data->mac_addrs[0]);
345
346         lio_dev->glist_lock =
347             rte_zmalloc(NULL, sizeof(*lio_dev->glist_lock) * num_iqueues, 0);
348         if (lio_dev->glist_lock == NULL)
349                 return -ENOMEM;
350
351         lio_dev->glist_head =
352                 rte_zmalloc(NULL, sizeof(*lio_dev->glist_head) * num_iqueues,
353                             0);
354         if (lio_dev->glist_head == NULL) {
355                 rte_free(lio_dev->glist_lock);
356                 lio_dev->glist_lock = NULL;
357                 return -ENOMEM;
358         }
359
360         lio_dev->port_configured = 1;
361
362         lio_free_soft_command(sc);
363
364         /* Disable iq_0 for reconf */
365         lio_dev->fn_list.disable_io_queues(lio_dev);
366
367         /* Reset ioq regs */
368         lio_dev->fn_list.setup_device_regs(lio_dev);
369
370         /* Free iq_0 used during init */
371         lio_free_instr_queue0(lio_dev);
372
373         return 0;
374
375 nic_config_fail:
376         lio_dev_err(lio_dev, "Failed retval %d\n", retval);
377         lio_free_soft_command(sc);
378         lio_free_instr_queue0(lio_dev);
379
380         return -ENODEV;
381 }
382
383 /* Define our ethernet definitions */
384 static const struct eth_dev_ops liovf_eth_dev_ops = {
385         .dev_configure          = lio_dev_configure,
386         .rx_queue_setup         = lio_dev_rx_queue_setup,
387         .rx_queue_release       = lio_dev_rx_queue_release,
388         .tx_queue_setup         = lio_dev_tx_queue_setup,
389 };
390
391 static void
392 lio_check_pf_hs_response(void *lio_dev)
393 {
394         struct lio_device *dev = lio_dev;
395
396         /* check till response arrives */
397         if (dev->pfvf_hsword.coproc_tics_per_us)
398                 return;
399
400         cn23xx_vf_handle_mbox(dev);
401
402         rte_eal_alarm_set(1, lio_check_pf_hs_response, lio_dev);
403 }
404
405 /**
406  * \brief Identify the LIO device and to map the BAR address space
407  * @param lio_dev lio device
408  */
409 static int
410 lio_chip_specific_setup(struct lio_device *lio_dev)
411 {
412         struct rte_pci_device *pdev = lio_dev->pci_dev;
413         uint32_t dev_id = pdev->id.device_id;
414         const char *s;
415         int ret = 1;
416
417         switch (dev_id) {
418         case LIO_CN23XX_VF_VID:
419                 lio_dev->chip_id = LIO_CN23XX_VF_VID;
420                 ret = cn23xx_vf_setup_device(lio_dev);
421                 s = "CN23XX VF";
422                 break;
423         default:
424                 s = "?";
425                 lio_dev_err(lio_dev, "Unsupported Chip\n");
426         }
427
428         if (!ret)
429                 lio_dev_info(lio_dev, "DEVICE : %s\n", s);
430
431         return ret;
432 }
433
434 static int
435 lio_first_time_init(struct lio_device *lio_dev,
436                     struct rte_pci_device *pdev)
437 {
438         int dpdk_queues;
439
440         PMD_INIT_FUNC_TRACE();
441
442         /* set dpdk specific pci device pointer */
443         lio_dev->pci_dev = pdev;
444
445         /* Identify the LIO type and set device ops */
446         if (lio_chip_specific_setup(lio_dev)) {
447                 lio_dev_err(lio_dev, "Chip specific setup failed\n");
448                 return -1;
449         }
450
451         /* Initialize soft command buffer pool */
452         if (lio_setup_sc_buffer_pool(lio_dev)) {
453                 lio_dev_err(lio_dev, "sc buffer pool allocation failed\n");
454                 return -1;
455         }
456
457         /* Initialize lists to manage the requests of different types that
458          * arrive from applications for this lio device.
459          */
460         lio_setup_response_list(lio_dev);
461
462         if (lio_dev->fn_list.setup_mbox(lio_dev)) {
463                 lio_dev_err(lio_dev, "Mailbox setup failed\n");
464                 goto error;
465         }
466
467         /* Check PF response */
468         lio_check_pf_hs_response((void *)lio_dev);
469
470         /* Do handshake and exit if incompatible PF driver */
471         if (cn23xx_pfvf_handshake(lio_dev))
472                 goto error;
473
474         /* Initial reset */
475         cn23xx_vf_ask_pf_to_do_flr(lio_dev);
476         /* Wait for FLR for 100ms per SRIOV specification */
477         rte_delay_ms(100);
478
479         if (cn23xx_vf_set_io_queues_off(lio_dev)) {
480                 lio_dev_err(lio_dev, "Setting io queues off failed\n");
481                 goto error;
482         }
483
484         if (lio_dev->fn_list.setup_device_regs(lio_dev)) {
485                 lio_dev_err(lio_dev, "Failed to configure device registers\n");
486                 goto error;
487         }
488
489         if (lio_setup_instr_queue0(lio_dev)) {
490                 lio_dev_err(lio_dev, "Failed to setup instruction queue 0\n");
491                 goto error;
492         }
493
494         dpdk_queues = (int)lio_dev->sriov_info.rings_per_vf;
495
496         lio_dev->max_tx_queues = dpdk_queues;
497         lio_dev->max_rx_queues = dpdk_queues;
498
499         /* Enable input and output queues for this device */
500         if (lio_dev->fn_list.enable_io_queues(lio_dev))
501                 goto error;
502
503         return 0;
504
505 error:
506         lio_free_sc_buffer_pool(lio_dev);
507         if (lio_dev->mbox[0])
508                 lio_dev->fn_list.free_mbox(lio_dev);
509         if (lio_dev->instr_queue[0])
510                 lio_free_instr_queue0(lio_dev);
511
512         return -1;
513 }
514
515 static int
516 lio_eth_dev_uninit(struct rte_eth_dev *eth_dev)
517 {
518         struct lio_device *lio_dev = LIO_DEV(eth_dev);
519
520         PMD_INIT_FUNC_TRACE();
521
522         if (rte_eal_process_type() != RTE_PROC_PRIMARY)
523                 return -EPERM;
524
525         /* lio_free_sc_buffer_pool */
526         lio_free_sc_buffer_pool(lio_dev);
527
528         rte_free(eth_dev->data->mac_addrs);
529         eth_dev->data->mac_addrs = NULL;
530
531         eth_dev->rx_pkt_burst = NULL;
532         eth_dev->tx_pkt_burst = NULL;
533
534         return 0;
535 }
536
537 static int
538 lio_eth_dev_init(struct rte_eth_dev *eth_dev)
539 {
540         struct rte_pci_device *pdev = RTE_DEV_TO_PCI(eth_dev->device);
541         struct lio_device *lio_dev = LIO_DEV(eth_dev);
542
543         PMD_INIT_FUNC_TRACE();
544
545         eth_dev->rx_pkt_burst = &lio_dev_recv_pkts;
546         eth_dev->tx_pkt_burst = &lio_dev_xmit_pkts;
547
548         /* Primary does the initialization. */
549         if (rte_eal_process_type() != RTE_PROC_PRIMARY)
550                 return 0;
551
552         rte_eth_copy_pci_info(eth_dev, pdev);
553         eth_dev->data->dev_flags |= RTE_ETH_DEV_DETACHABLE;
554
555         if (pdev->mem_resource[0].addr) {
556                 lio_dev->hw_addr = pdev->mem_resource[0].addr;
557         } else {
558                 PMD_INIT_LOG(ERR, "ERROR: Failed to map BAR0\n");
559                 return -ENODEV;
560         }
561
562         lio_dev->eth_dev = eth_dev;
563         /* set lio device print string */
564         snprintf(lio_dev->dev_string, sizeof(lio_dev->dev_string),
565                  "%s[%02x:%02x.%x]", pdev->driver->driver.name,
566                  pdev->addr.bus, pdev->addr.devid, pdev->addr.function);
567
568         lio_dev->port_id = eth_dev->data->port_id;
569
570         if (lio_first_time_init(lio_dev, pdev)) {
571                 lio_dev_err(lio_dev, "Device init failed\n");
572                 return -EINVAL;
573         }
574
575         eth_dev->dev_ops = &liovf_eth_dev_ops;
576         eth_dev->data->mac_addrs = rte_zmalloc("lio", ETHER_ADDR_LEN, 0);
577         if (eth_dev->data->mac_addrs == NULL) {
578                 lio_dev_err(lio_dev,
579                             "MAC addresses memory allocation failed\n");
580                 eth_dev->dev_ops = NULL;
581                 eth_dev->rx_pkt_burst = NULL;
582                 eth_dev->tx_pkt_burst = NULL;
583                 return -ENOMEM;
584         }
585
586         rte_atomic64_set(&lio_dev->status, LIO_DEV_RUNNING);
587         rte_wmb();
588
589         lio_dev->port_configured = 0;
590         /* Always allow unicast packets */
591         lio_dev->ifflags |= LIO_IFFLAG_UNICAST;
592
593         return 0;
594 }
595
596 /* Set of PCI devices this driver supports */
597 static const struct rte_pci_id pci_id_liovf_map[] = {
598         { RTE_PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, LIO_CN23XX_VF_VID) },
599         { .vendor_id = 0, /* sentinel */ }
600 };
601
602 static struct eth_driver rte_liovf_pmd = {
603         .pci_drv = {
604                 .id_table       = pci_id_liovf_map,
605                 .drv_flags      = RTE_PCI_DRV_NEED_MAPPING,
606                 .probe          = rte_eth_dev_pci_probe,
607                 .remove         = rte_eth_dev_pci_remove,
608         },
609         .eth_dev_init           = lio_eth_dev_init,
610         .eth_dev_uninit         = lio_eth_dev_uninit,
611         .dev_private_size       = sizeof(struct lio_device),
612 };
613
614 RTE_PMD_REGISTER_PCI(net_liovf, rte_liovf_pmd.pci_drv);
615 RTE_PMD_REGISTER_PCI_TABLE(net_liovf, pci_id_liovf_map);
616 RTE_PMD_REGISTER_KMOD_DEP(net_liovf, "* igb_uio | vfio");