Introduction
This document will explain how to use TCP with LUCID’s Atlas10 cameras.
Prerequisites
- Ubuntu 18.04 64-bit (Ubuntu 16.04 not supported)
- Atlas10 camera firmware v1.10.0.0 or higher
Note: ATX314S does not support TCP. - Arena SDK for Linux x64 v0.1.59 or higher / Arena SDK for ARM64 v0.1.43 or higher
Test Environment
System 1 – Streaming 1x Atlas10 camera
Motherboard | ASUS PRIME Z270-A |
Processor | Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz |
Memory | Kingston KHX2400C15D4 16GB (2x8GB) DDR4 SDRAM |
Operating System | Ubuntu 18.04.5 64-bit, kernel version 5.4.0-89-generic |
Video | Intel HD Graphics 630 |
Storage | Samsung SSD 850 EVO 500GB |
Network Interface Card | PCIE-POE1-MG2 (MFR P/N: IOI GE10P-PCIE4XG301, 1-port 10G/5G/2.5G/1G PoE+ NBASE-T) |
System 2 – Streaming 1x Atlas10 camera (ARM64)
Platform | Jetson AGX Xavier |
Processor | 8-core ARM v8.2 64-bit CPU, 8MB L2 + 4MB L3 |
Memory | 32GB 256-Bit LPDDR4x |
Operating System | Linux4Tegra L4T R32.6.1 (August 2021) Ubuntu 18.04.5 64-bit, kernel version 4.9.253-tegra Power Mode: MODE 15W DESKTOP |
Video | 512-core Volta GPU with Tensor Cores |
Storage | 32GB eMMC 5.1 |
Network Interface Card | PCIE-POE1-MG2 (MFR P/N: IOI GE10P-PCIE4XG301, 1-port 10G/5G/2.5G/1G PoE+ NBASE-T) |
System 3 – Streaming 4x Atlas10 cameras
Motherboard | ASUS WS X299 PRO/SE Intel LGA2066 M.2 PCIe USB3.1 Dual Lan ATA |
Processor | Intel(R) Core(TM) i9-10900X CPU @ 3.70GHz |
Memory | Corsair VENGEANCE LPX 128GB (8x16GB) DDR4 DRAM 2933MHz (Quad Channel) |
Operating System | Ubuntu 18.04.5 64-bit, kernel version 5.4.0-89-generic |
Video | Zotac nVidia GeForce GT710 2GB GDDR3 PCIe |
Storage | Kingston A2000 M.2 2280 500GB Internal Solid State Drive (SA2000M8/500G) |
Network Interface Card | 2x PCIE-POE2-MG (MFR P/N: IOI DGEAP2X-PCIE8XG302, 2-port 10G/5G/2.5G/1G PoE+ NBASE-T) |
PCIE-POE-MG2 Settings
- MFR P/N: IOI GE10P-PCIE4XG301
- 10G/5G/2.5G/1G PoE+ NBASE-T Ethernet Card
- Chipset: Marvell Aquantia AQC107
- Driver Version: 2.4.15, Date: July, 1, 2021
PCIE-POE2-MG Settings
- MFR P/N: IOI DGEAP2X-PCIE8XG30
- 10G/5G/2.5G/1G PoE+ NBASE-T Ethernet Card
- Chipset: Marvell Aquantia AQC107
- Driver Version: 2.4.15, Date: July, 1, 2021
Initial NIC Setup
Install the Aquantia Atlantic drivers found on Marvell’s website:
https://www.marvell.com/support/downloads.html
For compilation and installation instructions, see our Knowledge Base article.
Ensure the Aquantia Atlantic driver is installed and 10Gbps speeds are enabled:
Additional NIC Setup
Set a large socket buffer size, 32MB:
sudo sh -c "echo 'net.core.rmem_default=33554432' >> /etc/sysctl.conf" sudo sh -c "echo 'net.core.rmem_max=33554432' >> /etc/sysctl.conf" sudo sysctl -p
Assign an IP Address and Subnet to your NIC:
sudo ifconfig enp28s0 192.168.100.100
where enp28s0 is the name of your NIC
Set MTU size to 16000 bytes:
sudo ifconfig enp28s0 mtu 16000
where enp28s0 is the name of your NIC
Maximize the receive buffer size on the NIC:
sudo ethtool -G enp28s0 rx 4096
where enp28s0 is the name of your NIC
Enable Large Receive Offload
Large Receive Offload (LRO) allows the NIC to combine smaller packets into larger segments, reducing the number of smaller packets needed to be processed by the CPU.
Apply the following parameters on the Aquantia card with ethtool:
Parameter | Description | Value |
Receive Coalesce usecs | Amount of usecs to delay an receive interrupt after a packet arrives | 112 |
Large Receive Offload | TCP Large receive offload | On |
Generic Receive Offload | Software-based receive offload | Off |
sudo ethtool -C enp28s0 rx-usecs 112 sudo ethtool -K enp28s0 lro on sudo ethtool -K enp28s0 gro off
where enp28s0 is the name of your NIC
For convenience, the following can be saved to a script, e.x. nic_setup.sh:
#!/bin/bash sudo ifconfig $1 mtu 16000 sudo ethtool -G $1 rx 4096 sudo ethtool -C $1 rx-usecs 112 sudo ethtool -K $1 lro on sudo ethtool -K $1 gro off
Run the script with with the following command:
sudo sh nic_setup.sh enp28s0
where enp28s0 is the name of your NIC
Using TCP
To turn on TCP mode, set TCPEnable = True
In C++ code:
Arena::IDevice* pDevice = pSystem->CreateDevice(deviceInfos[0]); Arena::SetNodeValue<bool>(pDevice->GetNodeMap(), "TCPEnable", true); // When using TCP, there is no need to enable packet resend. // The packet delay and bandwidth reserve should be set to 0 // to maximize TCP efficiency. std::cout << TAB1 << "GevSCPD = " << 0 << std::endl; Arena::SetNodeValue<int64_t>(pDevice->GetNodeMap(), "GevSCPD", 0); std::cout << TAB1 << "DeviceLinkThroughputReserve = " << 0 << std::endl; Arena::SetNodeValue<int64_t>(pDevice->GetNodeMap(), "DeviceLinkThroughputReserve", 0); // It is not necessary to set the GevSCPSPacketSize node when TCPEnable = true. // The NIC should be set to the maximum available MTU size.
When the camera is streaming, you can verify that TCP packets are being coalesced on the NIC with the following Terminal command:
sudo ethtool -S enp28s0 | grep Lro
where enp28s0 is the name of your NIC
Example output: