From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1B6DAA0A02; Wed, 13 Jan 2021 20:54:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8DAAE140D21; Wed, 13 Jan 2021 20:54:09 +0100 (CET) Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) by mails.dpdk.org (Postfix) with ESMTP id 38B7B140D1A for ; Wed, 13 Jan 2021 20:54:06 +0100 (CET) Received: by mail-ej1-f52.google.com with SMTP id g12so4803005ejf.8 for ; Wed, 13 Jan 2021 11:54:06 -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=zPmk58YttR6tZpfGfvFLIps2N8R5ZLecwpJUbnGyuOg=; b=JqlMDqryV5XjaXySs+XabgzgYq3qjpNV4gksXoZvpDutLGcHo8HSuMe4gdh+/z3luQ gJ8yzd9E/HKqcpVS6U3EsNzYGbCLjc3H3zkIVYGxO1x7KeTEi+bombu5aE6wFvtsFcBR pSvWV4VX34LQz9dEV/t4c/C7/jEsas3A1zVAdNCg4C71NEwXCqAwwPl3Gh+UmS6yqO1L dJDWnrFbLl0IoQWOTtRgL6PRg7JWgBCTK0SPLPiPLzz6ErFbe/IFHfgic3e99IFup8E5 RHTd4fjUsWClbieN004e6NXl92jIqYpaPTCyJaXv/1jzMc7HZla0RrwylMP853XFcC19 olsA== 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=zPmk58YttR6tZpfGfvFLIps2N8R5ZLecwpJUbnGyuOg=; b=NoG7ytnjkJCmuGw5fc5Yes4DjPSspPGi5vJSwROxovH3/woLp5Cjf3vQIeLqREIPD+ pK4sp2q42dZ4pDHSdMYArrIZLF+gK7A6faoVAUtmWKfMFmIC/d4MiqHJ5zokMSGPQ/NG 8xdmjQiX3jykYeRLAaD4CPo+vZ+DXApTpGycMPcUQ+YT+o4xdeabZuw2cCCqHAoPeW1g nBCg/nP2dx7/LoFZREdR947ybjy5QfC0nzj2DuBbsu5a1k7/aEgUqoWbeFWa9vlerUZN s3XzzRiOVZMXCDzvtzPTjP2j1+ASZAxEmhzIuZY3V0J7G3YvlNrfcylM6YCusEngUtI/ XGtg== X-Gm-Message-State: AOAM531A0du3QCHGfL5Y7o1ZR9ekdU8nIu/vseF9yNSPKzYaajs4/yBH fSrO8m7qqJ1jhgsG3iIQMSH5eq+vf5e3k0qsOUK3iA== X-Google-Smtp-Source: ABdhPJyRMXvadb1aeI4QTXJCAtPzqoyYVeUlXXHXNo1/Zuz4Yhu3I8q7e2Z9BPJnuQWHCbUn45jiZAF84alk2JTxM7Y= X-Received: by 2002:a17:906:378f:: with SMTP id n15mr2702808ejc.263.1610567645816; Wed, 13 Jan 2021 11:54:05 -0800 (PST) MIME-Version: 1.0 References: <1699913.2mAdEQRYyP@thomas> <2972532.pOxcSfYYoZ@thomas> In-Reply-To: <2972532.pOxcSfYYoZ@thomas> From: Igor Ryzhov Date: Wed, 13 Jan 2021 22:53:55 +0300 Message-ID: To: Thomas Monjalon Cc: Stephen Hemminger , dev , Ferruh Yigit , kevin.traynor@redhat.com, "Richardson, Bruce" , hemant.agrawal@nxp.com, Jerin Jacob , Olivier Matz , 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jan 13, 2021 at 9:45 PM Thomas Monjalon wrote: > 13/01/2021 19:17, Igor Ryzhov: > > On Wed, Jan 13, 2021 at 8:10 PM Stephen Hemminger < > > stephen@networkplumber.org> wrote: > > > On Wed, Jan 13, 2021, 9:06 AM Thomas Monjalon > 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? > > > > > > Last time I tried. > > > Virtio user was as fast as KNI and consumed less cpu. Was seeing 10mpps > > > Tap was much slower. Like 1mpps. > > > > 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? > > I see at least 2 alternatives for bonding with kernel management: > - mlx5 bonding > - af_xdp interface for most of NICs > Bonding is just an example. My point is that KNI allows changing MAC, MTU, rx mode and admin status of a NIC used by DPDK application - all using standard Linux utilities without any need for additional APIs provided by the app. Yes, Mellanox NICs also allow this but it's just one of many drivers supported by DPDK. I'll dig into af_xdp, thanks.