From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75D20C27C4F for ; Thu, 13 Jun 2024 13:47:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 0591E61010; Thu, 13 Jun 2024 13:47:12 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id pGxO0qddug8L; Thu, 13 Jun 2024 13:47:11 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.34; helo=ash.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D677A60F06 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1718286430; bh=wOoeDgfjaTYL6X2m3YC5RS7T1vZqj7WNqB1g61FjSjY=; h=Date:From:To:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=39XuSQ7G7VxKUGhsH50LwEJPubnPSeh1t9m0gVrUmYhArxa2+5d/ZfqZWvgjq30kL trRvWW0R1A40heWLJAQjl3HOq6WqAB7PfHI4/tQhszkttr6usRiw6unGkSv6vbmD/X qnQwTv4QHv/7/nNTaWSPiVX9KhA8T4mazlrrmdW13zceo0Aoq6UtugYe5RPdFLLANe vx4Rfc/m0BQJC9CE2rbJwYSlENn0e2xalb/KF6EOhvz6Fce2MMKabQGSf3KzzKzZr7 U5m3sVkJxOOOPaf4No9Yw/bNrP5UcO/sG8mdfwi21s+D7KNHI9kz58X+4ePOXUmNep trUmrg1TZ/E2Q== Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id D677A60F06; Thu, 13 Jun 2024 13:47:10 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6BD131BF34C for ; Thu, 13 Jun 2024 13:47:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 570F04094D for ; Thu, 13 Jun 2024 13:47:09 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id kaOXr-gjvffb for ; Thu, 13 Jun 2024 13:47:08 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=139.178.84.217; helo=dfw.source.kernel.org; envelope-from=kuba@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 720E640628 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 720E640628 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by smtp4.osuosl.org (Postfix) with ESMTPS id 720E640628 for ; Thu, 13 Jun 2024 13:47:08 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A92F761B24; Thu, 13 Jun 2024 13:47:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5097C2BBFC; Thu, 13 Jun 2024 13:47:06 +0000 (UTC) Date: Thu, 13 Jun 2024 06:47:06 -0700 From: Jakub Kicinski To: Alexander Lobakin Message-ID: <20240613064706.15f26159@kernel.org> In-Reply-To: <43c1ec2f-977e-45cd-b974-e943fa880535@intel.com> References: <20240528134846.148890-1-aleksander.lobakin@intel.com> <20240528134846.148890-2-aleksander.lobakin@intel.com> <20240529183409.29a914c2@kernel.org> <43c1ec2f-977e-45cd-b974-e943fa880535@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718286427; bh=F+vpsUe1Dqx+OiW7G9Jnm5iiQTon9YAexjro/SFNuDA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=rQR+S+xmR2KSIF4UEpapK+WRaIgnwkATsPQq69mgFBtV4TtX9n/55mbgZZjBO4G9f aZ0gb3FNYi5H1si+U7MAMH3X/VTLgHF6JZb1x398NY9TfhZQnayChxunUqG2GlYKb/ sJBBl1xCGHXVZKChT8Lvj62a4w47r1RmdGnFTfHvJ0c+uvjp2WAO2WPprxyHZVSM8H Lj2OdTay6E6IE9k/CoiEaueLkWqWWvxfRbqEhbK0JBTogAzYgF0T5k5y9kVZAni+sn mDgIu4qWLmuyOs+brmU2A0aLGPr+9PF1z4pjRUAmpRluO6xWX/O5ElGDrUH9RT++mp 8yxsYE6frB9Qw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=rQR+S+xm Subject: Re: [Intel-wired-lan] [PATCH iwl-next 01/12] libeth: add cacheline / struct alignment helpers X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mina Almasry , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Eric Dumazet , Tony Nguyen , nex.sw.ncis.osdt.itp.upstreaming@intel.com, intel-wired-lan@lists.osuosl.org, Paolo Abeni , "David S. Miller" Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Thu, 13 Jun 2024 12:47:33 +0200 Alexander Lobakin wrote: > > Having per-driver grouping defines is a no-go. > > Without it, kdoc warns when I want to describe group fields =\ > > > Do you need the defines in the first place? > > They allow to describe CLs w/o repeating boilerplates like > > cacheline_group_begin(blah) __aligned(blah) > fields > cacheline_group_end(blah) And you assert that your boilerplate is somehow nicer than this? See my reply to Przemek, I don't think so, and neither do other maintainers, judging by how the socket grouping was done. You can add new markers to include the align automatically too, etc. > > Are you sure the assert you're adding are not going to explode > > on some weird arch? Honestly, patch 5 feels like a little too > > I was adjusting and testing it a lot and CI finally started building > every arch with no issues some time ago, so yes, I'm sure. > 64-byte CL on 64-bit arch behaves the same everywhere, so the assertions > for it can be more strict. On other arches, the behaviour is the same as > how Eric asserts netdev cachelines in the core code. > > > much for a driver.. > > We had multiple situations when our team were optimizing the structure > layout and then someone added a new field and messed up the layout > again. So I ended up with strict assertions. I understand. Not 100% sure I agree but depends on the team, so okay. > Why is it too much if we have the same stuff for the netdev core? But we didn't add tcp_* macros and sock_* macros etc. Improve the stuff in cache.h is you think its worth it. And no struct_groups() please.