• Getting Started
    • Connecting Your Camera
    • 3rd Party Software Getting Started Guides
  • Tech Ref Manuals
    • Arena SDK Documentation
    • HLT003S – Helios2 ToF 3D
    • HLS003S – Helios ToF 3D
    • HLF003S – Helios Flex ToF 3D
    • ATX245S – Atlas10 24.5 MP
    • ATX204S – Atlas10 20.4 MP
    • ATX162S – Atlas10 16.2 MP
    • ATL314S – Atlas 31.4 MP
    • ATL196S – Atlas 19.6 MP
    • ATL168S – Atlas 16.8 MP
    • ATL120S – Atlas 12.3 MP
    • ATL089S – Atlas 8.9 MP
    • ATL071S – Atlas 7.1 MP
    • ATL050S – Atlas 5.0 MP
    • ATL028S – Atlas 2.8 MP
    • TRI200S – Triton 20.0 MP
    • TRI120S – Triton 12.3 MP
    • TRI122S – Triton 12.2 MP
    • TRI089S – Triton 8.9 MP
    • TRI071S – Triton 7.1 MP
    • TRI064S – Triton 6.3 MP
    • TRI054S – Triton 5.4 MP
    • TRI050S-P/Q – Triton 5.0 MP Polarized
    • TRI050S – Triton 5.0 MP
    • TRI032S – Triton 3.2 MP
    • TRI028S – Triton 2.8 MP
    • TRI023S – Triton 2.3 MP
    • TRI016S – Triton 1.6 MP
    • TRI004S – Triton 0.4 MP
    • TRI02KA – Triton 2K Line Scan
    • PHX200S – Phoenix 20.0 MP
    • PHX120S – Phoenix 12.3 MP
    • PHX122S – Phoenix 12.2 MP
    • PHX089S – Phoenix 8.9 MP
    • PHX064S – Phoenix 6.3 MP
    • PHX050S-P/Q – Phoenix 5.0 MP Polarized
    • PHX050S – Phoenix 5.0 MP
    • PHX032S – Phoenix 3.2 MP
    • PHX023S – Phoenix 2.3 MP
    • PHX016S – Phoenix 1.6 MP
    • PHX004S – Phoenix 0.4 MP
  • Application Notes
    • Helios 3D Point Cloud with RGB Color
    • Using GPIO on LUCID Cameras
    • I2C Support on LUCID Cameras
    • Using PTP & Scheduled Action Commands
  • Knowledge Base
  • Contact Support
  • Log In
  • Getting Started
    • Connecting Your Camera
    • 3rd Party Software Getting Started Guides
  • Tech Ref Manuals
    • Arena SDK Documentation
    • HLT003S – Helios2 ToF 3D
    • HLS003S – Helios ToF 3D
    • HLF003S – Helios Flex ToF 3D
    • ATX245S – Atlas10 24.5 MP
    • ATX204S – Atlas10 20.4 MP
    • ATX162S – Atlas10 16.2 MP
    • ATL314S – Atlas 31.4 MP
    • ATL196S – Atlas 19.6 MP
    • ATL168S – Atlas 16.8 MP
    • ATL120S – Atlas 12.3 MP
    • ATL089S – Atlas 8.9 MP
    • ATL071S – Atlas 7.1 MP
    • ATL050S – Atlas 5.0 MP
    • ATL028S – Atlas 2.8 MP
    • TRI200S – Triton 20.0 MP
    • TRI120S – Triton 12.3 MP
    • TRI122S – Triton 12.2 MP
    • TRI089S – Triton 8.9 MP
    • TRI071S – Triton 7.1 MP
    • TRI064S – Triton 6.3 MP
    • TRI054S – Triton 5.4 MP
    • TRI050S-P/Q – Triton 5.0 MP Polarized
    • TRI050S – Triton 5.0 MP
    • TRI032S – Triton 3.2 MP
    • TRI028S – Triton 2.8 MP
    • TRI023S – Triton 2.3 MP
    • TRI016S – Triton 1.6 MP
    • TRI004S – Triton 0.4 MP
    • TRI02KA – Triton 2K Line Scan
    • PHX200S – Phoenix 20.0 MP
    • PHX120S – Phoenix 12.3 MP
    • PHX122S – Phoenix 12.2 MP
    • PHX089S – Phoenix 8.9 MP
    • PHX064S – Phoenix 6.3 MP
    • PHX050S-P/Q – Phoenix 5.0 MP Polarized
    • PHX050S – Phoenix 5.0 MP
    • PHX032S – Phoenix 3.2 MP
    • PHX023S – Phoenix 2.3 MP
    • PHX016S – Phoenix 1.6 MP
    • PHX004S – Phoenix 0.4 MP
  • Application Notes
    • Helios 3D Point Cloud with RGB Color
    • Using GPIO on LUCID Cameras
    • I2C Support on LUCID Cameras
    • Using PTP & Scheduled Action Commands
  • Knowledge Base
  • Contact Support
  • Log In
home/Knowledge Base/Arena Software/Enabling Jumbo Frames on Raspberry Pi

Enabling Jumbo Frames on Raspberry Pi

928 views 4 October 23, 2020 December 10, 2020

Introduction

This article demonstrates how to enable Jumbo Frames (ie. set MTU / packet size to 9000) on the Raspberry Pi 3 or 4. Enabling Jumbo Frames is necessary to unlock the full performance of LUCID cameras, however doing so on a Raspberry Pi involves recompiling the kernel. This article assumes the Raspberry Pi is running a 64-bit OS, which is needed for the ARM 64-bit version of Arena SDK.

Preparation

Install the needed dependencies using the Terminal command:

sudo apt-get install gedit texinfo build-essential libgmp-dev libmpfr-dev libmpc-dev libisl-dev libncurses5-dev bc git-core bison flex

