Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp262478pxf; Wed, 31 Mar 2021 02:48:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUH42moOgmrIUlsimICcTMwv4ZfpQBsYcpqwtbAo3/YkcGxVLNKRNzBIWVSNYKlaJ+EDcK X-Received: by 2002:a17:906:fcb2:: with SMTP id qw18mr2507993ejb.434.1617184087399; Wed, 31 Mar 2021 02:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617184087; cv=none; d=google.com; s=arc-20160816; b=SVxIw+71KakP7TVH5SHOYMQ49opoAe8yQT9wOB6xs43/c7qLSEaRcQ0MMwXwtCoX77 UfYbVEdaD/gVb+lstXdp+fVs36D1mUNsXWDmfgn4sTHPd3L1/JB1gUH9xanYkfP8Knag O+Ny6R6o4K3OGrSSX0TCIuzVTkh3PsAQMnITvIJqW6iDmZEp/4/aDcohJ3LVszKmhYC0 HyCJGVrEQ8XJyxn28pkTyC0mHMHFw4sG8XFWH3qmguhiENR7oF65pX9h3r54m46XT8bH tYIF7pynlZwWViITAGehpTUG+vjZS9GWXrCTThMBlT7J59C7yLQGZSjxkogvy+6tAQmH M97Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=kSJos4Uld54OenplRvSKzdWrdWdUO1hcjvqzsTx68YE=; b=RMQKjuTd53iMzvnnCu14dPMu8SY/0qGGaQEH08D+N76xrV0L+168DmF4VYQuvWdwhV E/K054KBP7H6OntIPEKj+VooKGYM0Ww/OF2Shymt5QLBuFoyTxbsHDc9GXVaH5mp/wT3 erYoAtD5NUSKOhAvcTo3c5be9FkYImt179l+sEwtEgUIqB0MbhWExsL4+J0w4bfeUPWG tTTI26c84WyzC3MP1fQEfoAcGAJB5JS9gntimgypCFzpHOGOTGsW4AGmzXb+g31nXjLA uAG4Zm6xKcr9LJ1ZLIvkPP5QI1Dfp/9BjvZdUG3tKPZPrdOsWJtr7Npbgp5u0Dhz6/yB KK3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MdP4BRhT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf9si1228495ejc.716.2021.03.31.02.47.44; Wed, 31 Mar 2021 02:48:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MdP4BRhT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234545AbhCaJpQ (ORCPT + 99 others); Wed, 31 Mar 2021 05:45:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234790AbhCaJo4 (ORCPT ); Wed, 31 Mar 2021 05:44:56 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FB0AC06175F; Wed, 31 Mar 2021 02:44:56 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id l76so13810919pga.6; Wed, 31 Mar 2021 02:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kSJos4Uld54OenplRvSKzdWrdWdUO1hcjvqzsTx68YE=; b=MdP4BRhTqIit2P3ZQtowMxJBDQc24KS+05aG0D6Pocc+N3CZlWJgco7d9Y939a3Mih Vxe+LDXQ4tAigBf1dPYug8FNom5ZDZo15DZkphkhEYmwaGEg+9gfgTs8gpLEvglP4DsI HLHEySd3h9xdQhb0Y8WiCWo2/JyLAEN8XJfu4EOaqESnFlNlDtOSQPPwoVNSwymHndkH jFeFwBkdAanBPKgR+JN7YkhcKNWW7XUvbC9KpoetkBmQldNIV5DhFcAIV2hD1n0+B+CA WGQAyiFX/nseIvOyPazF/OFMPgwGyKZL2A4q14Tn8PcjDOxAggH10MSfaBTPuI/e2GyB zoSw== 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=kSJos4Uld54OenplRvSKzdWrdWdUO1hcjvqzsTx68YE=; b=P0Wk4w3aYZ/3e74BE3uDS+9FmDefVwBMxsoDh2j3CglR5drXl1anKesDHvxB4ZSGnW wySASp1K5SFBuCWdWyKXocYah4zUbQFR/Qfzd94FXgAHbD6pktLp1rLuz3tBOpBLgF4U AMhcjBI84FuOGmXbm7ziJW9LgsYim+XrYRROyp8g1+yvCa8hQxmvFmqLn7GrwI4Km/w9 LxmUCT3aY8I5JbGVRNxa6OLyfSwxx5vN46ZJpH5uQ4TyevJCahRh4CSpmHVeJiPyZxa1 7EIe2i1Kqu7p1kA1DIBHo2Raxp4WCL98UOsFcAa0+3eE27NQ8nqn8B+H0EqrlbBaC91N mL9w== X-Gm-Message-State: AOAM532SLTKLPykf3P9BNypjGhsqBfxpGzeNTJO611K1ssuqeGwaWT09 ZqLpxBJ4xNmYG47alEkBlCBpM/jLKKl5mCulk+WqLoyyIiGR0vTC X-Received: by 2002:a63:6fc1:: with SMTP id k184mr2550769pgc.292.1617183896059; Wed, 31 Mar 2021 02:44:56 -0700 (PDT) MIME-Version: 1.0 References: <20210330231528.546284-1-alobakin@pm.me> In-Reply-To: <20210330231528.546284-1-alobakin@pm.me> From: Magnus Karlsson Date: Wed, 31 Mar 2021 11:44:45 +0200 Message-ID: Subject: Re: [PATCH bpf-next 0/2] xsk: introduce generic almost-zerocopy xmit To: Alexander Lobakin Cc: Alexei Starovoitov , Daniel Borkmann , Xuan Zhuo , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Jonathan Lemon , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , KP Singh , Network Development , bpf , open list Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 31, 2021 at 1:17 AM Alexander Lobakin wrote: > > This series is based on the exceptional generic zerocopy xmit logics > initially introduced by Xuan Zhuo. It extends it the way that it > could cover all the sane drivers, not only the ones that are capable > of xmitting skbs with no linear space. > > The first patch is a random while-we-are-here improvement over > full-copy path, and the second is the main course. See the individual > commit messages for the details. > > The original (full-zerocopy) path is still here and still generally > faster, but for now it seems like virtio_net will remain the only > user of it, at least for a considerable period of time. > > Alexander Lobakin (2): > xsk: speed-up generic full-copy xmit > xsk: introduce generic almost-zerocopy xmit > > net/xdp/xsk.c | 33 +++++++++++++++++++++++---------- > 1 file changed, 23 insertions(+), 10 deletions(-) > > -- > Well, this is untested. I currently don't have an access to my setup > and is bound by moving to another country, but as I don't know for > sure at the moment when I'll get back to work on the kernel next time, > I found it worthy to publish this now -- if any further changes will > be required when I already will be out-of-sight, maybe someone could > carry on to make a another revision and so on (I'm still here for any > questions, comments, reviews and improvements till the end of this > week). > But this *should* work with all the sane drivers. If a particular > one won't handle this, it's likely ill. Thanks Alexander. I will take your patches for a spin on a couple of NICs and get back to you, though it will be next week due to holidays where I am based. > -- > 2.31.1 > >