From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F0388A10DA for ; Fri, 2 Aug 2019 17:37:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 440581C2B1; Fri, 2 Aug 2019 17:37:36 +0200 (CEST) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 1C1EF1C2B1 for ; Fri, 2 Aug 2019 17:37:34 +0200 (CEST) Received: by mail-pf1-f194.google.com with SMTP id r7so36230874pfl.3 for ; Fri, 02 Aug 2019 08:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W+St42h2OFmFSRzxyxrr0T+VDtpHrQUz8zBRsqTgEhU=; b=FZWLE+OjwBV9q3UFVHoI99T4zYZYywaga5RfpLZJ6lA/kx1KpVyjL/0F1N0NUBVtdC u3qChAEN+FK+qtEyKvmmTiZLYhF9tW80bJsO0YVzbFyTYhfbesEbEyxorN61Oc7Er5d2 yUlfT8cU/bwmoQHEOBYCo6myaEFHcrv2sR86W+v1zrZSI5s/XhWFP2Vh9ptM4uH/USSo ux9nnsZUE6BDkeq9fnLKmNKc1QFFDEHqrPEFXytfU1mkeF2OWAsAtdN45bs1LfRyWaTO 7mUFE52GE7xxvhksggCYeUfm6BqterljbaU14BUp0FcD1r/Ou+fmg7ViYGSK5NZSgvfj nOow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W+St42h2OFmFSRzxyxrr0T+VDtpHrQUz8zBRsqTgEhU=; b=iypxG1MvI1y8xZ5GlQq1boO0Yl8nBG37s+sLHqlTOJ3n811LTBog91Dx3l9pgVWskr 3PF9A9ugpz5iDqttoUBME98dKElgXAjTAKyC4HDoQYyaIgIuaHCPP0w7CsUnYT2XB0LM w4XP4vWDxsFyl7aHM89L/6YO3lPm1XQLgBSrakN7aQ4vndSm6jlKGs37wp83FqnepWhy 9Y70GzyOMJ1NqHe0yyiN3eC3BzS2wAAQV3dccddYN582SagCFhrizIVTrIXbp1Yw8DRP jfZg2sagyW/sRqknOwvGFyPXqhyTzP2hahK/Rhrnm+MeXWypnMxOy0ePwg4Ln/s6HeMG /KYg== X-Gm-Message-State: APjAAAXcWpYb70/FATfpqKurQgHl8cJREz15HzTT2K2hARgBlgt5xb7h OMEGaI+UDuLG/mO0BWkrRq4= X-Google-Smtp-Source: APXvYqxvHDvV0js3Rsz2d2eCjwO+HvOP2hauVk8H53QJqbvd0BHuADvcrPl+f0VuvsvMBn9UY8wxnA== X-Received: by 2002:a63:1e05:: with SMTP id e5mr9308614pge.153.1564760253973; Fri, 02 Aug 2019 08:37:33 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id k36sm75293247pgl.42.2019.08.02.08.37.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 08:37:33 -0700 (PDT) Date: Fri, 2 Aug 2019 08:37:26 -0700 From: Stephen Hemminger To: Nilesh Cc: dev@dpdk.org, users@dpdk.org Message-ID: <20190802083726.3dfde31f@hermes.lan> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-users] [dpdk-dev] Unable to redirect packets into kernel using dtap/dtun X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Fri, 2 Aug 2019 12:45:55 +0530 Nilesh wrote: > Hello, >=20 > We are building an application where a majority of the packets on the=20 > fast path are handled by DPDK, but a small subset of packets on the slow= =20 > path need to be redirected to a legacy userspace socket program that=20 > runs over the kernel TCP/IP stack. Therefore, we are trying to inject=20 > the slow path packets received by DPDK into the kernel via TUN/TAP device. >=20 > We have done the following: we created a tun device, assigned it an IP=20 > address, and bound the legacy socket program to this address. The DPDK=20 > program reads all packets from the NIC and writes the slow path packets=20 > into this tun device. These packets are then successfully received by=20 > the legacy socket program. However, we are unable to get this to work=20 > with DPDK's tun/tap devices (dtun/dtap). >=20 > When we use dtap then packet is received in dtap0 (can be seen in=20 > wireshark) but not reached the socket program. > When we use dtun then packet is received in dtun0 (rx value increases=20 > but is not captured by wireshark) and not reached the socket program. > (We enabled ip_forwarding and disabled rp_filter for both "all" and=20 > "dtun0" iface) > (Reference:https://doc.dpdk.org/guides/nics/tap.html)=20 > >=20 > 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=20 > dtun/dtap isn't? >=20 > System specification : > 2 machines with > Distributor ID:=C2=A0=C2=A0=C2=A0 Ubuntu > Description:=C2=A0=C2=A0=C2=A0 Ubuntu 18.04.2 LTS > Release:=C2=A0=C2=A0=C2=A0 18.04 > Codename:=C2=A0=C2=A0=C2=A0 bionic >=20 > Kernel: 4.15.0-55-generic > *DPDK* version: 19.05.0 >=20 > Hardware: > CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz > NIC 1: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ (i40e) >=20 > (If any extra setup configuration information required will be provided) >=20 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