侯体宗的博客
  • 首页
  • Hyperf版
  • beego仿版
  • 人生(杂谈)
  • 技术
  • 关于我
  • 更多分类
    • 文件下载
    • 文字修仙
    • 中国象棋ai
    • 群聊
    • 九宫格抽奖
    • 拼图
    • 消消乐
    • 相册

在Debian系的Linux中编译并安装ixgbe驱动的教程

linux  /  管理员 发布于 7年前   200

Intel的10G网卡(比如,82598、 82599、 x540)由ixgbe驱动支持。现代的Linux发行版已经带有了ixgbe驱动,通过可加载模块的方式使用。然而,有些情况你希望在你机器上的自己编译安装ixgbe驱动,比如,你想要体验ixbge驱动的最新特性时。同样,内核默认自带的ixgbe驱动中的一个问题是不允许你自定义驱动的参数。如果你想要一个完全定制的ixgbe驱动(比如 RSS、多队列、中断阈值等等),你需要手动从源码编译ixgbe驱动。

这里是如何在Ubuntu、Debian或者它们的衍生版中下载安装ixgbe驱动的教程。
第一步: 安装前提

安装之前,需要安装匹配的内核头文件和开发工具包。

  $ sudo apt-get install linux-headers-$(uname -r)  $ sudo apt-get install gcc make

第二步: 编译Ixgbe驱动

从最新的ixgbe驱动中下载源码。

  $ wget http://sourceforge.net/projects/e1000/files/ixgbe%20stable/3.23.2/ixgbe-3.23.2.tar.gz

如下编译ixgbe驱动。

  $ tar xvfvz ixgbe-3.23.2.tar.gz  $ cd ixgbe-3.23.2/src  $ make

第三步: 检查Ixgbe驱动

编译之后,你会看到在ixgbe-3.23.2/src目录下创建了ixgbe.ko。这就是会加载到内核之中的ixgbe驱动。

用modinfo命令检查内核模块的信息。注意你需要指定模块文件的绝对路径(比如 ./ixgbe.ko 或者 /home/xmodulo/ixgbe/ixgbe-3.23.2/src/ixgbe.ko)。输出中会显示ixgbe内核的版本。

  $ modinfo ./ixgbe.ko
