Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2244603rwl; Thu, 13 Apr 2023 03:55:22 -0700 (PDT) X-Google-Smtp-Source: AKy350b5FEW7oV93llNBFesiYBotBFTUDfKvItFPrA8Z1oj8NwI8kn8UE5Z1iYhQ9MuynziXDmdc X-Received: by 2002:a17:906:2694:b0:925:1d1d:6825 with SMTP id t20-20020a170906269400b009251d1d6825mr2075999ejc.42.1681383321722; Thu, 13 Apr 2023 03:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681383321; cv=none; d=google.com; s=arc-20160816; b=zUE3Ma1hnJJui2jXjmnMrXlS/V9lAYWkOQ9o1hN4OIHjV8HRu0u5dBgjN1ZE4pi01D dtudNxAKq1XBoVz+4KjFScPHG0atQUaqohdeTgmzwyYKz9T2/nEdb9fhq/IFM24dPlKA TLWnTmzG0ZhCcYpHiguKXWhpKu8otCpyWHc7tAFoI7EZTVdiqiQb72iXOioegy/Srzu5 L+bTDm/8Zx5DQVCsakK7onklQkrK0ULN2C+4sWM/D6J6ZyVN5lysvQ2L0bOI8C8j8GBb 1TKsnIajD6FLWrfxqO+hH/nqPmxP0/RrsrmpWd9ZMVUWofUltnNQyLhfYAzUplBI3h9D M8Vg== 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=RxeMOwbpGENb+weUS3Q3c1MqA2boB5pRuOKSrr+VKMA=; b=AUkp5wmaX+a1yBg7Y3+YOcZgMc7dEmRHpAIJNbWYhuewUxN3790tJhBTK0bnX6kjLl /uiOa8y8zOLxy0kRMlWnchFRBX4TpWQfqjYs5/QNrWlpMG105CQC73WPzb9m7nZoC809 VI8dQJM0QXC/Y4SNZljABzhYnF6G6cS8dEQ6QejxNQd7hAhArMQuYpdXAvDQpz9zT+Ua 9c2XHxozKd/sUteXO9b/HpQicCf1RTURm0SfvRk+bkljPkUh5VeTwFcCx4cQ/FTDqNF+ c1zpQe/4UXCs1E0Nb0eWrjEEb9uusQnbRPXcj4vwjPixPDB3rb0C4vmmI2gG1yK2Ppqp 5FIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dectris.com header.s=google header.b=olAgFLXV; 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 fp29-20020a1709069e1d00b00930de1d9553si1683127ejc.16.2023.04.13.03.54.56; Thu, 13 Apr 2023 03:55:21 -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=olAgFLXV; 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 S229744AbjDMKvu (ORCPT + 99 others); Thu, 13 Apr 2023 06:51:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229819AbjDMKvr (ORCPT ); Thu, 13 Apr 2023 06:51:47 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC4292708 for ; Thu, 13 Apr 2023 03:51:37 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-50672fbf83eso1532338a12.0 for ; Thu, 13 Apr 2023 03:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dectris.com; s=google; t=1681383096; x=1683975096; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RxeMOwbpGENb+weUS3Q3c1MqA2boB5pRuOKSrr+VKMA=; b=olAgFLXV5pQj078BxZmSCdSLqKQ8QJvL1YxmQNcD4ubNdFmVEZtp0Tj+74ZMtWMOcI DE+D3UQfYz/CR4E02hxL+0SMwxIGuIjRO1xaMbbjRWm4tXfmZNgoQWlWlrPAoPHccj6O VWdvaFir8HjPgBX+IRWFrxCNRDsXY7R42iz1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681383096; x=1683975096; 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=RxeMOwbpGENb+weUS3Q3c1MqA2boB5pRuOKSrr+VKMA=; b=Af1NYGMX4f6x5Wck1f7x5a/d7o86WdDXVbGSXFlSFQ/akQ6PeqPvgBlwfCQiPM6oVx SAYjij5iWk6sg2GBG37twGAE2It/y5l8QTVuK7e4FWh1rbmEXfR2eSqZKWo5aV6Z8Yif EwGr9cJmxg5jiFwZIyy1Qz014Ne9294nino+KQc/8PwhjvURBd2oQ+JT7HBnw1FEMc6M J1xcRUc9Akelw+93Ljeb/5wDH+Q5SFdLz/MmXedQRDXKSwCm0G3PUE9IPigYvvEPCWP/ R9n4a/GVIRQX2eSTs+c3NPMUphJ+cUWhYjgZqNXKf9RAFzP3goKoUncNl7fDFvEQtucn 1+gw== X-Gm-Message-State: AAQBX9fmp1qUlSsvnEq3FpoavXFuorqLg2M5D07Mzbs+2M1qlTp2rfaA hbtTGbOHn0PimvxTUSkskHH/9/3W2HuTyFFuijRGgA== X-Received: by 2002:a50:bb25:0:b0:502:7551:86c7 with SMTP id y34-20020a50bb25000000b00502755186c7mr738815ede.4.1681383096281; Thu, 13 Apr 2023 03:51:36 -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> In-Reply-To: <875ya12phx.fsf@toke.dk> From: Kal Cutter Conley Date: Thu, 13 Apr 2023 12:56:20 +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,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 > > 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. :-) In 30 years when everyone finally migrates to page sizes >= 64K the maintenance burden will drop to zero. Knock wood. :-) > > 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.