Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp156385lqs; Thu, 13 Jun 2024 06:47:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzlmDprmvDJzRC/QQRA5gdV8uCwhaDUBV54Ggxejr0zarNGWIgbavNgtpWWW9YyA0KMuwb95xzQod4/cDIeF0XNx6AuyS5xOLFGK+25w== X-Google-Smtp-Source: AGHT+IH9Jb1yXXjP62rSb/F0UHlA9bisnk5HFARr3nA635q3e5V4hyKBQJ/R4jg0kDi1BdmB0R9i X-Received: by 2002:a50:9348:0:b0:57c:8105:b9a7 with SMTP id 4fb4d7f45d1cf-57caaaba16bmr3014678a12.29.1718286449371; Thu, 13 Jun 2024 06:47:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718286449; cv=pass; d=google.com; s=arc-20160816; b=GoJFsj3hF1fnswpQ4CdeG8KfhXISqPyZe9p2kG3khnXiwYw/h9Z1Kh8zvHNhUIpJu8 e307RriTGV1+MJWKJABOprdehzSRndqW6SEUtSSGcd+QOojtx8XyjaMwF92wy0CVhRyF m/cSVUzq3nEJQcQSU3w7yDKIhMNCv1nQb+jhyaNLfmqWS0sGa8p9ldQm5yyBDKNm1AC0 EXOJKJ3d/xzPgvQ3WMYtjP6RKDZKFsh2Gp6yfOChvPZSq2xIAb19q0q/zV4L/OQ1H0tx OgiRBk7Qlg3DEoN12IUX3Lw2xY5Itiu5knqx5auT2LKuFk70BGcpDfylnErlcJMU4vzO gykg== ARC-Message-Signature: i=2; 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=wOoeDgfjaTYL6X2m3YC5RS7T1vZqj7WNqB1g61FjSjY=; fh=MkOTvCPvUfUKIUqqKtUZ/Y/bm4Z+k7pS149DgN9Q5R4=; b=qgY6TZ+K7hwf2GiBROiTTJEBMLC1RAQQQb3obxeg8vrzEEUb9s+tXh0uJFO1OVoz/8 hqfiC2M/jg76OecZ1OeG42l9gZbkuCs24UH8338WM6WUmUxEkhzUBx71n3wNPAA4V0sO +vLN/71y/FN36W2bDiyIoPUt0M9R1d1yyGZpnvd6pRl8jzANtPWsozMDr8OFstQ4enLx tsnDtfz9OUaWsMEq8Lq0LVuNCx9GPiFuMQRWAf56SH8KRSkDTyqLyqCf4UR9cWyjAEAe Z082EHpxKgAxIm1MA+rgdiJJzrVdap6kxK/biMeLZlxYJahBsqZLqPA/29czkR6dg2wj TzVw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rQR+S+xm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213362-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 4fb4d7f45d1cf-57cb8c31b36si641146a12.648.2024.06.13.06.47.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:47:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213362-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=rQR+S+xm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-213362-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213362-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 19E121F21AE6 for ; Thu, 13 Jun 2024 13:47:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A17C8145331; Thu, 13 Jun 2024 13:47:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rQR+S+xm" 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 C5D588F68; Thu, 13 Jun 2024 13:47:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718286427; cv=none; b=MvR4jsjjOoebA3YcgM+kzg2JIZbcnrb6Fi/WRQ6hjdte0KA5yxe8EBcBJU+/XKmEgW2b7OZTarSVA1+Vtwi82vRWuWmHnwozsjqpirhyiaQCy1WPRa51/bFMIzqCdpb7/3RWetrvOHs7+oVaqL+aOLmFYat9pZqDo/mz/Aq3zYM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718286427; c=relaxed/simple; bh=F+vpsUe1Dqx+OiW7G9Jnm5iiQTon9YAexjro/SFNuDA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SFlLXEbmYM1TgKWRfMyVV4J3hJ7WWCKP7YLF++rd5LPvQbhd5QWq04wFmwTGZfW6HZdgJwrGVqMhurgg1jTLcm/+WKXyIN0UlMdPlch7u3rO/U0T4q4QcxJsO8QIqkDwYs4x91sFKFuofn4z/rUmJ3XpHQ2gEeemniuooEZm6Vw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rQR+S+xm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5097C2BBFC; Thu, 13 Jun 2024 13:47:06 +0000 (UTC) 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== Date: Thu, 13 Jun 2024 06:47:06 -0700 From: Jakub Kicinski To: Alexander Lobakin Cc: , Tony Nguyen , "David S. Miller" , "Eric Dumazet" , Paolo Abeni , Mina Almasry , , , Subject: Re: [PATCH iwl-next 01/12] libeth: add cacheline / struct alignment helpers 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> 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=US-ASCII Content-Transfer-Encoding: 7bit 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.