Build and install binutils using the commands:

wget https://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.bz2
tar xf binutils-2.34.tar.bz2
mkdir binutils-obj
cd binutils-obj
../binutils-2.34/configure --prefix=/opt/aarch64 --target=aarch64-linux-gnu --disable-nls
make -j4 
sudo make install
cd

To be able to use binutils directly, set the PATH using this command:

export PATH=$PATH:/opt/aarch64/bin/

Build and install gcc using the commands:

wget https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz 
tar xf gcc-8.4.0.tar.xz 
mkdir gcc-out cd gcc-out 
../gcc-8.4.0/configure --prefix=/opt/aarch64 --target=aarch64-linux-gnu --with-newlib --without-headers \ 
   --disable-nls --disable-shared --disable-threads --disable-libssp --disable-decimal-float \ 
   --disable-libquadmath --disable-libvtv --disable-libgomp --disable-libatomic \ 
   --enable-languages=c 
make all-gcc -j4 
sudo make install-gcc 
cd

Use this command to test if gcc installed correctly:

/opt/aarch64/bin/aarch64-linux-gnu-gcc -v

The output of that command should be similar to:


Download the .tar.gz folder for the latest Raspberry Pi kernel source from: https://github.com/raspberrypi/linux/releases, and save it to the /home/pi directory. As of writing, the latest version is 1.20200902-1.

Extract the folder with the command:

tar xf raspberrypi-kernel_1.20200902-1.tar.gz

Check here: https://github.com/raspberrypi/linux, for the latest branch number of the kernel sources. As of writing, it is 5.4.

Clone and update the sources to the Raspberry Pi using these commands:

git clone --depth=1 -b rpi-5.4.y https://github.com/raspberrypi/linux.git git pull

Altering the Kernel Source Files

In File Manager, navigate to the directory /home/pi/linux/include/linux/ and open the file if_vlan.h.

In if_vlan.h, change the lines:

#define VLAN_ETH_DATA_LEN 1500 /* Max. octets in payload */ #define VLAN_ETH_FRAME_LEN 1518 /* Max. octets in frame sans FCS */

to:

#define VLAN_ETH_DATA_LEN 9000 /* Max. octets in payload */ #define VLAN_ETH_FRAME_LEN 9018 /* Max. octets in frame sans FCS */

In File Manager, navigate to the directory /home/pi/linux/include/uapi/linux/ and open the file if_ether.h.

In if_ether.h, change the lines:

#define ETH_DATA_LEN 1500 /* Max. octets in payload */ #define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */

to:

#define ETH_DATA_LEN 9000 /* Max. octets in payload */ #define ETH_FRAME_LEN 9014 /* Max. octets in frame sans FCS */

In File Manager, navigate to the directory /home/pi/linux/drivers/net/ethernet/broadcom/genet/ and open the file bcmgenet.c.

In bcmgenet.c, change the line:

#define RX_BUF_LENGTH 2048

to:

#define RX_BUF_LENGTH 10240

Configure & Build Kernel for 64-bit Raspberry Pi

In Terminal, run the commands:

cd mkdir kernel-out cd linux

If using Raspberry Pi 3, run the command:

make O=../kernel-out/ ARCH=arm64 CROSS_COMPILE=/opt/aarch64/bin/aarch64-linux-gnu- bcmrpi3_defconfig

If using Raspberry Pi 4, run the command:

make O=../kernel-out/ ARCH=arm64 CROSS_COMPILE=/opt/aarch64/bin/aarch64-linux-gnu- bcm2711_defconfig

Finally run this command to build the kernel:

make -j4 O=../kernel-out/ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-

Booting 64-bit Kernel

In Terminal, run the following commands:

sudo make O=../kernel-out/ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_install dtbs_install sudo cp ../kernel-out/arch/arm64/boot/Image /boot/kernel8.img

In File Manager, go to the path /boot/dtbs and note the version number. In this case it is 5.4.68-v8+.

Go back to /boot, and open the file config.txt

In config.txt, add the following lines to the end:

#Boot 64-bit kernel device_tree=dtbs/5.4.68-v8+/broadcom/bcm2710-rpi-3-b.dtb (if using Raspberry Pi 3) device_tree=dtbs/5.4.68-v8+/broadcom/bcm2711-rpi-4-b.dtb (if using Raspberry Pi 4) overlay_prefix=dtbs/5.4.68-v8+/overlays/ kernel=kernel8.img

Notice the version number found in the previous step is used in the paths here. Only use one of the “device_tree=…” lines based on the Raspberry Pi model, as mentioned in the parentheses. To go back to default kernel, simply comment out these lines.

Reboot the Raspberry Pi.

To confirm the Raspberry Pi is running the 64-bit kernel, the Terminal command “arch” should give the output “aarch64“, and the Terminal Command “uname -a” should give an output similar to:

Enable Jumbo Frames

In Terminal, set the MTU to 9000 using the command:

 sudo ifconfig eth0 mtu 9000

Confirm that eth0 lists its MTU as 9000 using the command:

ifconfig eth0

Jumbo Frames are now enabled on this Raspberry Pi.

Was this helpful?

4 Yes  1 No
Related Articles
  • Using LUCID’s 3D + RGB IP67 Kit in ArenaView
  • Resolving the ‘NodeMapFactory must be preprocessed before calling ToXml’ message when connecting to a camera
  • New 4th Gen Pregius Features
  • Using LUCID’s TRI054S IMX490 in ArenaView
  • How to access documentation on Windows/Linux
  • Where to find more info on the Html UI of our API
© 2020 LUCID Vision Labs Inc.
Looking to purchase our cameras?
Visit the LUCID Webstore at thinklucid.com