filename: /home/xmodulo/ixgbe/ixgbe-3.23.2/src/ixgbe.ko  version: 3.23.2  license: GPL  description: Intel(R) 10 Gigabit PCI Express Network Driver  author: Intel Corporation,  srcversion: 2ADA5E537923E983FA9DAE2  alias: pci:v00008086d00001560sv*sd*bc*sc*i*  alias: pci:v00008086d00001558sv*sd*bc*sc*i*  alias: pci:v00008086d0000154Asv*sd*bc*sc*i*  alias: pci:v00008086d00001557sv*sd*bc*sc*i*  alias: pci:v00008086d0000154Fsv*sd*bc*sc*i*  alias: pci:v00008086d0000154Dsv*sd*bc*sc*i*  alias: pci:v00008086d00001528sv*sd*bc*sc*i*  alias: pci:v00008086d000010F8sv*sd*bc*sc*i*  alias: pci:v00008086d0000151Csv*sd*bc*sc*i*  alias: pci:v00008086d00001529sv*sd*bc*sc*i*  alias: pci:v00008086d0000152Asv*sd*bc*sc*i*  alias: pci:v00008086d000010F9sv*sd*bc*sc*i*  alias: pci:v00008086d00001514sv*sd*bc*sc*i*  alias: pci:v00008086d00001507sv*sd*bc*sc*i*  alias: pci:v00008086d000010FBsv*sd*bc*sc*i*  alias: pci:v00008086d00001517sv*sd*bc*sc*i*  alias: pci:v00008086d000010FCsv*sd*bc*sc*i*  alias: pci:v00008086d000010F7sv*sd*bc*sc*i*  alias: pci:v00008086d00001508sv*sd*bc*sc*i*  alias: pci:v00008086d000010DBsv*sd*bc*sc*i*  alias: pci:v00008086d000010F4sv*sd*bc*sc*i*  alias: pci:v00008086d000010E1sv*sd*bc*sc*i*  alias: pci:v00008086d000010F1sv*sd*bc*sc*i*  alias: pci:v00008086d000010ECsv*sd*bc*sc*i*  alias: pci:v00008086d000010DDsv*sd*bc*sc*i*  alias: pci:v00008086d0000150Bsv*sd*bc*sc*i*  alias: pci:v00008086d000010C8sv*sd*bc*sc*i*  alias: pci:v00008086d000010C7sv*sd*bc*sc*i*  alias: pci:v00008086d000010C6sv*sd*bc*sc*i*  alias: pci:v00008086d000010B6sv*sd*bc*sc*i*  depends: ptp,dca  vermagic: 3.11.0-19-generic SMP mod_unload modversions  parm: InterruptType:Change Interrupt Mode (0=Legacy, 1=MSI, 2=MSI-X), default IntMode (deprecated) (array of int)  parm: IntMode:Change Interrupt Mode (0=Legacy, 1=MSI, 2=MSI-X), default 2 (array of int)  parm: MQ:Disable or enable Multiple Queues, default 1 (array of int)  parm: DCA:Disable or enable Direct Cache Access, 0=disabled, 1=descriptor only, 2=descriptor and data (array of int)  parm: RSS:Number of Receive-Side Scaling Descriptor Queues, default 0=number of cpus (array of int)  parm: VMDQ:Number of Virtual Machine Device Queues: 0/1 = disable, 2-16 enable (default=8) (array of int)  parm: max_vfs:Number of Virtual Functions: 0 = disable (default), 1-63 = enable this many VFs (array of int)  parm: VEPA:VEPA Bridge Mode: 0 = VEB (default), 1 = VEPA (array of int)  parm: InterruptThrottleRate:Maximum interrupts per second, per vector, (0,1,956-488281), default 1 (array of int)  parm: LLIPort:Low Latency Interrupt TCP Port (0-65535) (array of int)  parm: LLIPush:Low Latency Interrupt on TCP Push flag (0,1) (array of int)  parm: LLISize:Low Latency Interrupt on Packet Size (0-1500) (array of int)  parm: LLIEType:Low Latency Interrupt Ethernet Protocol Type (array of int)  parm: LLIVLANP:Low Latency Interrupt on VLAN priority threshold (array of int)  parm: FdirPballoc:Flow Director packet buffer allocation level:  1 = 8k hash filters or 2k perfect filters  2 = 16k hash filters or 4k perfect filters  3 = 32k hash filters or 8k perfect filters (array of int)  parm: AtrSampleRate:Software ATR Tx packet sample rate (array of int)  parm: FCoE:Disable or enable FCoE Offload, default 1 (array of int)  parm: LRO:Large Receive Offload (0,1), default 1 = on (array of int)  parm: allow_unsupported_sfp:Allow unsupported and untested SFP+ modules on 82599 based adapters, default 0 = Disable (array of int)

第四步: 测试Ixgbe驱动

在测试新的模块之前,如果你内核中已存在旧版本ixgbe模块的话你需要先移除它。

  $ sudo rmmod ixgbe

接着使用insmod命令插入新编译的ixgbe模块。确保指定一个模块的绝对路径。

  $ sudo insmod ./ixgbe.ko

如果上面的命令成功运行,就不会显示任何的信息。

如果你需要,你可以尝试加入额外的参数。比如,设置RSS的队列数量为16:

  $ sudo insmod ./ixgbe.ko RSS=16

检查/var/log/kern.log来查看ixgbe驱动是否成功激活。查看日志中的“Intel(R) 10 Gigabit PCI Express Network Driver”。ixgbe的版本信息应该和之前的modinfo的显示应该相同。

    Sep 18 14:48:52 spongebob kernel: [684717.906254] Intel(R) 10 Gigabit PCI Express Network Driver - version 3.22.3

第五步: 安装Ixgbe驱动

一旦你验证新的ixgbe驱动可以成功加载,最后一步是在你的系统中安装驱动。

  $ sudo make install

ixgbe.ko 会安装在/lib/modules//kernel/drivers/net/ethernet/intel/ixgbe 下。

