From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id EA77CA0A02;
	Wed, 13 Jan 2021 19:17:34 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 674E3140DC6;
	Wed, 13 Jan 2021 19:17:34 +0100 (CET)
Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com
 [209.85.218.53])
 by mails.dpdk.org (Postfix) with ESMTP id 3C54D140DBC
 for <dev@dpdk.org>; Wed, 13 Jan 2021 19:17:32 +0100 (CET)
Received: by mail-ej1-f53.google.com with SMTP id q22so4453374eja.2
 for <dev@dpdk.org>; Wed, 13 Jan 2021 10:17:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=nfware-com.20150623.gappssmtp.com; s=20150623;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=OLumGQFa0AcPPKCAnyU0XhIqBSe636dDxdvsmpacr8c=;
 b=IP5/N1DWHh4XX34TK+KATkjiFott39DVzFElSG7wZLD6uUqZz7GXyMSS7grZ2UTugc
 vdVwM1/7ZSGLJXEtIKYWzzJ8eUhMu6c+Pwvm0q7eIHZ5W22VM6O3gItASwF3tLdq59TE
 UKNv621NSRu7NWds5pA9YUo01DOKgVNFKosZb1cpaIPuu5wCRJO5vnoPjzsyjOfpjnR/
 NlebqiehbaCo4I7dn/zBR26UAt1+AZKtCfM+1CUybE0rTpTdhPjsoxef554b7A+KQKDu
 ClL1Uq9frB1r20B6QAgniEIS8TvSgy+WgBIJHad44KTZEAxOeY3x4tTr7Ke1TBhfh0DP
 Z/WA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=OLumGQFa0AcPPKCAnyU0XhIqBSe636dDxdvsmpacr8c=;
 b=NNn3gJIlTSmCLi3noqJqFHstQ+J+riQu1YiNZlXhh1IGT1YD2/+b/Rbi9VrR+L2RVj
 ZGtOgH9X/fO9PWRNGnupF/PggYjuf9/tc7iEvShDVOLyh+N7Y6brCzBc3KgbVzD0cKNK
 q2LhO6i7r8LYmhYkUqrq7pg7h+HMED8uxGBWtuIloRZjl1dp3oKsYY6FH2IfGttbEwM9
 7J0iY8KnRVrK1VgLK4NLPS37OAA4KuynLvFmebDoPg6LoRzQdCVajU63hx9f4e0ld/o4
 pUIc/ZvHedxGSGshQBnps5F8DBQtBqyQSd/v3SSZrZMdSKI9eJsNnyRKgJt6tzcKyWkr
 4WOg==
X-Gm-Message-State: AOAM5305vHo2BI2PwXaXEwC51+W6HmWTv16X1SJBrMj4tL9ZU9in+lwJ
 rGCwr5+Z8b0iCqEPQFo2yPOk9vDteP/X8XT3q3pbpg==
X-Google-Smtp-Source: ABdhPJytLM58UWhjqUscCaRs9de0z6d4m7tM7lu22DajC39VlYfMiu20ltIuifbrZ6lnEsg1adKY5FO97zuo9LC170k=
X-Received: by 2002:a17:906:7f11:: with SMTP id
 d17mr2469473ejr.534.1610561851759; 
 Wed, 13 Jan 2021 10:17:31 -0800 (PST)
MIME-Version: 1.0
References: <1699913.2mAdEQRYyP@thomas>
 <CAOaVG14bS-Em3eww53EDSGQe-z5JZN-v7YJre5-H13ywCNzNtg@mail.gmail.com>
In-Reply-To: <CAOaVG14bS-Em3eww53EDSGQe-z5JZN-v7YJre5-H13ywCNzNtg@mail.gmail.com>
From: Igor Ryzhov <iryzhov@nfware.com>
Date: Wed, 13 Jan 2021 21:17:20 +0300
Message-ID: <CAF+s_FyTFsDBauBcRXb2CQ9sgD-USwAi57kFGn9Dz=23HzK=og@mail.gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: Thomas Monjalon <thomas@monjalon.net>, dev <dev@dpdk.org>, 
 Ferruh Yigit <ferruh.yigit@intel.com>, kevin.traynor@redhat.com, 
 "Richardson, Bruce" <bruce.richardson@intel.com>, hemant.agrawal@nxp.com, 
 Jerin Jacob <jerinj@marvell.com>, Olivier Matz <olivier.matz@6wind.com>,
 maxime.coquelin@redhat.com
Content-Type: text/plain; charset="UTF-8"
X-Content-Filtered-By: Mailman/MimeDel 2.1.29
Subject: Re: [dpdk-dev] KNI alternatives
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On Wed, Jan 13, 2021 at 8:10 PM Stephen Hemminger <
stephen@networkplumber.org> wrote:

> Last time I tried.
> Virtio user was as fast as KNI and consumed less cpu. Was seeing 10mpps
> Tap was much slower. Like 1mpps.
>
> Vpp uses virtio user.
>
> Sorry for top post. Only have phone internet
>
> On Wed, Jan 13, 2021, 9:06 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> > Hi,
> >
> > As discussed today in the techboard meeting, KNI has probably
> > better alternatives today without using an out-of-tree module.
> > Virtio-user is a good candidate to replace KNI.
> > What is the performance of TAP?
> > Is there a way to leverage af_packet, af_xdp, or even pcap interfaces?


Performance is not the only question. The advantage of KNI we are currently
using is
the ability to control the DPDK interfaces by the kernel.
For example, to implement bonding in the DPDK application, it is possible
to create KNI
pair for each physical interface, create a bond interface in Linux over
those KNI interfaces
and just pass LACP packets between the app and the kernel. The kernel
itself will control
MACs, MTU, etc. of underlying interfaces. AFAIK it's not possible with
virtio-user or tap.
Am I wrong?


>

>
> > In order to avoid using the KNI out-of-tree module,
> > we should make the librte_kni compatible with an other interface.
> > The big plan is then to move the KNI module out of the main DPDK repo,
> > as we did for igb_uio.
> >
> > The first step of this plan might be to document pros & cons
> > of the KNI alternatives inside the KNI documentation:
> >         https://doc.dpdk.org/guides/prog_guide/kernel_nic_interface.html
> >
> > As a start, this doc should be better referenced:
> >
> > https://doc.dpdk.org/guides/howto/virtio_user_as_exceptional_path.html
> >
> > Note: I won't do this update myself, so feel free to step up!
> > Thanks
> >
> >
> >
>