美文网首页
DPDK驱动

DPDK驱动

作者: 明翼 | 来源:发表于2021-04-23 17:58 被阅读0次

一 VFIO

1 . VFIO是强大而安全的,基于IOMMU保护的驱动.
加载:

modprobe vfio-pci

To make use of full VFIO functionality, both kernel and BIOS must support and be configured to use IO virtualization (such as Intel® VT-d).
Linux versions earlier than version 3.6 do not support VFIO.
In most cases, specifying “iommu=on” as kernel parameter should be enough to configure the Linux kernel to use IOMMU.

参考:http://doc.dpdk.org/guides/linux_gsg/linux_drivers.html

  1. VFIO-no-IOMMU
modprobe vfio enable_unsafe_noiommu_mode=1

或在内核中启动这个选项:

echo 1 > /sys/module/vfio/parameters/enable_unsafe_noiommu_mode

二 UIO

sudo modprobe uio_pci_generic

dpdk里面也有:

sudo modprobe uio
sudo insmod igb_uio.ko

If UEFI secure boot is enabled, the Linux kernel may disallow the use of UIO on the system. Therefore, devices for use by DPDK should be bound to the vfio-pci kernel module rather than any UIO-based module. For more details see Binding and Unbinding Network Ports to/from the Kernel Modules below.

If the devices used for DPDK are bound to the uio_pci_generic kernel module, please make sure that the IOMMU is disabled or is in passthrough mode. One can add intel_iommu=off or amd_iommu=off or intel_iommu=on iommu=pt in GRUB command line on x86_64 systems, or add iommu.passthrough=1 on aarch64 systems.

Using UIO drivers is inherently unsafe due to this method lacking IOMMU protection, and can only be done by root user.

./usertools/dpdk-devbind.py --bind=uio_pci_generic 04:00.1
或
./usertools/dpdk-devbind.py --bind=uio_pci_generic eth1

没开启IOMMU 不支持vfio

cat /boot/config-$(uname -r) | grep NOIOMMU
# CONFIG_VFIO_NOIOMMU is not set

相关文章

  • DPDK驱动

    一 VFIO 1 . VFIO是强大而安全的,基于IOMMU保护的驱动.加载: To make use of fu...

  • SPDK (part 1, tutorial)

    需要提前了解的概念 Linux内核驱动: UIO: DPDK的官方文档http://doc.dpdk.org/gu...

  • PF_RING和DPDK接收报文如何添加时间戳

    0.DPDK 在DPDK里面在各种网卡驱动程序里面找到了一些关于添加时间戳的函数,不同的网卡驱动程序都调用了rte...

  • centos7 安装DPDK

    1.DPDK下载 下载dpdk18.05: wget http://fast.dpdk.org/rel/dpdk...

  • DPDK编程指南(翻译)(七)

    7.轮询模式驱动 DPDK包括1Gigabit、10Gigabit 及 40Gigabit 和半虚拟化IO的轮询模...

  • DPDK+OVS+QEMU搭建vhost-user实验环境

    目前在virtio后端驱动方面性能最好的是用户态的vhost-user,而DPDK又是用户态vhost实现里使用最...

  • dpdk的安装

    下载稳定的dpdk库wget https://fast.dpdk.org/rel/dpdk-17.11.4.tar...

  • DPDK igb_uio驱动分析

    本文整理下之前的学习笔记,基于DPDK17.11版本源码分析。主要分析一下igb_uio驱动源码。 总线-设备-驱...

  • DPDK多线程初步解析

    上一篇文章中谈到DPDK是一个高性能的用户态驱动,改变了网卡驱动原先的中断为轮询的模式,那么它的性能到底有多强,用...

  • DPDK简单使用

    一、快速使用 官网下载DPDK。 解压: tar –xf dpdk.tar cd dpdk 配置: make co...

网友评论

      本文标题:DPDK驱动

      本文链接:https://www.haomeiwen.com/subject/vexhrltx.html