Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp346506pxf; Wed, 31 Mar 2021 05:03:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwAe+0uu8N+AW+Of4uJ00djicYj8hz3YUKThAkzqJnP1z9mYzuAq7xx8vsAKl4uhNFifm8 X-Received: by 2002:aa7:c916:: with SMTP id b22mr3291334edt.299.1617192210304; Wed, 31 Mar 2021 05:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617192210; cv=none; d=google.com; s=arc-20160816; b=BzNtjt4Jg7MaKsR6U1+anGt4DY3TqoDobD6qSKxzFsi+O4IF2Kxc5nEhwbX9PMgmud HYXvPfsP6zPwT2tANyzlVqwonDQ+jiTlmigZDEDujZgmidADxPFQhZSmalLQQOlkJtdP cKOiu8e6hPtmLqLoqpGf/3jjnk1w7AsXy5ZsHRtpQ8NYsEYYIpwVrq14ghtxAr1jOTHv DapXKDTh1ufnyJ9A8M77/aUhVzEe/g8N8f90TMD1fca+tBeIFaFGBbWVqggw9a3lbwih seyoqu6JaNOQfX7543UbcRDYkjcrgUBs1M8OhfwaGFj/RmNuiA3QdVu7iCEcz5skHfst KxCw== 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:reply-to:cc:from:to :dkim-signature:date; bh=z8CUaRMV+W1DdXAmNRPxHigof0va9uxxc3ghbazANQw=; b=Bmm1dCaafhQZICKntMsKcZmg0Ward+eMrpSa3dS9uXgj0EEbe0pUrS+xHvqPDUh0G3 qpdjXTTm7lyTneCISmbohaWU2w/52aYEzRg/jrC5oOyR+l3rRDvzQRVU56F279D9QRjJ TdtNf2bn7n+yDhFyUqg7JVupJwDNTh89V6FPK4NOmauagmzGtMDatiMduIgeKph1GbGy V7bAR8N8m4Hu//YBlLthwH5Vgo/qf8aB9Sx2XLEyrxPYdKKutf7HBQhX2qnByWq5hT97 MhGpXwHpKAev8skOCsbVkTFNXoQ9gnnwWvY9SveAGhar0FTcd8ycvHAoTrRnDHbFj0Ao Q/VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=lZ9Y2+Rx; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si1521055edc.296.2021.03.31.05.03.05; Wed, 31 Mar 2021 05:03:30 -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=@pm.me header.s=protonmail header.b=lZ9Y2+Rx; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235321AbhCaMCD (ORCPT + 99 others); Wed, 31 Mar 2021 08:02:03 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]:52010 "EHLO mail-40131.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235035AbhCaMBf (ORCPT ); Wed, 31 Mar 2021 08:01:35 -0400 Date: Wed, 31 Mar 2021 12:01:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1617192093; bh=z8CUaRMV+W1DdXAmNRPxHigof0va9uxxc3ghbazANQw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=lZ9Y2+Rx9IMXJGyzGR1r8fCec6Hg5fzSGRUVXr+KqhJO2JmCyO/h1DrmLR0u3kV8E 8NbVOmjwBLwIxjYnWpeoSXgfZ8meMiqtFXZmSq4Sp9WeHtTG7uknH02cIha4dUxCEO s5xMMYX9SFqoKZs/1n+t+DSs22IvE1dQrKRXpX45sUI7rLQ4To1kqPgaH0fcuKb77S Ir/QdFpJRPFPW6RYkq4Hs+yLKhiUEEFGMkttnRr3kCTUQ6Tsi7Dn6xOuA5v+PH09yU WFPNnfLn2C19CgASzQoNrNSLUdSq2k1vyduxgsvlM9mORR+llDW8xiTZpzlrXgABad Uhfl9AhYp5zUw== To: Magnus Karlsson From: Alexander Lobakin Cc: Alexander Lobakin , Alexei Starovoitov , Daniel Borkmann , Xuan Zhuo , =?utf-8?Q?Bj=C3=B6rn_T=C3=B6pel?= , 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 Reply-To: Alexander Lobakin Subject: Re: [PATCH bpf-next 0/2] xsk: introduce generic almost-zerocopy xmit Message-ID: <20210331120116.2671-1-alobakin@pm.me> In-Reply-To: References: <20210330231528.546284-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Magnus Karlsson Date: Wed, 31 Mar 2021 11:44:45 +0200 > 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. Thanks a lot! Any tests will be much appreciated. I'll publish v2 in a moment though, want to drop a couple of micro-optimizations. > > -- > > 2.31.1 Al