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 7AF8CA0A02; Thu, 14 Jan 2021 08:53:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 007F7140FC1; Thu, 14 Jan 2021 08:53:08 +0100 (CET) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id 025B6140FBC for ; Thu, 14 Jan 2021 08:53:06 +0100 (CET) Received: by mail-lf1-f41.google.com with SMTP id 23so6696446lfg.10 for ; Wed, 13 Jan 2021 23:53:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X5/MKPyK4zfi5EK/jyEaw08hC68HYaTBo7dVNRpMhSI=; b=tXzbr82GYw9Ref3qj7w1CI4Y0wYmFkF7APuKxhAtkxNTAcvn3ZAwNBkmdAIOsr/tyI BTD6Z4y3LBDeKLkDadB0/dpy6GTgjXhA0mgeYO3kZK2h9J+EtVwFQEAynJKHoj4ZwQ8r 8UDJMMdUE/q87IwrV18Ra1AaiPXwxkMcEa8T/YHdwAkJ9EmXyGkmjXZ6GJvCcNcxz58k 0p38IeJttyER/C64XvZfZo74cks6pF/icc86e1iJaSpTbFE4C+fPcgI4xUHYPG/77gs/ elUvLL7CaDUL1fBTtOa68jTy0J+AvInfbMx9co1HJHDXL44ku3FcrvF3HaxTMf7SPqpR rlgg== 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=X5/MKPyK4zfi5EK/jyEaw08hC68HYaTBo7dVNRpMhSI=; b=BgxqleuQo5vhNmjdifObZO1wqcrg4Sqop9JjQRLUrTsf17oa5f3F1l353Ev/o/qWKk 9sBe8N14L5CMeBRhZDTM5bTXgJMtiBcbHw7+J98zfal/KkkfhrukSordzdDIK09uyigw EkFXhNqVdA7tmQgOTxRKr/XtSucxEy9ClFTdVpKOaQaDiC+Pld8MQyoQe1SNTBPi/O/V mB94ZHVh+R39IoGRrnTOBTv4M6/bpVxy8L3fhO3WPDZBr4RNIpo3da2mFAqFCvxuktr7 5MZuws+DgIoYN+sPMFAswEo6JF26Sub8gN05Un/ejxMTvsTfo2iaxnyFuxSwmJK5Hd1Z ddQA== X-Gm-Message-State: AOAM5304CRKwhcCH9b0yuKeEqVOqiCu88SQxq5rhb+PtETc8WO/HyJnh b5wVtsIdRk0dUBw4MuThQ5xoyjivucQcNIirePdjcQ== X-Google-Smtp-Source: ABdhPJwja1r/CYwLtqIFHLvim01KA1PuUjGjKH9JWhUeJdVaqv9/YiswIwimG0ekgb4ewPvbMHgeSeDpa01c1R/CMC0= X-Received: by 2002:a05:6512:287:: with SMTP id j7mr2857085lfp.541.1610610786528; Wed, 13 Jan 2021 23:53:06 -0800 (PST) MIME-Version: 1.0 References: <1699913.2mAdEQRYyP@thomas> <2972532.pOxcSfYYoZ@thomas> In-Reply-To: From: Stephen Hemminger Date: Wed, 13 Jan 2021 21:50:01 -0800 Message-ID: To: Igor Ryzhov Cc: Thomas Monjalon , 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" Controlling DPDK interfaces with KNI is known to be broken. Kni calls usepspace with network mutex held. The problem is not fixable. The kernel does provide netlink and devlink API's but there is no generic solution with DPDK. On Wed, Jan 13, 2021, 11:54 AM Igor Ryzhov wrote: > > > 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. >