Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5049276rdb; Tue, 12 Dec 2023 18:19:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IEZrwebVBGe5Hu6rbWQhl/G9eFDRTyX+798py0am41MmCRn7naIUQo5EJCmtZeiOgY7snI4 X-Received: by 2002:a05:6870:2803:b0:1fb:14a3:c642 with SMTP id gz3-20020a056870280300b001fb14a3c642mr9654698oab.42.1702433963355; Tue, 12 Dec 2023 18:19:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702433963; cv=none; d=google.com; s=arc-20160816; b=X4pYoVwZP61EfxdLF+AlNziG2yfLYKEbMzy1IGrGupZPjyoiOqA0NKf+L5ueTruHv2 X0F7fhU/ZXg+TAyNCsc5Lk5S0IBycn+Vv4ELTgwLRKwUjUgy/Tc0/BRd5cMpKA6QnNJW 2PeJBbuigyPrdpHx5p1PYnAh9Oc254Vc/QiclH9e/EILsizyPmJiJE4EjgfQnbPwKsFJ 5DUcMluQM3l/FeA/ZrUkV0i0NUq2kU8ujHnwrt0+F7RSv8Sl/ZhTru3XF/80WZHyeiZj kKK81F/bCHxBgupQtVdWI+z11f0ZVE0QeqEnwxM52yzB2M/5zTVVVYAHRu2ugGyb08r6 eMew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=GSzoXP+7W1hh7FwF3gCQ0Y+91MkbJqRVxBrxARvCT9M=; fh=se3p4nUgCNjwd/1+rTkyanltoyh794F1TAfd9LDnO1A=; b=BWZq0m7PbSK0DqtOWUEuddl/qe3i5pJKMOJdHXi+Ox5hcs9GpRbq6cr7RlQkMIqXqa DZMSRHGkYUFmGoTug4/2P74OBnse+pn1dWdF3tYZfMTKxmyRLZU6zg73WFrKHuE4DKTN C5XmqeEQAhjbXsbgRYD+6PrdqghtsSECrwtpZfodmUSMRpcAHBo+ZEmUkpK+UY8+SKqC CRm+DucwO/O/VX6yIZIbwL89/xgcytsUOsBlsa4Ey7E74ezy8lOiyzmHkY0oDvwdqo58 IsQ7YPBqgH9JoecemEVWUVF9gQ7yrhuc992oriKjjc+4tWb7AkqJ+8TEWJuHyV+1VMvB 5y9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DyCeS9Gm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id y184-20020a638ac1000000b005b92a7d88e6si8601129pgd.823.2023.12.12.18.19.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 18:19:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DyCeS9Gm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id EBC6F81D5E3C; Tue, 12 Dec 2023 18:19:19 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378271AbjLMCTG (ORCPT + 99 others); Tue, 12 Dec 2023 21:19:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378226AbjLMCTE (ORCPT ); Tue, 12 Dec 2023 21:19:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 451EBA0 for ; Tue, 12 Dec 2023 18:19:11 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBD23C433C8; Wed, 13 Dec 2023 02:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702433950; bh=DQPF3GcanIRKcaZKx1G5ZSV6kAy0I6t5QN8G9OuMZdM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DyCeS9GmtbFGFSsFn5YSGcJgY03zFug1iziwTrwVmg/ZlNI8m4c58IveouykxEdqa EMnEhzuZ63StLiesj5cSjbJf4TmG4ZBa1yJ7JCzsdawYg44TMs0dyNRoLJ1GELn1tz mZ0ttW2DALNof274ibmywvx6VjyQmwZ21hJje2+EzxdBAhAbf2HCJYKHiiZ+1qP7MN awBRzsmBQJpRFMscNENawsc7TC/PSZAjpMEzMokycEPjSXZZ9oUEEmo+Oekfpv6dsz Lulob+ZQQMb5SPxcQHqSMtRg1Oa5btnY+jl5DG0GR/t04qzTQhWGqHRNhfn4l51+iE FdNU7DP2aIKOg== Message-ID: Date: Tue, 12 Dec 2023 18:19:09 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [net-next v1 08/16] memory-provider: dmabuf devmem memory provider Content-Language: en-US To: Mina Almasry , Jason Gunthorpe Cc: Shailend Chand , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-kselftest@vger.kernel.org, bpf@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Jeroen de Borst , Praveen Kaligineedi , Jesper Dangaard Brouer , Ilias Apalodimas , Arnd Bergmann , Willem de Bruijn , Shuah Khan , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Yunsheng Lin , Harshitha Ramamurthy , Shakeel Butt , Willem de Bruijn , Kaiyuan Zhang , Christoph Hellwig References: <20231208005250.2910004-1-almasrymina@google.com> <20231208005250.2910004-9-almasrymina@google.com> <20231212122535.GA3029808@nvidia.com> <20231212143942.GF3014157@nvidia.com> <20231212150834.GI3014157@nvidia.com> From: David Ahern In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 12 Dec 2023 18:19:20 -0800 (PST) On 12/12/23 6:09 PM, Mina Almasry wrote: > OK, I imagine this is not that hard to implement - it's really whether > the change is acceptable to reviewers. > > I figure I can start by implementing a no-op abstraction to page*: > > typedef struct page netmem_t > > and replace the page* in the following places with netmem_t*: > > 1. page_pool API (not internals) > 2. drivers using the page_pool. > 3. skb_frag_t. > accessors to skb_frag_t field are now consolidated to include/linux/skbuff.h (the one IB driver was fixed in Sept by 4ececeb83986), so changing skb_frag_t from bio_vec to something like: typedef struct skb_frag { void *addr; unsigned int length; unsigned int offset; }; is trivial. From there, addr can default to `struct page *`. If LSB is set, strip it and return `struct page_pool_iov *` or `struct buffer_pool *`