Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6597704rwr; Tue, 9 May 2023 18:22:19 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vcC7jjY8IgFiDBnFCNqCNT1NEcfwkQNys4DS7r3Z5i4sJvb94Mz2AnkbpAsFQ36OaCnzB X-Received: by 2002:a05:6a20:3d06:b0:100:900f:74a5 with SMTP id y6-20020a056a203d0600b00100900f74a5mr10181820pzi.56.1683681739593; Tue, 09 May 2023 18:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683681739; cv=none; d=google.com; s=arc-20160816; b=AQklJtP5CkEpApKeRg9w95FxNcYd5aTSwR9XqAQCkElV4UE46JJZoOWLx3S0WKhZym tGRthgacwC/w2y2CpUvCVr7hf3uhw4bHaRe08zyH4UZR5xp/cXDaPt0jHtHVdaosQVfD D3Rj8R0OsKf0lS9XevyX1Fd56Zi8TqvkG92ErbuCLKyfOzf0aiTBdMte/8em+zZD35ZY pLjenB+XcmQoq6hg3SfrwrolokOBjp0uGR5K0rKVHFf8BzZdtmUBKiQRsRRpyClvk5Xi WgbSk1XqepZ6yaszsd6qAyyP67Xadn+Pj+sQhbg06I6q7mYjnes/nyMh9bvdgajPFlS4 1ruQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=sH0JeD/bcdcmhpcfEmhA/XEQ2KSGRrhtNWvG1pOHUtQ=; b=dMTpXydN9KmcZe1a8gxPT1+YNQJo6NKCjnMvNRqaSK2J+fa1GhU7yUDg7Z64SbTN5c OZr/IK1ig5oYe6wvmSvD3Wq5bCcKhApzeZJKptgBW6Mr/kcuzhEta8RY7JCXS8ixpBy7 OhUe2Qiaav1EUl11fk+5kn4sYWeohz4+FUDQvWvNly+NNKMFiE2lE1HSlM4NG0bZGxHX SNIH5S0/87qKLOeQQWoUK5MeG98zxTY0TUZwYqxKBbLhES7OrtvAA4/TTxcY7fNk1EGB MPa1ovJIFL1ohjZ/vkR2Ng1WWxEuoljOmxr6cjP8D92GYzeZMUnsW0AQE0ZhtskmjnqE 1oXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=czAzhJz1; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h191-20020a6383c8000000b0052c4331ea8dsi1889232pge.27.2023.05.09.18.22.02; Tue, 09 May 2023 18:22:19 -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=@kernel.org header.s=k20201202 header.b=czAzhJz1; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229770AbjEJBBB (ORCPT + 99 others); Tue, 9 May 2023 21:01:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjEJBBA (ORCPT ); Tue, 9 May 2023 21:01:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F54044AB for ; Tue, 9 May 2023 18:00:59 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2BD0B60919 for ; Wed, 10 May 2023 01:00:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31D20C433EF; Wed, 10 May 2023 01:00:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683680458; bh=UrItQrnIMs0ms+sPI5j1Hu3+52mp5ohTLkaAWkiKzsk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=czAzhJz1NBrHhvesrdhXOCzsPF9NJZpM9KBiimBJlbeaxSioAxPsw+6MiK98vLaIs XdTCRCA86ZY++2JbcBUu3ufVxu+Lzbed6dWiINr+54ORspK4L3MyKg+ihC19tebi/W Uq+0Ld0ShNXVeEJgzjwH3LV/5VzXqQT23pbAd2XMK/whPMnaNH/2ZNuj3wACoRaQOh zuSp+a0x/1uQwTnjOhXQPdz1YC7sHLmFfEo45Io6eJvYKEzKnKWCgtp/CvllHKBJuJ n1BsugIZieX0ezP4aa8h9AN7u773S8wvcu9vikdnCjKjY02f8O1bgteL/WPRNK13dW GMx0ojJFX9J6g== Date: Tue, 9 May 2023 18:00:57 -0700 From: Jakub Kicinski To: Yunsheng Lin Cc: , , , Subject: Re: [PATCH net-next v1 0/2] introduce skb_frag_fill_page_desc() Message-ID: <20230509180057.1fc252c7@kernel.org> In-Reply-To: <20230509114337.21005-1-linyunsheng@huawei.com> References: <20230509114337.21005-1-linyunsheng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 On Tue, 9 May 2023 19:43:35 +0800 Yunsheng Lin wrote: > Most users use __skb_frag_set_page()/skb_frag_off_set()/ > skb_frag_size_set() to fill the page desc for a skb frag. > It does not make much sense to calling __skb_frag_set_page() > without calling skb_frag_off_set(), as the offset may depend > on whether the page is head page or tail page, so add > skb_frag_fill_page_desc() to fill the page desc for a skb > frag. > > In the future, we can make sure the page in the frag is > head page of compound page or a base page, if not, we > may warn about that and convert the tail page to head > page and update the offset accordingly, if we see a warning > about that, we also fix the caller to fill the head page > in the frag. when the fixing is done, we may remove the > warning and converting. > > In this way, we can remove the compound_head() or use > page_ref_*() like the below case: > https://elixir.bootlin.com/linux/latest/source/net/core/page_pool.c#L881 > https://elixir.bootlin.com/linux/latest/source/include/linux/skbuff.h#L3383 > > It may also convert net stack to use the folio easier. > > RFC: remove a local variable as pointed out by Simon. Looks like you posted this 3 times and different people replied with their acks to different versions :( Wait awhile, read: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html and repost with all the ack/review tags included.