Ubuntu 20.04.5安裝Solarflare網路卡Openonload驅動

Davis_itpub發表於2024-01-15

1.檢視OS版本

root@tes-htzq-sz-t30:~# cat /etc/lsb-release 

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=20.04

DISTRIB_CODENAME=focal

DISTRIB_DESCRIPTION="Ubuntu 20.04.5 LTS"

root@tes-htzq-sz-t30:~# 


2.下載並上傳並解壓openonload

官方找到對應所需要版本的OpenOnload DEB Release Package並下載並上傳/soft


cd /soft

unzip SF-122451-LS-7-OpenOnload-DEB-Release-Package.zip 

tar -xvzf onload_7.1.3.202-debiansource.tgz 

tar -xvzf  onload_7.1.3.202.orig.tar.gz


3.安裝openonload

cd /soft/onload-7.1.3.202/scripts

./onload_install 


報錯原因: 由於系統安裝是未安裝gcc、make軟體,推薦安裝:gcc、gdb、make、g++、及ntp、iftop、dos2unix、net-tools

onload_install: Building Onload.

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 152: gcc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 371: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 461: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 371: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 469: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 371: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 473: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 371: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 477: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmaketool: line 441: cc: command not found

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 481: [: : integer expression expected

/home/bigdata/onload-7.1.3.202/scripts/mmakebuildtree: line 98: gcc: command not found

mmake: Cannot find a make command.  Please define MMAKE_MAKE.

mmakebuildtree: mmake buildtree MMAKEBUILDTREE=1 FAILED

onload_build: FAILED: mmakebuildtree --driver -d x86_64_linux-5.4.0-135-generic

onload_install: ERROR: Build failed.  Not installing.

root@bigdata# 



4.離線安裝gcc、g++、make

若具備網際網路許可權訪問則直接使用 sudo apt-get update 後sudo apt-get install <Package_name> 安裝gcc、gdb、make等;

若不具備網際網路許可權則需要透過知筆記本虛擬機器上安裝對應系統,透過線上的方式下載對應對應的包後

複製上傳到系統中進行離線安裝即可


線上下載的安裝包則預設儲存路徑: /var/cache/apt/archives/  


cd gcc+gdb+ntp++iftop+dos2unix+net-tools+g++/

ls


g++.tar.gz

gcc.tar.gz

gdb.tar.gz

make_4.2.1-1.2_amd64


tar -xvzf gcc.tar.gz 

dpkg -i *.deb


tar -xvzf gdb.tar.gz 

dpkg -i *.deb


dpkg -i make_4.2.1-1.2_amd64



5.安裝Openonload驅動

cd /soft/onload-7.1.3.202/scripts

./onload_install 

onload_install: Building Onload.

mmake: Cannot find a make command.  Please define MMAKE_MAKE.

mmakebuildtree: mmake buildtree MMAKEBUILDTREE=1 FAILED

onload_build: FAILED: mmakebuildtree --driver -d x86_64_linux-5.4.0-135-generic

onload_install: ERROR: Build failed.  Not installing.

root@tes-htzq-sz-t30:/home/bigdata/onload-7.1.3.202/scripts# 

root@tes-htzq-sz-t30:/home/bigdata# dpkg -i make_4.2.1-1.2_amd64.deb 

……………………………………省略………………………………………………………………………………

root@tes-htzq-sz-t30:/home/bigdata# cd onload-7.1.3.202/

root@tes-htzq-sz-t30:/home/bigdata/onload-7.1.3.202/scripts# ./onload_install 

onload_install: Building Onload.

Build tree made for linux as x86_64_linux-5.4.0-135-generic

make: Entering directory '/home/bigdata/onload-7.1.3.202/build/x86_64_linux-5.4.0-135-generic'

# Build both autocompat.h files: linux_net and linux_affinity.

make -C driver/linux_net

make[1]: Entering directory '/home/bigdata/onload-7.1.3.202/build/x86_64_linux-5.4.0-135-generic/driver/linux_net'

make -C /usr/src/linux-headers-5.4.0-135-generic CC="cc" M=$(pwd)

make[2]: Entering directory '/usr/src/linux-headers-5.4.0-135-generic'

/home/bigdata/onload-7.1.3.202/src/driver/linux_net/Makefile:61: SFE4001/Falcon is no longer supported

  AR      /home/bigdata/onload-7.1.3.202/build/x86_64_linux-5.4.0-135-generic/driver/linux_net/built-in.a

…………………………………………………………………………省略……………………………………………………………………………………

onload_install: Install complete.


onload_install: WARNING: 32-bit libraries were not installed.  As a result it will not be possible to accelerate 32-bit applications with OpenOnload.  See build log for further details.



onload_install: WARNING: An 'sfc' driver is already loaded.  You should

onload_install: WARNING: unload and reload (or reboot) to ensure you are

onload_install: WARNING: using the version supplied with OpenOnload.


onload_install: WARNING: Try:   onload_tool reload


onload_install: WARNING: If this problem persists you may need to update

onload_install: WARNING: your initramfs to include the correct sfc module


 

6.載入onload_tool

onload_tool reload

onload_tool: /sbin/modprobe -r sfc

onload_tool: /sbin/modprobe onload


7.檢視onload版本

onload --version

onload: WARNING: EF_TCP_SYNRECV_MAX=16384 and EF_MAX_ENDPOINTS=8192 are inconsistent.

onload: EF_TCP_SYNRECV_MAX is set to 16384 based on /proc/sys/net/ipv4/tcp_max_syn_backlog value and assuming up to 4 listening sockets in the Onload stack

onload: Too few endpoints requested: ~4 syn-receive states consume one endpoint. 

Onload 7.1.3.202

Copyright 2019-2022 Xilinx, 2006-2019 Solarflare Communications, 2002-2005 Level 5 Networks

Built: Jan 12 2024 17:30:59 (release)

Build profile header: <ci/internal/transport_config_opt_extra.h>

Kernel module: 7.1.3.202


8.重啟OS

reboot


來自 “ ITPUB部落格 ” ,連結:https://blog.itpub.net/31520497/viewspace-3003877/,如需轉載,請註明出處,否則將追究法律責任。

相關文章