Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1353808rdd; Wed, 10 Jan 2024 17:35:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0ndrK6HlfsPYdmiPeCDppK+XOTnWrJasjPzOz7OW3tJa81e0bmXt+futmEKTgXfP1+k2s X-Received: by 2002:a17:906:1c8c:b0:a2b:9498:888c with SMTP id g12-20020a1709061c8c00b00a2b9498888cmr66694ejh.278.1704936940401; Wed, 10 Jan 2024 17:35:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704936940; cv=none; d=google.com; s=arc-20160816; b=WQuXHWylc1jsLn5QRc/lyJqcOL2rq2IJaKlSaxrlDnp8fcvkoiCzozHBa2t+LW2pZd pFgKyqVxTIPQpmIVvhtVg3MOGwxELqZAbytZvo8Kz5II67brJF2Ld7AwNb5zn8ZiGgof BlOUt7qY5kL9yfjNEMgLEqomvIdq7rrs2wnSZ9HG6szrzIzD+zIfNGYxsIcw6Ryys3o2 /rSI+5JyiQwSUEHk8VuOCwvN7JFtS/3h1n4MrfIv70VKyrkH596ScfoaENgHSs+mzyDK SAMO/Ab+Q2vZEiR9Av31lWew8yaMEO9s7xFzr6pQZA1tHrYdX6OsHjlCvwl1UDbZ4kyE 6Csg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=x/qylrHtx3aVapzYNOhFZJJ8LiE2z3tD+sjWKoEHzt4=; fh=CLC85Sfn+Nras649+WlB0l8yFJAJ3HdYIfw4z9OrjLw=; b=TrjQXPV5V9kS5D51RAVg+6ob3PLWxce6CMtJKt5CjV/MQO+/LoUlvCaijLAIp+tQLp skpFZjHRU+hXU4wA2rdawhXc/RoEEA9E5dIkZEYTaiq2LGQ6lF3X28+88d5vjc3HJnw4 01Ui2ZDD4GhDTt8e1SzFIlvi3RqtXzeJI4f/+NZI0qDGJyxLorBz25ZkPAmzo2rPTlrW qEfE6b4QzVRlBZqng83hpz2tGuSZxT3i0KMN8in63Wj0gXWteDckIZSL/eJAB29SnezJ Cz6pFFvgdNE3fVozAAZs5mX5ZMkEMJwlIT18xg0LVhbDIVuEv5AK0KsQGh12sTniOnqv tXuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=EH+UMHiW; spf=pass (google.com: domain of linux-kernel+bounces-22929-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22929-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 n19-20020a1709061d1300b00a2a3d55cb43si4211ejh.521.2024.01.10.17.35.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 17:35:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22929-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=@kernel.org header.s=k20201202 header.b=EH+UMHiW; spf=pass (google.com: domain of linux-kernel+bounces-22929-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22929-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 2D4D91F23F09 for ; Thu, 11 Jan 2024 01:35:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F981EC0; Thu, 11 Jan 2024 01:35:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EH+UMHiW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50ABA20E0; Thu, 11 Jan 2024 01:35:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AC07C433F1; Thu, 11 Jan 2024 01:35:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704936924; bh=EAt50oUtdgbqbbLDWzcXAA/DZVzhKMRHwocOcJuW7KU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EH+UMHiWVgND/Td838wHuRk5d1uDIIAaiPNeC+yi1JTxvFcDH8UrhypSeWaOEZi7e 2WlJVcLUGIGDE+hHeanSxW6T8TwKCMi1gz5WZ4c4YmdGFozbQ+V1l+jZ+wSEn9ySO0 JQnLjxXclaL4Bwwou3yLrQCKDkwM4ltPdPmsRj6h56HY/jeoAs6/Vs7Ea9xjpGn5Nn Mjtklrwy04xY1rqQuQCeJacS2eDr5xE5m0jUcjefiAi+wwaiFCaAv4vAJNZReZ0dcJ /9aczZMYFiXrB20EvO/P+VUEtysKb4aqPnWKFnvgFs5y/puriW9XtOzMLHnPAqVqSX AmTWxtxl/PWKw== Date: Wed, 10 Jan 2024 17:35:23 -0800 From: Jakub Kicinski To: Shakeel Butt Cc: Mina Almasry , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux.dev, "David S. Miller" , Eric Dumazet , Paolo Abeni , Stefan Hajnoczi , Stefano Garzarella , David Howells , Jason Gunthorpe , Christian =?UTF-8?B?S8O2bmln?= , Yunsheng Lin , Willem de Bruijn Subject: Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory Message-ID: <20240110173523.012175fd@kernel.org> In-Reply-To: References: <20231220214505.2303297-1-almasrymina@google.com> <20231220214505.2303297-3-almasrymina@google.com> <20231221232343.qogdsoavt7z45dfc@google.com> <20240104134424.399fee0a@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 10 Jan 2024 09:50:08 -0800 Shakeel Butt wrote: > On Thu, Jan 4, 2024 at 1:44=E2=80=AFPM Jakub Kicinski w= rote: > > You seem to be trying hard to make struct netmem a thing. > > Perhaps you have a reason I'm not getting? =20 >=20 > Mina already went with your suggestion and that is fine. To me, struct > netmem is more aesthetically aligned with the existing struct > encoded_page approach, but I don't have a strong opinion one way or > the other. However it seems like you have a stronger preference for > __bitwise approach. Is there a technical reason or just aesthetic? Yes, right above the text you quoted: The __bitwise annotation will make catching people trying to cast to struct page * trivial. https://lore.kernel.org/all/20240104134424.399fee0a@kernel.org/