Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2250476rwl; Sat, 8 Apr 2023 10:35:24 -0700 (PDT) X-Google-Smtp-Source: AKy350aWX0+X+F0I63uXQX3PYiVNfSPJbs+rFtos6CHgqccqsoP7QIsDzHhFqqFJ94KKr73NHfrs X-Received: by 2002:a17:90a:e7c3:b0:233:f786:35ca with SMTP id kb3-20020a17090ae7c300b00233f78635camr3324184pjb.35.1680975324412; Sat, 08 Apr 2023 10:35:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680975324; cv=none; d=google.com; s=arc-20160816; b=pZL+5Qoto3YsOh5DA6jT5POL3ywOD0g9mtV+17wN7O6N/G74eL8i5BYSd2/dnBOjjP zc+VjJwGLkx2hv5gsPcsum9IMYl15FIWzdqOgzJ+ipACLMfZ0dPJInsPFuXu4woMMuo0 l8EfoWDwi0GBT6R4E4D7UNvLXfW2LYKIUBx8gwZMfExEs4kOPhrsYKabo95DYhIwk37H ksqLZzEvD/mjGzC5xilnBZTBwhA9jF+020Bs/CGS1NFyGGllojEFvU54SeceIVNfF1N2 me6g+18OaJw9/XcGawoRbnWR7ycSUrsYN/sI4/3BuFAZbPZ6l8dWGsqyqAG5zAM37PsN cCWQ== 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=RWnk3r/ZKxNzmFwcfRG9jBXukIQvdhKh3XXK8OCGzWM=; b=xsQG0dyD++VhHD46uFmhph3yEpN7utDcR/iTn5ukhLUExl6cUHzGJDJVFW/k/1pHM3 1R2lPJH89KUJ/8tCiOlg0262PAj8fDCfXi+WFtxxjJuJxapXJ5otv84e5dh3PHBcUdKx 2Bgmt9QmOzdWglHHOkDxC7N09qt5T1fuzpnpTG4Pf6IwQS/2ZdQtepmuXpJgAp5UgH5l wx4hy0AUxGbKiQ0d+ViqCAuUAMbFwri1ClrqgvfSvCVetWiAbGNqlLd+2lx+4u+jqVdc dpLCgoRlwCdXHMIBajCMrjksx6WM2ljLYnwaf4Jsn8cQKl24g4U5ahHp57UTGPAv8Tdo 5TLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dectris.com header.s=google header.b=hxNr1hoZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dectris.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e65-20020a636944000000b0051394ccd19csi6487653pgc.55.2023.04.08.10.35.11; Sat, 08 Apr 2023 10:35:24 -0700 (PDT) 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=@dectris.com header.s=google header.b=hxNr1hoZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dectris.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229785AbjDHRde (ORCPT + 99 others); Sat, 8 Apr 2023 13:33:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229724AbjDHRdd (ORCPT ); Sat, 8 Apr 2023 13:33:33 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27C7B77C for ; Sat, 8 Apr 2023 10:33:30 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-94a342ef3beso31174166b.0 for ; Sat, 08 Apr 2023 10:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dectris.com; s=google; t=1680975209; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RWnk3r/ZKxNzmFwcfRG9jBXukIQvdhKh3XXK8OCGzWM=; b=hxNr1hoZmnIwnoHDVcv2GhaPllcDjvLoN2jZN8CM1AHISKYHraI4fV2JwMFp4ynCkn xaN5OlVRG1OxJF8YhhLjWK72UFhQ4xF9KAOtxG2eTTTUnY5ZFWLUt1D+01uZOa++Rb8J PNd8doDgVbKoUmFfFD9gE0gQM8aBb/wHYeqKw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680975209; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RWnk3r/ZKxNzmFwcfRG9jBXukIQvdhKh3XXK8OCGzWM=; b=l36RsKPkihgPFoclXQaVd/chJItauQLcx+ZdnPT9nU2tCbg0+ZThe27oWJXo0hmC0a puDFZ9giG41oWlJXb3VCtsU6DE3jBcsn2OqBHyA9HoQXIhiK5lUX86/cSPB8vOZzyZPG 6hqTeEGrmtyydBXNvzol8S0uVCnmEvdehWccYk+VUyeDRQGZmuGX9xmRwLNK7gOluVZT GTgqHYY2ltGW1irmGbpL3MM8GsNG3kXWd63ajNychO4oSkoHGXQmJ1QOxR6zTKbDCjXo VobRjy7MD9a6uJo9T7JMO2vCPJ5ghM0brGK+4L8h4GnnhNhGqFS8IH16fSYoKzC3HhD+ LKzQ== X-Gm-Message-State: AAQBX9cnaGJzCjm8dcobzu05uiZYOzVwVK3TKZxnCL2SuVzWu3kX0+n4 CQNEwTwBSpEHuns9TT4fkQLtbPYflAspll0tbGo9NQ== X-Received: by 2002:a50:ba8d:0:b0:4fb:e0e8:5140 with SMTP id x13-20020a50ba8d000000b004fbe0e85140mr3140178ede.6.1680975209172; Sat, 08 Apr 2023 10:33:29 -0700 (PDT) MIME-Version: 1.0 References: <20230406130205.49996-1-kal.conley@dectris.com> <20230406130205.49996-2-kal.conley@dectris.com> <87sfdckgaa.fsf@toke.dk> In-Reply-To: From: Kal Cutter Conley Date: Sat, 8 Apr 2023 19:38:09 +0200 Message-ID: Subject: Re: [PATCH bpf-next v3 1/3] xsk: Support UMEM chunk_size > PAGE_SIZE To: Maciej Fijalkowski Cc: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Jonathan Lemon , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 > > > Add core AF_XDP support for chunk sizes larger than PAGE_SIZE. This > > > enables sending/receiving jumbo ethernet frames up to the theoretical > > > maxiumum of 64 KiB. For chunk sizes > PAGE_SIZE, the UMEM is required > > > to consist of HugeTLB VMAs (and be hugepage aligned). Initially, only > > > SKB mode is usable pending future driver work. > > > > Hmm, interesting. So how does this interact with XDP multibuf? > > To me it currently does not interact with mbuf in any way as it is enabled > only for skb mode which linearizes the skb from what i see. > > I'd like to hear more about Kal's use case - Kal do you use AF_XDP in SKB > mode on your side? Our use-case is to receive jumbo Ethernet frames up to 9000 bytes with AF_XDP in zero-copy mode. This patchset is a step in this direction. At the very least, it lets you test out the feature in SKB mode pending future driver support. Currently, XDP multi-buffer does not support AF_XDP at all. It could support it in theory, but I think it would need some UAPI design work and a bit of implementation work. Also, I think that the approach taken in this patchset has some advantages over XDP multi-buffer: (1) It should be possible to achieve higher performance (a) because the packet data is kept together (b) because you need to acquire and validate less descriptors and touch the queue pointers less often. (2) It is a nicer user-space API. (a) Since the packet data is all available in one linear buffer. This may even be a requirement to avoid an extra copy if the data must be handed off contiguously to other code. The disadvantage of this patchset is requiring the user to allocate HugeTLB pages which is an extra complication. I am not sure if this patchset would need to interact with XDP multi-buffer at all directly. Does anyone have anything to add here? What other intermediate steps are needed to get to ZC? I think drivers would already be able to support this now? Kal