从这一步起,你可以用下面的modprobe命令加载ixgbe驱动了。注意你不必再指定绝对路径。

  $ sudo modprobe ixgbe

如果你希望在启动时加载ixgbe驱动,你可以在/etc/modules的最后加入“ixgbe”。


  • 上一条:
    在Linux系统安装Mysql教程
    下一条:
    在Debian系的Linux中检查软件包是否被安装的方法
  • 昵称:

    邮箱:

    0条评论 (评论内容有缓存机制,请悉知!)
    最新最热
    • 分类目录
    • 人生(杂谈)
    • 技术
    • linux
    • Java
    • php
    • 框架(架构)
    • 前端
    • ThinkPHP
    • 数据库
    • 微信(小程序)
    • Laravel
    • Redis
    • Docker
    • Go
    • swoole
    • Windows
    • Python
    • 苹果(mac/ios)
    • 相关文章
    • 在Linux系统中使用Iptables实现流量转发功能流程步骤(0个评论)
    • vim学习笔记-入门级需要了解的一些快捷键(0个评论)
    • 在centos7系统中实现分区并格式化挂载一块硬盘到/data目录流程步骤(0个评论)
    • 在Linux系统种查看某一个进程所占用的内存命令(0个评论)
    • Linux中grep命令中的10种高级用法浅析(0个评论)
    • 近期文章
    • 智能合约Solidity学习CryptoZombie第三课:组建僵尸军队(高级Solidity理论)(0个评论)
    • 智能合约Solidity学习CryptoZombie第二课:让你的僵尸猎食(0个评论)
    • 智能合约Solidity学习CryptoZombie第一课:生成一只你的僵尸(0个评论)
    • 在go中实现一个常用的先进先出的缓存淘汰算法示例代码(0个评论)
    • 在go+gin中使用"github.com/skip2/go-qrcode"实现url转二维码功能(0个评论)
    • 在go语言中使用api.geonames.org接口实现根据国际邮政编码获取地址信息功能(1个评论)
    • 在go语言中使用github.com/signintech/gopdf实现生成pdf分页文件功能(0个评论)
    • gmail发邮件报错:534 5.7.9 Application-specific password required...解决方案(0个评论)
    • 欧盟关于强迫劳动的规定的官方举报渠道及官方举报网站(0个评论)
    • 在go语言中使用github.com/signintech/gopdf实现生成pdf文件功能(0个评论)
    • 近期评论
    • 122 在

      学历:一种延缓就业设计,生活需求下的权衡之选中评论 工作几年后,报名考研了,到现在还没认真学习备考,迷茫中。作为一名北漂互联网打工人..
    • 123 在

      Clash for Windows作者删库跑路了,github已404中评论 按理说只要你在国内,所有的流量进出都在监控范围内,不管你怎么隐藏也没用,想搞你分..
    • 原梓番博客 在

      在Laravel框架中使用模型Model分表最简单的方法中评论 好久好久都没看友情链接申请了,今天刚看,已经添加。..
    • 博主 在

      佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 @1111老铁这个不行了,可以看看近期评论的其他文章..
    • 1111 在

      佛跳墙vpn软件不会用?上不了网?佛跳墙vpn常见问题以及解决办法中评论 网站不能打开,博主百忙中能否发个APP下载链接,佛跳墙或极光..
    • 2016-11
    • 2017-07
    • 2017-10
    • 2017-11
    • 2018-01
    • 2018-02
    • 2020-03
    • 2020-04
    • 2020-05
    • 2020-06
    • 2021-02
    • 2021-03
    • 2021-04
    • 2021-06
    • 2021-07
    • 2021-08
    • 2021-09
    • 2021-10
    • 2021-11
    • 2021-12
    • 2022-01
    • 2022-03
    • 2022-04
    • 2022-08
    • 2022-11
    • 2022-12
    • 2023-01
    • 2023-02
    • 2023-03
    • 2023-06
    • 2023-07
    • 2023-10
    • 2023-12
    • 2024-01
    • 2024-04
    Top

    Copyright·© 2019 侯体宗版权所有· 粤ICP备20027696号 PHP交流群

    侯体宗的博客