installing DPDK on Ubuntu 18.04 and intel XL710 - driver

I'm trying to make DPDK work on my machine without success; My machine is running Ubuntu 18.04 and the NIC I'm trying to bind is an Intel XL710. I'm completely new to DPDK and not an expert on linux.
Additional context: I need DPDK in order to get more bandwidth when using a USRP SDR (Software Defined Radio), that has this capability.
What I've done so far:
Added default_hugepagesz=1G hugepagesz=1G hugepages=8 to the grub config
Cloned and compiled DPDK 19, installed with make install. Result: Installation in /usr/local/ complete
get the status of the devices and drivers using ./dpdk-devbind.py -s. The relevant line I get from this command is: 0000:02:00.0 'Ethernet Controller XL710 for 40GbE QSFP+ 1583' if=enp2s0f0 drv=i40e unused=
When I try to bind the device (even if it is already binded? shouldn't I get a different driver/option for that?) using sudo ./dpdk-devbind.py -b i40e 0000:02:00.0 I get:
Warning: no supported DPDK kernel modules are loaded
Notice: 0000:02:00.0 already bound to driver i40e, skipping
What am I missing?
Thanks in advance for the help.

Before binding the i40e NIC to DPDK PMD driver, you need to load uio or vfio Linux driver as shown below:
modprobe uio
insmod ./x86_64-native-linux-gcc/kmod/igb_uio.ko
or
modprobe vfio-pci
Take a look at link to know why we should load kernel module before ports are bind to DPDK.

Related

How to install linux-modules-extra?

When I run sudo apt install linux-modules-extra-$(uname -r) in a Docker container based on a Ubuntu 20.04 on a single board computer running Ubuntu 18.04, I get the following errors:
E: Unable to locate package linux-modules-extra-4.15.0-143-generic
E: Couldn't find any package by glob 'linux-modules-extra-4.15.0-143-generic'
E: Couldn't find any package by regex 'linux-modules-extra-4.15.0-143-generic'
To me, this makes me wonder whether it is even possible to install linux-modules-extra-4.15.0-143-generic in Ubuntu 20.04? Maybe it is only compatible with Ubuntu 18.04?
Could anyone clarify this for me please?
In general, if you're building a kernel module, it has to match exactly the kernel that's running on the host system. If you're using a native Debian or Ubuntu system (without Docker), there's a system where kernel modules can be rebuilt or reinstalled when the host kernel is updated. See for example the Debian wiki KernelDKMS page.
In contrast, a Docker image is generally supposed to be portable across hosts. If you upgrade the host's kernel, or if you run a FROM ubuntu:18.04 image on an Ubuntu 20.04 host, the image isn't really supposed to be aware of this.
In your particular case, you can't get the kernel headers you need, because they're not part of the Ubuntu 18.04 distribution. For this particular case it might be possible to get the headers from the later version of Ubuntu, but it might not be possible in the general case; maybe because the system is actually running plain Debian or RHEL and the kernel build is different, maybe because the operator built their own kernel.
Since a Linux kernel module is so specific to the host it runs on, and since it can bypass any and all security concerns, it's not appropriate to try to install one in a container. Do it directly on the host instead.

Module alias ftdi_sio not found

I would like to install hardware environment in a docker container. One of the installation scripts uses modinfo utility to detect ftdi_sio module, but it can't find this particular part. There is also other error:
No FTDI driver present
I'm using centos7 image from the docker hub in this container. Is there any way this OS has not all necessary drivers and if so how to install necessary components in this image?
Appreciate for any help
You cannot install Linux kernel drivers from a Docker container, and generally one of the major design goals of Docker is to hide details of the underlying hardware from you.
If you’re trying to use tools like modinfo to inspect the system you’re actually running on and see if some specific kernel driver or piece of hardware is available, you need to run these directly on the host, not in Docker. If you’re trying to develop a hardware driver or interface, simulating it in a virtual machine (with its own kernel) is probably better than trying to work with it in Docker.
(In principle you can disable enough of Docker’s protections to do this, but it makes your container setup very tightly bound to your host setup and removes basically all of the isolation; you’re getting nothing but complexity from having Docker in the mix.)
One of the installation scripts uses modinfo utility to detect ftdi_sio module, but it can't find this particular part.
Actually, you can make this work, because modinfo does not require module to be running.
The reason modinfo can't find it is that podman/docker is using the kernel of the host. modinfo uses uname system call to get name of the current running kernel, which then is used as part of the path to find the module. Since kernel is the host one, the path may only accidentally be correct.
To make it work you gotta explicitly pass kernel name to modinfo call with -k. Example of how it works from my podman container:
$ uname -a
Linux 43d87d63879d 5.9.8-arch1-1 #1 SMP PREEMPT Tue, 10 Nov 2020 22:44:11 +0000 x86_64 x86_64 x86_64 GNU/Linux
$ modinfo zfs
modinfo: ERROR: Module alias zfs not found.
$ modinfo -k 4.15.0-123-generic zfs
filename: /lib/modules/4.15.0-123-generic/updates/dkms/zfs.ko
version: 0.7.5-1ubuntu16.10
license: CDDL
author: OpenZFS on Linux
description: ZFS
srcversion: EAC384B1885CDDD467439E9
[…]

Docker and VirtualBox on Fedora 27

I installed virtualbox 5.2 from their website. And I ran this command..
docker-machine create -d virtualbox dev
then I got this..
Running pre-create checks...
Error with pre-create check: "We support Virtualbox starting with version 5. Your VirtualBox install is
"WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (4.14.3-300.fc27.x86_64) or it failed to
load. Please recompile the kernel module and install it by
sudo /sbin/vboxconfig
You will not be able to start VMs until this problem is fixed.\\n5.2.2r119230\".
Please upgrade at https://www.virtualbox.org"
I did as it suggested..
sudo /sbin/vboxconfig
then..
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
kernel-devel kernel-devel-4.14.3-300.fc27.x86_64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
kernel-devel kernel-devel-4.14.3-300.fc27.x86_64
..and I don't understand anymore. Please help.
Install the kernel-devel package and it will continue. Btw, this is not a programming question, there are better forums for such questions...

Getting Docker to recognize nvidia graphics card on mac

When I am in my container, I run
lspci | grep -i nvidia
and nothing shows.
When I run ./deviceQuery from the samples NVIDIA provides I get
no CUDA-capable device is detected
I know I have a nvidia driver on my mac. I just can't figure out how to get my docker container to realize that.
On OS X, docker is a container running inside a separate virtualbox vm which does not expose the host GPU.
You'll first need to make the graphics card available in the Virtual Box VM. I'm not sure how to do that, but this looks like it might help:
https://www.virtualbox.org/manual/ch04.html#guestadd-video
Once you've got it mounted within the VM, then you can also share it with the container.
I haven't tried this myself, but this guy says that he can run native X11 Apps on a Mac using a beta docker client called Kinematic along with socat, XQuartz, and QGIS, and he seems to imply that NVidia driver issues were thus avoided. This looks worth a try!

How to make WiFi work for toshiba C850...?

I have a toshiba laptop c850, dual core. Toshiba does not provide any driver for Wi-Fi for Ubuntu 12.10. I am currently having problem in using DSL modem, Ethernet and Wi-Fi. Can anyone tell me the solution to this problem?
maybe you will find some information there :
http://www.linlap.com/toshiba_satellite_c850-c855
Wireless
A really up to date kernel is required for wireless support, at least
3.5.0 is recommended. Realtek has the Linux drivers available for download but they must be re-complied after upgrades to kernel.
As you commented, you got the Atheros Communications Inc. AR8162 Fast Ethernet Controller.
This is some guesswork here because there are several versions of the driver and some people state only one is working for them, I stick with the most popular for now.
First download this file from another machine:
https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/28/compat-drivers-2013-03-28-5-u.tar.bz2
If you have Ubuntu or another Linux distro on your second machine you can use wget to download the file:
wget https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/28/compat-drivers-2013-03-28-5-u.tar.bz2
Next, use your preferred method (preferably an USB Drive) to copy it to your target machine (Toshiba C850) and use the following commands in a terminal. Make sure you are in the right directory first and use cd to change to the directory where your downloaded file resides.
tar -xzvf compat-drivers-2013-03-28-5-u.tar.bz2
cd compat-drivers-2013-03-28-5-u
./scripts/driver-select alx
make
sudo make install
sudo modprobe alx
If this doesn't work try a reboot first then you can try one of the other versions, I can't tell which will work for you:
http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2012-02-28-p.tar.bz2
https://www.kernel.org/pub/linux/kernel/projects/backports/2013/03/04/compat-drivers-2013-03-04-u.tar.bz2
Sources (for further reading): This question on AskUbuntu and this thread in the Ubuntu forums.

Resources