[dpdk-dev] Unable to redirect packets into kernel using dtap/dtun

Nilesh nileshunhale at cse.iitb.ac.in
Fri Aug 2 09:15:55 CEST 2019


We are building an application where a majority of the packets on the 
fast path are handled by DPDK, but a small subset of packets on the slow 
path need to be redirected to a legacy userspace socket program that 
runs over the kernel TCP/IP stack. Therefore, we are trying to inject 
the slow path packets received by DPDK into the kernel via TUN/TAP device.

We have done the following: we created a tun device, assigned it an IP 
address, and bound the legacy socket program to this address. The DPDK 
program reads all packets from the NIC and writes the slow path packets 
into this tun device. These packets are then successfully received by 
the legacy socket program. However, we are unable to get this to work 
with DPDK's tun/tap devices (dtun/dtap).

When we use dtap then packet is received in dtap0 (can be seen in 
wireshark) but not reached the socket program.
When we use dtun then packet is received in dtun0 (rx value increases 
but is not captured by wireshark) and not reached the socket program.
(We enabled ip_forwarding and disabled rp_filter for both "all" and 
"dtun0" iface)

Any pointers regarding how to do this using dtun/dtap will be helpful.
Are we missing anything due to which linux tun device is working but 
dtun/dtap isn't?

System specification :
2 machines with
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:    bionic

Kernel: 4.15.0-55-generic
*DPDK* version: 19.05.0

CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
NIC 1: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (i40e)

(If any extra setup configuration information required will be provided)


More information about the dev mailing list