Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2992538pxm; Mon, 28 Feb 2022 09:54:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzeqMviO0mbd+ygE3KWjbQFzqWRgkVN0l5KbyHfDu4y+BGCYAFcEy5/BxZParqlnPrq3+Tt X-Received: by 2002:a63:cd49:0:b0:373:5fbb:c790 with SMTP id a9-20020a63cd49000000b003735fbbc790mr18314188pgj.206.1646070864331; Mon, 28 Feb 2022 09:54:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646070864; cv=none; d=google.com; s=arc-20160816; b=jL8FJ0MRgk7glidox+dk4EGNM1u/Y5bdRSZLGUEM8NTG+sP7tGr2Gl1IFD3fZGg21F hjr9KIJgUeFbKe4sNRyKbTZj6eK2f9EAeQ8L+TZpUelvBuJ3nITA52AVb01wwkOmA8jq nVSMW+zwvnKE2BnBtkCI1NbiIEzENWzPr8SMsYWnDt3u8RFhMYi4uPPaTWjBtf7ZGH+l VhKFcaXIrisfEQTPG38GmZm9MAodrtAFluQOFoan+Cw1FJ1xgLURrrBktQW3Q172N9bI zkwHNCWy2JZso+9TS253cVDTqxqVFfi7FDy4yYljGhBEWLrYy9frQ/HPmWTGZeaNfq50 IT7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=c3jES/MWXROupZlLhXD3/nZtFOtL9jKvxxOu5N/ZF2U=; b=rkFv3ZX8xHsgmeJ8onN3OGT/r668xJDY0/hiSN7hXDmaV1FcIsGA1ioAwvElWar7uJ GiUuWRD7XX8Q1y7Z0rwZTaiK2VEloq15A/cv7smn+o2xeH2RseSfuqnYLupH9UO5VlaE WGhln6f6mcuSZ+PnbInnimpVPEIyatSBR70uHEpV+249WSbyWBsfaf+TC6VBgPpvrBxy /7fxYme3APdoiyBnt57ChIVhopa2UnCLopzJpeanJtupfujtgS5prO3ilOdUc1tfUd7s ns7Z95tDR4WWsNhYCSbraxFU24QbFrQCrGQQBsig/BWOwHwdVbQQw+hL1oKb5Gk95aEO WBRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20210112.gappssmtp.com header.s=20210112 header.b=6bruvRBP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t74-20020a62784d000000b004e106021acesi9090468pfc.299.2022.02.28.09.54.08; Mon, 28 Feb 2022 09:54:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20210112.gappssmtp.com header.s=20210112 header.b=6bruvRBP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232517AbiB1RQW (ORCPT + 99 others); Mon, 28 Feb 2022 12:16:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbiB1RQV (ORCPT ); Mon, 28 Feb 2022 12:16:21 -0500 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E21F7487B for ; Mon, 28 Feb 2022 09:15:43 -0800 (PST) Received: by mail-pj1-x102a.google.com with SMTP id h17-20020a17090acf1100b001bc68ecce4aso15333986pju.4 for ; Mon, 28 Feb 2022 09:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c3jES/MWXROupZlLhXD3/nZtFOtL9jKvxxOu5N/ZF2U=; b=6bruvRBPzu5N+K8jNWZSzzyg0icNW1GmXwDlmkVwXez9VtCKvxGdvmHr/CH7/3mSkE WwP0gauUNRFNJhpWDNwWC35ed/4lfHCLqFcxEzYQidb7vQnfOPr75AZndLxrRb2n4tjl wkZEUtRMDzInbedJz24LrQzPpgwUpPGYxYXFncezzwkUSr1OIVzg1wxw4VXrh3HxWRXh i+I9kDFqoW8OCrFuYfLK8dkHlvygbDepVp0TKKLJJ7aH5DFzi4dFtiyqNjtyCE2X40R0 6oo9CErRGGqH7Kb8UO3ka/lWkAc7/yEbM2PbrqhU0lqGATmtXsxM3czaQD4q5EtoW2vR KuEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c3jES/MWXROupZlLhXD3/nZtFOtL9jKvxxOu5N/ZF2U=; b=XmhuPSkz/gZ8cNPbW2fBFtjwDIhkimCtI702ebyVFeqQ1K9kYlEOmiWChCc9h27pTJ uz+27aIML1pIXCy2VTdTen1q524MjzMBi0DHZgtReU2QcsTGqDAnaCHNxU9g8K2W9bH2 gQDWS/Vc3xNH5L9TjahXsiUDKPvckZXOGeLTnY1jF24uA1T8FVhVIX0pzfcf0hrh2zbh l1XGFI9Q71R0jiKr7P3IeCT5xUlFCrBIe7uRN/jOksUbu2YfglS3SaAXx0yCptktNsVf amUY3Q1tthIAHfURdVAQSI9EaEgswM2Uhtu4K/rblUaXRg5PMWwhj+vRNQmh4upGr7OT Ftrw== X-Gm-Message-State: AOAM530O9Ce8lgcfYcpnrAl6nefhJQ37V9k24ztxxpEQGPXDl8tJap+7 qYhVJvc1mQzlRtEBRmrzk7dOlw== X-Received: by 2002:a17:902:c286:b0:151:605c:fadd with SMTP id i6-20020a170902c28600b00151605cfaddmr7633678pld.100.1646068542622; Mon, 28 Feb 2022 09:15:42 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id oc3-20020a17090b1c0300b001bce36844c7sm11588990pjb.17.2022.02.28.09.15.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 09:15:42 -0800 (PST) Date: Mon, 28 Feb 2022 09:15:39 -0800 From: Stephen Hemminger To: Jason Wang Cc: Harold Huang , netdev , Paolo Abeni , "David S. Miller" , Jakub Kicinski , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , open list , "open list:XDP (eXpress Data Path)" Subject: Re: [PATCH net-next v3] tun: support NAPI for packets received from batched XDP buffs Message-ID: <20220228091539.057c80ef@hermes.local> In-Reply-To: References: <20220224103852.311369-1-baymaxhuang@gmail.com> <20220228033805.1579435-1-baymaxhuang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 28 Feb 2022 15:46:56 +0800 Jason Wang wrote: > On Mon, Feb 28, 2022 at 11:38 AM Harold Huang wrote: > > > > In tun, NAPI is supported and we can also use NAPI in the path of > > batched XDP buffs to accelerate packet processing. What is more, after > > we use NAPI, GRO is also supported. The iperf shows that the throughput of > > single stream could be improved from 4.5Gbps to 9.2Gbps. Additionally, 9.2 > > Gbps nearly reachs the line speed of the phy nic and there is still about > > 15% idle cpu core remaining on the vhost thread. > > > > Test topology: > > [iperf server]<--->tap<--->dpdk testpmd<--->phy nic<--->[iperf client] > > > > Iperf stream: > > iperf3 -c 10.0.0.2 -i 1 -t 10 > > > > Before: > > ... > > [ 5] 5.00-6.00 sec 558 MBytes 4.68 Gbits/sec 0 1.50 MBytes > > [ 5] 6.00-7.00 sec 556 MBytes 4.67 Gbits/sec 1 1.35 MBytes > > [ 5] 7.00-8.00 sec 556 MBytes 4.67 Gbits/sec 2 1.18 MBytes > > [ 5] 8.00-9.00 sec 559 MBytes 4.69 Gbits/sec 0 1.48 MBytes > > [ 5] 9.00-10.00 sec 556 MBytes 4.67 Gbits/sec 1 1.33 MBytes > > - - - - - - - - - - - - - - - - - - - - - - - - - > > [ ID] Interval Transfer Bitrate Retr > > [ 5] 0.00-10.00 sec 5.39 GBytes 4.63 Gbits/sec 72 sender > > [ 5] 0.00-10.04 sec 5.39 GBytes 4.61 Gbits/sec receiver > > > > After: > > ... > > [ 5] 5.00-6.00 sec 1.07 GBytes 9.19 Gbits/sec 0 1.55 MBytes > > [ 5] 6.00-7.00 sec 1.08 GBytes 9.30 Gbits/sec 0 1.63 MBytes > > [ 5] 7.00-8.00 sec 1.08 GBytes 9.25 Gbits/sec 0 1.72 MBytes > > [ 5] 8.00-9.00 sec 1.08 GBytes 9.25 Gbits/sec 77 1.31 MBytes > > [ 5] 9.00-10.00 sec 1.08 GBytes 9.24 Gbits/sec 0 1.48 MBytes > > - - - - - - - - - - - - - - - - - - - - - - - - - > > [ ID] Interval Transfer Bitrate Retr > > [ 5] 0.00-10.00 sec 10.8 GBytes 9.28 Gbits/sec 166 sender > > [ 5] 0.00-10.04 sec 10.8 GBytes 9.24 Gbits/sec receiver > > > > Reported-at: https://lore.kernel.org/all/CACGkMEvTLG0Ayg+TtbN4q4pPW-ycgCCs3sC3-TF8cuRTf7Pp1A@mail.gmail.com > > Signed-off-by: Harold Huang > > Acked-by: Jason Wang Would this help when using sendmmsg and recvmmsg on the TAP device? Asking because interested in speeding up another use of TAP device, and wondering if this would help.