DPDK usage discussions
 help / color / Atom feed
* [dpdk-users] Unable to redirect packets into kernel using dtap/dtun
@ 2019-08-02  7:15 Nilesh
  2019-08-02 15:37 ` [dpdk-users] [dpdk-dev] " Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Nilesh @ 2019-08-02  7:15 UTC (permalink / raw)
  To: dev, users

Hello,

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)
(Reference:https://doc.dpdk.org/guides/nics/tap.html) 
<https://doc.dpdk.org/guides/nics/tap.html>

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

Hardware:
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)

Regards,
Nilesh


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-users] [dpdk-dev] Unable to redirect packets into kernel using dtap/dtun
  2019-08-02  7:15 [dpdk-users] Unable to redirect packets into kernel using dtap/dtun Nilesh
@ 2019-08-02 15:37 ` " Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2019-08-02 15:37 UTC (permalink / raw)
  To: Nilesh; +Cc: dev, users

On Fri, 2 Aug 2019 12:45:55 +0530
Nilesh <nileshunhale@cse.iitb.ac.in> wrote:

> Hello,
> 
> 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)
> (Reference:https://doc.dpdk.org/guides/nics/tap.html) 
> <https://doc.dpdk.org/guides/nics/tap.html>
> 
> 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
> 
> Hardware:
> 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)
> 

Make sure tap device in kernel is up?

You might try virtio as faster exception path.
https://doc.dpdk.org/guides-18.08/howto/virtio_user_as_exceptional_path.html




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02  7:15 [dpdk-users] Unable to redirect packets into kernel using dtap/dtun Nilesh
2019-08-02 15:37 ` [dpdk-users] [dpdk-dev] " Stephen Hemminger

DPDK usage discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox