Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp952458lqs; Wed, 6 Mar 2024 01:37:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWs+f2gXsdw7Ug7NWAR1C74WwuBeQ5VLBTbQP53qrP7qQJGU1tT2V/exOU35NIfq4vUbC5XUSzlCA4IsefN/m51WpxrXH1BxrB0C8iZtg== X-Google-Smtp-Source: AGHT+IF0KJNZx3Ua1hAmZZqldYo3AwuaXPPlHVD3W7sdIVu2RIFI+n/erkMPP4D0mqhfIEGT2ETX X-Received: by 2002:a2e:95c7:0:b0:2d2:329f:7a7e with SMTP id y7-20020a2e95c7000000b002d2329f7a7emr3113542ljh.6.1709717828404; Wed, 06 Mar 2024 01:37:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709717828; cv=pass; d=google.com; s=arc-20160816; b=d2ZBCcnLPuhW9cKRqwWQKjrcblPh2iumYPldMti4O9eZFpgY8ZqNMnzeaGicCxNwJe Fa/yk1Xsd2Hx5K3U4BUSQ9BillU30G04U541m12+hHUCK82orfiq0PDJoWaXzMna5lq0 2GKzoArGT1vq5pS7YLykbkoIksNIw4x77S/OnYvsPGJm3MxQXSDFwxBge/d2D2MR5EIW dbi23v3OoPuJ44QyOYKXAjbrjfRilROHdGjk59xNWd0Vvl9bGkP80ribIWoyvXY4NfK2 L1oSB4Lz+5BC4zSgUU4Yhk0tAmHolPvQlOTJyj7ZQLHoVjTccp0+FEblvIqrMq6SrHyH B9fQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=n9CloCqaM+25WoaR2YknpneBnZb2s33DuZ5EXKAJgUk=; fh=/SyUPaj3EtwrJ55pq561NgOtirClTC2L/VdU5lVENUY=; b=oRQ7nwobAd5Mmras8sq7hysAhb9srUnz+lVd1J/u7672KNmGQhjRnOB6WDz78mVJlJ iWky3aiEIhrxO38gYhfp5z147b9o7xSg+OEJodWkB7ifELOkvbkotZnlBce/8vwNlJQN yCD7vEMI+XzfjnF0f9odnAlFixyGzipvOh9fSeQJBkGX+F7JgFr5oBhH/wrM1SJiN+Ci QXx77zO6FM2KuoWtSIyktc3QCNUvxkQ9J4MxVl228bAAA+d1sbSGDxRwx2rki24F27iY VA97MRylp8uBnemEUZaJl7WPxwadAsC233pndHi2pikXkDxtWSR135t5NPzqMA/OfdMU GoZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@davidwei-uk.20230601.gappssmtp.com header.s=20230601 header.b=tXzN2w3m; arc=pass (i=1 dkim=pass dkdomain=davidwei-uk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-93243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93243-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id l19-20020a056402255300b0056628e3201bsi5797070edb.12.2024.03.06.01.37.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 01:37:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@davidwei-uk.20230601.gappssmtp.com header.s=20230601 header.b=tXzN2w3m; arc=pass (i=1 dkim=pass dkdomain=davidwei-uk.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-93243-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93243-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7EBF21F24F42 for ; Wed, 6 Mar 2024 02:29:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 526AF1172C; Wed, 6 Mar 2024 02:28:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=davidwei-uk.20230601.gappssmtp.com header.i=@davidwei-uk.20230601.gappssmtp.com header.b="tXzN2w3m" Received: from mail-oo1-f49.google.com (mail-oo1-f49.google.com [209.85.161.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5495CD518 for ; Wed, 6 Mar 2024 02:28:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709692136; cv=none; b=D7lw+uefuiUnMjxzuLlOkVQgYP3GNq07kt7YyvvTzfd9MCapqq8JO6eJ8miy1VFOPVS++4LQ0yB8xyctdDDcZ/giIbrp1Z26BfvALuO6+XSTxzsPdgwSDnRsLKLqRbMRjy36ckQxzmbT3Xo5vhArjJkRFcwdlVx5bXJXZu3YjYc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709692136; c=relaxed/simple; bh=m/4/IJpnreuZGBCjDFZuh5CJChe0Zp0mf+/fUUyVNyY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=k6mAvMKijx7370rp7k8oS85jrUZb3FzACVQdKmmkasW0Y2DVYAyUXCKtNJV74ciHmWjFkOAm72DaYozt/dMFhZZQ8vjyMGqfFaQsCIll5rg47Hy5smeGdA+fdlW0P0yD3z8JTQGTE5Abx9q6ZITB/P/Pi/+k5hX7vTE7GChguw4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidwei.uk; spf=none smtp.mailfrom=davidwei.uk; dkim=pass (2048-bit key) header.d=davidwei-uk.20230601.gappssmtp.com header.i=@davidwei-uk.20230601.gappssmtp.com header.b=tXzN2w3m; arc=none smtp.client-ip=209.85.161.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=davidwei.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=davidwei.uk Received: by mail-oo1-f49.google.com with SMTP id 006d021491bc7-59fd6684316so204460eaf.0 for ; Tue, 05 Mar 2024 18:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=davidwei-uk.20230601.gappssmtp.com; s=20230601; t=1709692133; x=1710296933; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=n9CloCqaM+25WoaR2YknpneBnZb2s33DuZ5EXKAJgUk=; b=tXzN2w3mIA42+kxiYmI+IfLVus4l/QCyp13ANiYCaN2AX0ORMGh8eFZyBZrHwi5+ui zNdIkjkiBk4A/hgNMWzvhoZCVZgub5eQsDzmq3IH7LIsjQRrvMfh2CRMGVf8ialf+Rus nghzApmYQfTLUlMYRSXbb4x6B6akvEuK4rNb6WwQoK4aLQOK0EG+oA4Ab7xlOOeaibDg nJSUHhZ9ODRVCyFEvPMgBTKDGO9DRMtkgCfGe4EIFAsUKHZm1wpITxZLA3udaKd58MVY 6IouXTOA0w+XUEzqhiMWwJtLgVug5qR8dVcL0sonjarAz3MYOIYP8a1XnRJ4sV8i2/vC ncEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709692133; x=1710296933; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=n9CloCqaM+25WoaR2YknpneBnZb2s33DuZ5EXKAJgUk=; b=M4SP0O+4YiDJqiMdm5qXCkoX6vqXBKHts6E88C51cUJT2+ash+htMNQkBLf3RSYvCB dDGzd5708U2K3sGuI3nS+jXYxhn7JSXkUyJupOclKrcXoCDMM0yHS0v8YyEkMud/w3Ds FFvZ6DAHSo6damWRmT71jD7W4eZ9C0xpA0DBIWaK3xTb+NQvDyqXeiF9Bvh1d8ElVMiV dtHT6fnZDlxBNar4kWOIlw/Z4nymK8JbdLNYOxrrGUcxqIGObBx6w7z1la9Y548+132R 5OwodYit9MT008Tr5f9dMBbX/B9eR2D9RqYYj6SOxQI/dmSX5OA8bFaxX5/IwBDrjQgs rwAQ== X-Forwarded-Encrypted: i=1; AJvYcCWxURysVEsaR71u1gJbDGXqg/Az3bsZEcdgCTx6Z8FK2+LceoCTMPckebJSivQAHERBO8dQYvse+nWFispaf+MX2g+x0wyEr74eAAJz X-Gm-Message-State: AOJu0YxKU+ThXP6kiv+3RC0c5Ftlmp7w2bwTrunmszFKJDJy4Y6UmYxZ Hqy5BEyHolApcEMjF1wXhHy+PhkCvFvLAqiF+VdQ4nUMcK81SwYOvfXJ+4nF4ss= X-Received: by 2002:a05:6870:1786:b0:220:8d17:6ebd with SMTP id r6-20020a056870178600b002208d176ebdmr3863595oae.42.1709692133363; Tue, 05 Mar 2024 18:28:53 -0800 (PST) Received: from [192.168.1.24] (71-212-18-124.tukw.qwest.net. [71.212.18.124]) by smtp.gmail.com with ESMTPSA id x35-20020a056a0018a300b006e5bdc19842sm7873904pfh.73.2024.03.05.18.28.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Mar 2024 18:28:52 -0800 (PST) Message-ID: <383c4870-167f-4123-bbf3-928db1463e01@davidwei.uk> Date: Tue, 5 Mar 2024 18:28:51 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH net-next v6 09/15] memory-provider: dmabuf devmem memory provider Content-Language: en-GB To: Mina Almasry , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-alpha@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-arch@vger.kernel.org, bpf@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Richard Henderson , Ivan Kokshaysky , Matt Turner , Thomas Bogendoerfer , "James E.J. Bottomley" , Helge Deller , Andreas Larsson , Jesper Dangaard Brouer , Ilias Apalodimas , Steven Rostedt , Masami Hiramatsu , Mathieu Desnoyers , Arnd Bergmann , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , David Ahern , Willem de Bruijn , Shuah Khan , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Pavel Begunkov , Jason Gunthorpe , Yunsheng Lin , Shailend Chand , Harshitha Ramamurthy , Jeroen de Borst , Praveen Kaligineedi , Willem de Bruijn , Kaiyuan Zhang References: <20240305020153.2787423-1-almasrymina@google.com> <20240305020153.2787423-10-almasrymina@google.com> From: David Wei In-Reply-To: <20240305020153.2787423-10-almasrymina@google.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2024-03-04 18:01, Mina Almasry wrote: > + if (pool->p.queue) > + binding = READ_ONCE(pool->p.queue->binding); > + > + if (binding) { > + pool->mp_ops = &dmabuf_devmem_ops; > + pool->mp_priv = binding; > + } This is specific to TCP devmem. For ZC Rx we will need something more generic to let us pass our own memory provider backend down to the page pool. What about storing ops and priv void ptr in struct netdev_rx_queue instead? Then we can both use it.