Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp5233324rwe; Tue, 18 Apr 2023 04:10:35 -0700 (PDT) X-Google-Smtp-Source: AKy350ZRoWY57HEG3ZFs/Dlq7i9Metg+lbpaDruyZg4CRcWEls3L8dBDF5q7vCQpz+t3jC8MmRh1 X-Received: by 2002:a05:6a00:240a:b0:639:435:1373 with SMTP id z10-20020a056a00240a00b0063904351373mr23933644pfh.10.1681816235651; Tue, 18 Apr 2023 04:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681816235; cv=none; d=google.com; s=arc-20160816; b=NV8vnpoWm/A20QqNNviVwuNCz2NDGL0d+RJEQ+4SRvDgD0vdXn1kwSuAVV+3J7fH7c jsdUA0+Krh1joZQkrm+/1bbCvLs3ZokMaWY+oVvhzLsggkoWAEgnZ9ZHKc6v+1vy3+U7 q/LjLZDR+dqOForW95x2oyo6f/NJOWeh/oBcZPISf5xlQIX8TsYdyma2pH9XBqU1g34B CTxOjDVwEGvoQfIydZ8RP/3H/gLGoshfwMmf8sPBdQvq0H8yOctu+1f/XgKNZaNgCDLx Gd9JgPtOsJQOUkO6GJttyudyxux0ntqGPiWaKi3jle0LTAKko6UkE0lBxuqvOWJhJUoo v6zw== 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=YbMGtsMl4LpEBDeV5WLUhPfH8r/0zxNhz5yfYBfk980=; b=vYPVThYxOm5PaH2nacPBNb0f2XzQt3XN/01ddPH/v0mheWBwA4YB3Z7NwSiAxtd7y5 2yE1jjnJwpm3/6GVKEsgtNTIVa3ySxpLX8qUDejTWw7uYbpcc7U1xkii59agw67LNoQB WJ+G6xJ+G49a/xe+RVJoVowHDAOIypw3NJlxXiWH60zg9IPLFVaR2NpRdhIPk1kZ0BV4 hZ2FXKIEEnck//u0c0Ep3kj3tJEYBiTprWzD8Uw8W2b/IT1nCK8s1GV5fS2b+wqyfDVk DBo69W9gGCu9pHrNHCZwdAFc2SHiP/bjtCnVat9Arcj8JU/y8CuEuWP7rJrIDVbSDN0G 1ycA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dectris.com header.s=google header.b=cwpsX1sZ; 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 g128-20020a636b86000000b0050bf22172d3si14241798pgc.490.2023.04.18.04.10.21; Tue, 18 Apr 2023 04:10:35 -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=cwpsX1sZ; 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 S231221AbjDRLHb (ORCPT + 99 others); Tue, 18 Apr 2023 07:07:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbjDRLHX (ORCPT ); Tue, 18 Apr 2023 07:07:23 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0E3F8690 for ; Tue, 18 Apr 2023 04:07:17 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id fw30so19327708ejc.5 for ; Tue, 18 Apr 2023 04:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dectris.com; s=google; t=1681816036; x=1684408036; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=YbMGtsMl4LpEBDeV5WLUhPfH8r/0zxNhz5yfYBfk980=; b=cwpsX1sZICDQqgYMD9UDCYwC4hVap3RpdtRCdrJvDs1rxJ+1QvV22hoQpr7Q6GV5QX ABxPlXFqSpoPY4lYYBxsayodX8bymIE+Ga+pjI9ZPJohoNpAy5AJ6NxGGRRDxHxcjFYK lDGJwKBkcoXQl+dQAEa6c++cqj6Z0VCBUfzLs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681816036; x=1684408036; 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=YbMGtsMl4LpEBDeV5WLUhPfH8r/0zxNhz5yfYBfk980=; b=cGUJDfThvFPiujdLXcOYtRJovwDrQ5Dm8qzHw8V5ojKRWDbKk1PCU430BIizTPS1M3 Q1j3+VK4SkguvCW2MfinULOoNodSHtU+O6TG2Mtv2kmK6XVrvbspTIgCxWERYGxSof9A p9sRZ2ED3z6zQvKHNArCQ/u4ZrNba7izIDY0nPrb9in5SeY3+BbGlf1V859n5uunxYYh wn/Vy2Hf/mviVfqTNu8guVPS3jjTriL6revg84/9xGu6kcAIyRw+ZL9PScGynFx5S5Ab ofjThs82+mBrE8NRziDk/URqR7o017d0z6sIiofHSEbshe9SDdPhh4U+EE1X00Gdt0B1 N0dQ== X-Gm-Message-State: AAQBX9cBTDE/V3lX05NcECGUrybHi+hNLCwOjGko1CB7fhxXlRlHgtcd PFAYGHGKCgagi6y6rhpoTz03WgkiMxSPK8sXp6mbW6fXWjQWqphESzrzDw== X-Received: by 2002:a17:906:af1a:b0:8b8:aef3:f2a9 with SMTP id lx26-20020a170906af1a00b008b8aef3f2a9mr4546919ejb.0.1681816036230; Tue, 18 Apr 2023 04:07:16 -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> <875ya12phx.fsf@toke.dk> <87ile011kz.fsf@toke.dk> <874jpdwl45.fsf@toke.dk> In-Reply-To: <874jpdwl45.fsf@toke.dk> From: Kal Cutter Conley Date: Tue, 18 Apr 2023 13:12:00 +0200 Message-ID: Subject: Re: [PATCH bpf-next v3 1/3] xsk: Support UMEM chunk_size > PAGE_SIZE To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Cc: Maciej Fijalkowski , =?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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 > >> In addition, presumably when using this mode, the other XDP actions > >> (XDP_PASS, XDP_REDIRECT to other targets) would stop working unless we > >> add special handling for that in the kernel? We'll definitely need to > >> handle that somehow... > > > > I am not familiar with all the details here. Do you know a reason why > > these cases would stop working / why special handling would be needed? > > For example, if I have a UMEM that uses hugepages and XDP_PASS is > > returned, then the data is just copied into an SKB right? SKBs can > > also be created directly from hugepages AFAIK. So I don't understand > > what the issue would be. Can someone explain this concern? > > Well, I was asking :) It may well be that the SKB path just works; did > you test this? Pretty sure XDP_REDIRECT to another device won't, though? > I was also asking :-) I tested that the SKB path is usable today with this patch. Specifically, sending and receiving large jumbo packets with AF_XDP and that a non-multi-buffer XDP program could access the whole packet. I have not specifically tested XDP_REDIRECT to another device or anything with ZC since that is not possible without driver support. My feeling is, there wouldn't be non-trivial issues here since this patchset changes nothing except allowing the maximum chunk size to be larger. The driver either supports larger MTUs with XDP enabled or it doesn't. If it doesn't, the frames are dropped anyway. Also, chunk size mismatches between two XSKs (e.g. with XDP_REDIRECT) would be something supported or not supported irrespective of this patchset.