Linux系统入门学习:在Ubuntu或者Debian中编译安装ixgbe驱动
提问: 我想为我的Intel 10G网卡下载安装最新的ixgbe驱动。我该如何在Ubuntu(或者Debian)中安装ixgbe驱动?
Intel的10G网卡(比如,82598、 82599、 x540)由ixgbe驱动支持。现代的Linux发行版已经带有了ixgbe驱动,通过可加载模块的方式使用。然而,有些情况你希望在你机器上的自己编译安装ixgbe驱动,比如,你想要体验ixbge驱动的最新特性时。同样,内核默认自带的ixgbe驱动中的一个问题是不允许你自定义驱动的参数。如果你想要一个完全定制的ixgbe驱动(比如 RSS、多队列、中断阈值等等),你需要手动从源码编译ixgbe驱动。
这里是如何在Ubuntu、Debian或者它们的衍生版中下载安装ixgbe驱动的教程。
第一步: 安装前提
安装之前,需要安装匹配的内核头文件和开发工具包。
<span class="pln">$ sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> install linux</span><span class="pun">-</span><span class="pln">headers</span><span class="pun">-</span><span class="pln">$</span><span class="pun">(</span><span class="pln">uname </span><span class="pun">-</span><span class="pln">r</span><span class="pun">)</span>
<span class="pln">$ sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> install gcc make</span>
第二步: 编译Ixgbe驱动
从最新的ixgbe驱动中下载源码。
<span class="pln">$ wget http</span><span class="pun">:</span><span class="com">//sourceforge.net/projects/e1000/files/ixgbe%20stable/3.23.2/ixgbe-3.23.2.tar.gz</span>
如下编译ixgbe驱动。
<span class="pln">$ tar xvfvz ixgbe</span><span class="pun">-</span><span class="lit">3.23</span><span class="pun">.</span><span class="lit">2.tar</span><span class="pun">.</span><span class="pln">gz</span>
<span class="pln">$ cd ixgbe</span><span class="pun">-</span><span class="lit">3.23</span><span class="pun">.</span><span class="lit">2</span><span class="pun">/</span><span class="pln">src</span>
<span class="pln">$ make</span>
第三步: 检查Ixgbe驱动
编译之后,你会看到在ixgbe-3.23.2/src目录下创建了ixgbe.ko。这就是会加载到内核之中的ixgbe驱动。
用modinfo命令检查内核模块的信息。注意你需要指定模块文件的绝对路径(比如 ./ixgbe.ko 或者 /home/xmodulo/ixgbe/ixgbe-3.23.2/src/ixgbe.ko)。输出中会显示ixgbe内核的版本。
<span class="pln">$ modinfo </span><span class="pun">./</span><span class="pln">ixgbe</span><span class="pun">.</span><span class="pln">ko</span>
<span class="pln">filename</span><span class="pun">:</span><span class="str">/home/</span><span class="pln">xmodulo</span><span class="pun">/</span><span class="pln">ixgbe</span><span class="pun">/</span><span class="pln">ixgbe</span><span class="pun">-</span><span class="lit">3.23</span><span class="pun">.</span><span class="lit">2</span><span class="pun">/</span><span class="pln">src</span><span class="pun">/</span><span class="pln">ixgbe</span><span class="pun">.</span><span class="pln">ko</span>
<span class="pln">version</span><span class="pun">:</span><span class="lit">3.23</span><span class="pun">.</span><span class="lit">2</span>
<span class="pln">license</span><span class="pun">:</span><span class="pln"> GPL</span>
<span class="pln">description</span><span class="pun">:</span><span class="typ">Intel</span><span class="pun">(</span><span class="pln">R</span><span class="pun">)</span><span class="lit">10</span><span class="typ">Gigabit</span><span class="pln"> PCI </span><span class="typ">Express</span><span class="typ">Network</span><span class="typ">Driver</span>
<span class="pln">author</span><span class="pun">:</span><span class="typ">Intel</span><span class="typ">Corporation</span><span class="pun">,</span>
<span class="pln">srcversion</span><span class="pun">:</span><span class="lit">2ADA5E537923E983FA9DAE2</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001560sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001558sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d0000154Asv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001557sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d0000154Fsv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d0000154Dsv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001528sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010F8sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d0000151Csv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001529sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d0000152Asv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010F9sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001514sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001507sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010FBsv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001517sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010FCsv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010F7sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d00001508sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010DBsv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010F4sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010E1sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010F1sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010ECsv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010DDsv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d0000150Bsv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010C8sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010C7sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010C6sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="kwd">alias</span><span class="pun">:</span><span class="pln"> pci</span><span class="pun">:</span><span class="pln">v00008086d000010B6sv</span><span class="pun">*</span><span class="pln">sd</span><span class="pun">*</span><span class="pln">bc</span><span class="pun">*</span><span class="pln">sc</span><span class="pun">*</span><span class="pln">i</span><span class="pun">*</span>
<span class="pln">depends</span><span class="pun">:</span><span class="pln"> ptp</span><span class="pun">,</span><span class="pln">dca</span>
<span class="pln">vermagic</span><span class="pun">:</span><span class="lit">3.11</span><span class="pun">.</span><span class="lit">0</span><span class="pun">-</span><span class="lit">19</span><span class="pun">-</span><span class="kwd">generic</span><span class="pln"> SMP mod_unload modversions </span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">InterruptType</span><span class="pun">:</span><span class="typ">Change</span><span class="typ">Interrupt</span><span class="typ">Mode</span><span class="pun">(</span><span class="lit">0</span><span class="pun">=</span><span class="typ">Legacy</span><span class="pun">,</span><span class="lit">1</span><span class="pun">=</span><span class="pln">MSI</span><span class="pun">,</span><span class="lit">2</span><span class="pun">=</span><span class="pln">MSI</span><span class="pun">-</span><span class="pln">X</span><span class="pun">),</span><span class="kwd">default</span><span class="typ">IntMode</span><span class="pun">(</span><span class="pln">deprecated</span><span class="pun">)</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">IntMode</span><span class="pun">:</span><span class="typ">Change</span><span class="typ">Interrupt</span><span class="typ">Mode</span><span class="pun">(</span><span class="lit">0</span><span class="pun">=</span><span class="typ">Legacy</span><span class="pun">,</span><span class="lit">1</span><span class="pun">=</span><span class="pln">MSI</span><span class="pun">,</span><span class="lit">2</span><span class="pun">=</span><span class="pln">MSI</span><span class="pun">-</span><span class="pln">X</span><span class="pun">),</span><span class="kwd">default</span><span class="lit">2</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> MQ</span><span class="pun">:</span><span class="typ">Disable</span><span class="kwd">or</span><span class="pln"> enable </span><span class="typ">Multiple</span><span class="typ">Queues</span><span class="pun">,</span><span class="kwd">default</span><span class="lit">1</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> DCA</span><span class="pun">:</span><span class="typ">Disable</span><span class="kwd">or</span><span class="pln"> enable </span><span class="typ">Direct</span><span class="typ">Cache</span><span class="typ">Access</span><span class="pun">,</span><span class="lit">0</span><span class="pun">=</span><span class="pln">disabled</span><span class="pun">,</span><span class="lit">1</span><span class="pun">=</span><span class="pln">descriptor only</span><span class="pun">,</span><span class="lit">2</span><span class="pun">=</span><span class="pln">descriptor </span><span class="kwd">and</span><span class="pln"> data </span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> RSS</span><span class="pun">:</span><span class="typ">Number</span><span class="pln"> of </span><span class="typ">Receive</span><span class="pun">-</span><span class="typ">Side</span><span class="typ">Scaling</span><span class="typ">Descriptor</span><span class="typ">Queues</span><span class="pun">,</span><span class="kwd">default</span><span class="lit">0</span><span class="pun">=</span><span class="pln">number of cpus </span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> VMDQ</span><span class="pun">:</span><span class="typ">Number</span><span class="pln"> of </span><span class="typ">Virtual</span><span class="typ">Machine</span><span class="typ">Device</span><span class="typ">Queues</span><span class="pun">:</span><span class="lit">0</span><span class="pun">/</span><span class="lit">1</span><span class="pun">=</span><span class="pln"> disable</span><span class="pun">,</span><span class="lit">2</span><span class="pun">-</span><span class="lit">16</span><span class="pln"> enable </span><span class="pun">(</span><span class="kwd">default</span><span class="pun">=</span><span class="lit">8</span><span class="pun">)</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> max_vfs</span><span class="pun">:</span><span class="typ">Number</span><span class="pln"> of </span><span class="typ">Virtual</span><span class="typ">Functions</span><span class="pun">:</span><span class="lit">0</span><span class="pun">=</span><span class="pln"> disable </span><span class="pun">(</span><span class="kwd">default</span><span class="pun">),</span><span class="lit">1</span><span class="pun">-</span><span class="lit">63</span><span class="pun">=</span><span class="pln"> enable </span><span class="kwd">this</span><span class="pln"> many </span><span class="typ">VFs</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> VEPA</span><span class="pun">:</span><span class="pln">VEPA </span><span class="typ">Bridge</span><span class="typ">Mode</span><span class="pun">:</span><span class="lit">0</span><span class="pun">=</span><span class="pln"> VEB </span><span class="pun">(</span><span class="kwd">default</span><span class="pun">),</span><span class="lit">1</span><span class="pun">=</span><span class="pln"> VEPA </span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">InterruptThrottleRate</span><span class="pun">:</span><span class="typ">Maximum</span><span class="pln"> interrupts per second</span><span class="pun">,</span><span class="pln"> per vector</span><span class="pun">,</span><span class="pun">(</span><span class="lit">0</span><span class="pun">,</span><span class="lit">1</span><span class="pun">,</span><span class="lit">956</span><span class="pun">-</span><span class="lit">488281</span><span class="pun">),</span><span class="kwd">default</span><span class="lit">1</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">LLIPort</span><span class="pun">:</span><span class="typ">Low</span><span class="typ">Latency</span><span class="typ">Interrupt</span><span class="pln"> TCP </span><span class="typ">Port</span><span class="pun">(</span><span class="lit">0</span><span class="pun">-</span><span class="lit">65535</span><span class="pun">)</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">LLIPush</span><span class="pun">:</span><span class="typ">Low</span><span class="typ">Latency</span><span class="typ">Interrupt</span><span class="pln"> on TCP </span><span class="typ">Push</span><span class="pln"> flag </span><span class="pun">(</span><span class="lit">0</span><span class="pun">,</span><span class="lit">1</span><span class="pun">)</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">LLISize</span><span class="pun">:</span><span class="typ">Low</span><span class="typ">Latency</span><span class="typ">Interrupt</span><span class="pln"> on </span><span class="typ">Packet</span><span class="typ">Size</span><span class="pun">(</span><span class="lit">0</span><span class="pun">-</span><span class="lit">1500</span><span class="pun">)</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">LLIEType</span><span class="pun">:</span><span class="typ">Low</span><span class="typ">Latency</span><span class="typ">Interrupt</span><span class="typ">Ethernet</span><span class="typ">Protocol</span><span class="typ">Type</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> LLIVLANP</span><span class="pun">:</span><span class="typ">Low</span><span class="typ">Latency</span><span class="typ">Interrupt</span><span class="pln"> on VLAN priority threshold </span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">FdirPballoc</span><span class="pun">:</span><span class="typ">Flow</span><span class="typ">Director</span><span class="pln"> packet buffer allocation level</span><span class="pun">:</span>
<span class="lit">1</span><span class="pun">=</span><span class="lit">8k</span><span class="pln"> hash filters </span><span class="kwd">or</span><span class="lit">2k</span><span class="pln"> perfect filters</span>
<span class="lit">2</span><span class="pun">=</span><span class="lit">16k</span><span class="pln"> hash filters </span><span class="kwd">or</span><span class="lit">4k</span><span class="pln"> perfect filters</span>
<span class="lit">3</span><span class="pun">=</span><span class="lit">32k</span><span class="pln"> hash filters </span><span class="kwd">or</span><span class="lit">8k</span><span class="pln"> perfect filters </span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">AtrSampleRate</span><span class="pun">:</span><span class="typ">Software</span><span class="pln"> ATR </span><span class="typ">Tx</span><span class="pln"> packet sample rate </span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="typ">FCoE</span><span class="pun">:</span><span class="typ">Disable</span><span class="kwd">or</span><span class="pln"> enable </span><span class="typ">FCoE</span><span class="typ">Offload</span><span class="pun">,</span><span class="kwd">default</span><span class="lit">1</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> LRO</span><span class="pun">:</span><span class="typ">Large</span><span class="typ">Receive</span><span class="typ">Offload</span><span class="pun">(</span><span class="lit">0</span><span class="pun">,</span><span class="lit">1</span><span class="pun">),</span><span class="kwd">default</span><span class="lit">1</span><span class="pun">=</span><span class="pln"> on </span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
<span class="pln">parm</span><span class="pun">:</span><span class="pln"> allow_unsupported_sfp</span><span class="pun">:</span><span class="typ">Allow</span><span class="pln"> unsupported </span><span class="kwd">and</span><span class="pln"> untested SFP</span><span class="pun">+</span><span class="pln"> modules on </span><span class="lit">82599</span><span class="pln"> based adapters</span><span class="pun">,</span><span class="kwd">default</span><span class="lit">0</span><span class="pun">=</span><span class="typ">Disable</span><span class="pun">(</span><span class="pln">array of </span><span class="kwd">int</span><span class="pun">)</span>
第四步: 测试Ixgbe驱动
在测试新的模块之前,如果你内核中已存在旧版本ixgbe模块的话你需要先移除它。
<span class="pln">$ sudo rmmod ixgbe</span>
接着使用insmod命令插入新编译的ixgbe模块。确保指定一个模块的绝对路径。
<span class="pln">$ sudo insmod </span><span class="pun">./</span><span class="pln">ixgbe</span><span class="pun">.</span><span class="pln">ko</span>
如果上面的命令成功运行,就不会显示任何的信息。
如果你需要,你可以尝试加入额外的参数。比如,设置RSS的队列数量为16:
<span class="pln">$ sudo insmod </span><span class="pun">./</span><span class="pln">ixgbe</span><span class="pun">.</span><span class="pln">ko RSS</span><span class="pun">=</span><span class="lit">16</span>
检查/var/log/kern.log来查看ixgbe驱动是否成功激活。查看日志中的“Intel(R) 10 Gigabit PCI Express Network Driver”。ixgbe的版本信息应该和之前的modinfo的显示应该相同。
<span class="typ">Sep</span><span class="lit">18</span><span class="lit">14</span><span class="pun">:</span><span class="lit">48</span><span class="pun">:</span><span class="lit">52</span><span class="pln"> spongebob kernel</span><span class="pun">:</span><span class="pun">[</span><span class="lit">684717.906254</span><span class="pun">]</span><span class="typ">Intel</span><span class="pun">(</span><span class="pln">R</span><span class="pun">)</span><span class="lit">10</span><span class="typ">Gigabit</span><span class="pln"> PCI </span><span class="typ">Express</span><span class="typ">Network</span><span class="typ">Driver</span><span class="pun">-</span><span class="pln"> version </span><span class="lit">3.22</span><span class="pun">.</span><span class="lit">3</span>
第五步: 安装Ixgbe驱动
一旦你验证新的ixgbe驱动可以成功加载,最后一步是在你的系统中安装驱动。
<span class="pln">$ sudo make install</span>
ixgbe.ko 会安装在/lib/modules//kernel/drivers/net/ethernet/intel/ixgbe 下。
从这一步起,你可以用下面的modprobe命令加载ixgbe驱动了。注意你不必再指定绝对路径。
<span class="pln">$ sudo modprobe ixgbe</span>
如果你希望在启动时加载ixgbe驱动,你可以在/etc/modules的最后加入“ixgbe”。