Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2264719rwl; Thu, 13 Apr 2023 04:11:59 -0700 (PDT) X-Google-Smtp-Source: AKy350ZY9zo4I/wG8pVVmtn0+R+o0mBA+xDmCB+epv/Vyka9BYjDbXcAudp5mHMsrUn9xMEMkmUo X-Received: by 2002:a17:903:32cd:b0:1a6:4fbd:d5c0 with SMTP id i13-20020a17090332cd00b001a64fbdd5c0mr2365468plr.53.1681384318609; Thu, 13 Apr 2023 04:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681384318; cv=none; d=google.com; s=arc-20160816; b=fuWCqAPWe6q0FxX/rM3wWEbDDlBIoypOo9zbKgATGivl/CSMn/kOnyL+T1SXAW6XjG gllwW4BaB7DRI2vLY2oyUpV7BwYIyA3UNDp9J9wyAEZymyD1wdIspWrP+f+V56/64XSs yfdIkvDZHqw+XoXF5D/lsiNZO04TU3TDVbP7T1r7nmMhXrw3NA0Sa6TT4qrjhVrZJtk2 Pv0AyfOOfZYSzG8G1qyDNY72X2XXcwxXLunfPCyS/khzt7TR7X+WnthzC3uBB4BSvM7V 3h06SQQR0v4wtazeO9cToF3kCwpHwDPESJ3dGvGtPCJTklYylbHxgNC1caeHQ1MahqWq /Dcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=ons+PEhg040VlXg4ZxDtxYCBN3ktVKjiFeoBkktxpTo=; b=hMYgcsLCNLNYNjI0dEULAJ1IoOcLPPulhs7p5KZkUPpyPrsdi9z1zcjmj0JqokxMyC q4lxpufMnClr3gnkf5Fuq7nf0XhvN0o4AH8UPsFazh7NdiHpRo92s3GlxmUz/AXVjkIM 3hNoynh+b5S+OFXrBSx6HJmyuv1mYKWZvYA0TdLUmRFAhjFdaZw6YUrPkgyb4WGIUNip AOI5tqmsuNomKUcriUWgPgQ1fdZ3BQhI7EpfewnR/Wal2TkfCiwqvQBdeIn3cBtFXP8C Odrr2z0jh5TOFbta0cCgE6I0leNb5d0WuUjhmTBGNOTCYzqT6pb3RBQR72RnlrGmOxCK Eq0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PLvsX63E; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij16-20020a170902ab5000b001a6825fe670si1739798plb.6.2023.04.13.04.11.47; Thu, 13 Apr 2023 04:11:58 -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=@redhat.com header.s=mimecast20190719 header.b=PLvsX63E; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229841AbjDMLJi (ORCPT + 99 others); Thu, 13 Apr 2023 07:09:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbjDMLJh (ORCPT ); Thu, 13 Apr 2023 07:09:37 -0400 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 51A535FDE for ; Thu, 13 Apr 2023 04:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681384128; 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: in-reply-to:in-reply-to:references:references; bh=ons+PEhg040VlXg4ZxDtxYCBN3ktVKjiFeoBkktxpTo=; b=PLvsX63EtfHdh6Uo0rQIaDMwV2Gd70q/9/nu7PKmHRRIZCPa4Ngyz+CRNw65jQJ1vvlciE 0A7WBuIY7tAckkexyixR7i+nL7fmM3w+miCDjNi+CP3OFKwsMjyxKJAtkJkx61nemEmYEc wg+RXZ1lwTMEaN7u1YZLNO69a1fEnIM= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-611-vSZGLMRiPN23P9SVWozMYA-1; Thu, 13 Apr 2023 07:08:47 -0400 X-MC-Unique: vSZGLMRiPN23P9SVWozMYA-1 Received: by mail-ed1-f70.google.com with SMTP id o3-20020a509b03000000b00504af7490ecso5960277edi.15 for ; Thu, 13 Apr 2023 04:08:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681384126; x=1683976126; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ons+PEhg040VlXg4ZxDtxYCBN3ktVKjiFeoBkktxpTo=; b=fcyGVOftM3LsH2M9xFheFXQsK4uGABuK5IYf/Xo7WLE/tXjIJKCpFnuN9R9TsBBhQf x9MvJhQmbvauCyH8+8pkdx8BXln1aUs6j8njHJ+7f50Yb/ubfNMs+tsO5XVCMG9b8mr3 pfY2jFeC5bJVZdpu5YDdiv8styEpyE4Hx/em2HKNnsokqFvq7iNPTWEbPiTjwi5/GZFV 4mB6PfW5NxY/aHlMS3xvY5zOH1dcJ5xTn2hy2P5jBMpGrPwaxK8u5SBhb3PCAJBpSV2C RpLJItJREe2VUUUf++rmsdwZg4Sbd9Fpt0wf24Dl8xUobPc5zA8Ma8L4dB7NO2rPmKwN ft+Q== X-Gm-Message-State: AAQBX9cD/B4Uk82/brvTa5Peg2M95w/cMIBrsgopCYvizJmlk7KXewFt SBwI6KX9u8XJZVSwVTmiZCQmz2Bh6eW1N1LjDNof9HTActNKpFsv0pZIz4n291yKmnBhbcASOAV E0jjo6/YK0mfwvKpEDEOg96OT X-Received: by 2002:a17:906:3888:b0:94a:8a82:9cab with SMTP id q8-20020a170906388800b0094a8a829cabmr2301562ejd.42.1681384126118; Thu, 13 Apr 2023 04:08:46 -0700 (PDT) X-Received: by 2002:a17:906:3888:b0:94a:8a82:9cab with SMTP id q8-20020a170906388800b0094a8a829cabmr2301525ejd.42.1681384125710; Thu, 13 Apr 2023 04:08:45 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id m5-20020a1709062ac500b0094a84462e5fsm827249eje.37.2023.04.13.04.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Apr 2023 04:08:45 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 95816AA7AF0; Thu, 13 Apr 2023 13:08:44 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Kal Cutter Conley Cc: Maciej Fijalkowski , =?utf-8?B?QmrDtnJu?= =?utf-8?B?IFTDtnBlbA==?= , 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 Subject: Re: [PATCH bpf-next v3 1/3] xsk: Support UMEM chunk_size > PAGE_SIZE In-Reply-To: References: <20230406130205.49996-1-kal.conley@dectris.com> <20230406130205.49996-2-kal.conley@dectris.com> <87sfdckgaa.fsf@toke.dk> <875ya12phx.fsf@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Thu, 13 Apr 2023 13:08:44 +0200 Message-ID: <87ile011kz.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 Kal Cutter Conley writes: >> >> Well, I'm mostly concerned with having two different operation and >> configuration modes for the same thing. We'll probably need to support >> multibuf for AF_XDP anyway for the non-ZC path, which means we'll need >> to create a UAPI for that in any case. And having two APIs is just going >> to be more complexity to handle at both the documentation and >> maintenance level. > > I don't know if I would call this another "API". This patchset doesn't > change the semantics of anything. It only lifts the chunk size > restriction when hugepages are used. Furthermore, the changes here are > quite small and easy to understand. The four sentences added to the > documentation shouldn't be too concerning either. :-) Well, you mentioned yourself that: > The disadvantage of this patchset is requiring the user to allocate > HugeTLB pages which is an extra complication. 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... > In 30 years when everyone finally migrates to page sizes >= 64K the > maintenance burden will drop to zero. Knock wood. :-) Haha, right, but let's make sure we have something that is consistent in the intervening decades, shall we? ;) >> It *might* be worth it to do this if the performance benefit is really >> compelling, but, well, you'd need to implement both and compare directly >> to know that for sure :) > > What about use-cases that require incoming packet data to be > contiguous? Without larger chunk sizes, the user is forced to allocate > extra space per packet and copy the data. This defeats the purpose of > ZC. What use cases would that be, exactly? Presumably this is also a performance issue? Which goes back to me asking for benchmarks :) -Toke