Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C43FC64EC4 for ; Fri, 3 Mar 2023 10:40:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229908AbjCCKkB (ORCPT ); Fri, 3 Mar 2023 05:40:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjCCKj6 (ORCPT ); Fri, 3 Mar 2023 05:39:58 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7086614485 for ; Fri, 3 Mar 2023 02:39:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677839950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/ZYISymnHUJzQ9oGrozV91eykhzhId/Ob9/Pj/GYOnU=; b=hyjGT557X7VACNKsyfzpzz5wJXZxGtv8D7YIKCcHo8JGcKvlFgQ45hoDLs9c7cMl7SpAro SjEWsf96SW0pDfSN+hua1qJ+qTmeyJeLQ2Z8jJRbFmUFh+88Yn3zYuuNQ90AJPC4CI41WZ DOQDknR86xssLrMPKNl24FCLDY89tEQ= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-KrH6z7niP_6uLiVX-FKJZg-1; Fri, 03 Mar 2023 05:39:09 -0500 X-MC-Unique: KrH6z7niP_6uLiVX-FKJZg-1 Received: by mail-ed1-f69.google.com with SMTP id r6-20020aa7c146000000b004acd97105ffso3348750edp.19 for ; Fri, 03 Mar 2023 02:39:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/ZYISymnHUJzQ9oGrozV91eykhzhId/Ob9/Pj/GYOnU=; b=kQapA+puQsANFfs7TsUMiQ89mvuD5EjuknTj1RPebMe6BXx9Ls9eDNbj6ehaSbKozC 2tUb/0iipbLpXQ0NvjkvDsuBoA+vADUDj+TjNaJ2az92SVvFSvZQX5k4PJ+xX2llGtOL 4N7ZydWGxk5Rs1LRcGMS65fzAWWbuHVaJKMABf/OZYtiOs7t6BThVrkKfhr9DuZsgIG2 TYV4yDDDTUIAB70dAFbFrngS5kdZkMlrmTTaImFPJBuecd4Mx51dOLIprFibVYNel1CR VpawXf+s8dBk+U20I4wkuw6OQAi/QpRBZcLyfnH2aLEgDf2aFBLsOnizCrhcSIxbx6dQ vF/g== X-Gm-Message-State: AO0yUKVyHnfcgLVHbggU7n9NcrFiQQh1onPQee6awqMdj9qWpM01X7vw 4kcrdqlhZtSUseL3fUZCQkKAKdFyRI21lvnTv4aumQySETc9ZinJ/YGoDLekQatJoh1ibY+Es7d btD9Ud4N5NhiNB8OpRtOorS+k X-Received: by 2002:a17:906:d0ca:b0:88d:ba89:183a with SMTP id bq10-20020a170906d0ca00b0088dba89183amr4943407ejb.11.1677839948355; Fri, 03 Mar 2023 02:39:08 -0800 (PST) X-Google-Smtp-Source: AK7set8plnpvyHVS2XtWbo4Yk9SK76K0Al5X/5xZLNnTMe4Kr7DlrMRSAMoG9vBm5d4bxXIduPqHdQ== X-Received: by 2002:a17:906:d0ca:b0:88d:ba89:183a with SMTP id bq10-20020a170906d0ca00b0088dba89183amr4943389ejb.11.1677839948109; Fri, 03 Mar 2023 02:39:08 -0800 (PST) Received: from [192.168.42.100] (nat-cgn9-185-107-15-52.static.kviknet.net. [185.107.15.52]) by smtp.gmail.com with ESMTPSA id h17-20020a170906399100b008d1dc5f5692sm808927eje.76.2023.03.03.02.39.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Mar 2023 02:39:07 -0800 (PST) From: Jesper Dangaard Brouer X-Google-Original-From: Jesper Dangaard Brouer Message-ID: <22ca47ca-325f-f4df-af5d-344be6b372d8@redhat.com> Date: Fri, 3 Mar 2023 11:39:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Cc: brouer@redhat.com, Maciej Fijalkowski , Larysa Zaremba , =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , Song Liu , Jesper Dangaard Brouer , Jakub Kicinski , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH bpf-next v1 0/2] xdp: recycle Page Pool backed skbs built from XDP frames Content-Language: en-US To: Alexander Lobakin , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau References: <20230301160315.1022488-1-aleksander.lobakin@intel.com> In-Reply-To: <20230301160315.1022488-1-aleksander.lobakin@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/03/2023 17.03, Alexander Lobakin wrote: > Yeah, I still remember that "Who needs cpumap nowadays" (c), but anyway. > > __xdp_build_skb_from_frame() missed the moment when the networking stack > became able to recycle skb pages backed by a Page Pool. This was making ^^^^^^^^^ When talking about page_pool, can we write "page_pool" instead of capitalized "Page Pool", please. I looked through the git log, and here we all used "page_pool". > e.g. cpumap redirect even less effective than simple %XDP_PASS. veth was > also affected in some scenarios. Thanks for working on closing this gap :-) > A lot of drivers use skb_mark_for_recycle() already, it's been almost > two years and seems like there are no issues in using it in the generic > code too. {__,}xdp_release_frame() can be then removed as it losts its > last user. > Page Pool becomes then zero-alloc (or almost) in the abovementioned > cases, too. Other memory type models (who needs them at this point) > have no changes. > > Some numbers on 1 Xeon Platinum core bombed with 27 Mpps of 64-byte > IPv6 UDP: What NIC driver? > > Plain %XDP_PASS on baseline, Page Pool driver: > > src cpu Rx drops dst cpu Rx > 2.1 Mpps N/A 2.1 Mpps > > cpumap redirect (w/o leaving its node) on baseline: > > 6.8 Mpps 5.0 Mpps 1.8 Mpps > > cpumap redirect with skb PP recycling: > > 7.9 Mpps 5.7 Mpps 2.2 Mpps +22% > It is of cause awesome, that cpumap SKBs are faster than normal SKB path. I do wonder where the +22% number comes from? > Alexander Lobakin (2): > xdp: recycle Page Pool backed skbs built from XDP frames > xdp: remove unused {__,}xdp_release_frame() > > include/net/xdp.h | 29 ----------------------------- > net/core/xdp.c | 19 ++----------------- > 2 files changed, 2 insertions(+), 46 deletions(-) >