Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp584437rdb; Thu, 19 Oct 2023 12:51:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYMRIO75AhDNETYBWBJkNZ+ZgowOoX8Tf81wnpdxkJv7UKJ6M3DFLRdSOQJjq/zC4NANuB X-Received: by 2002:a05:6830:16cb:b0:6bc:8cd2:dd97 with SMTP id l11-20020a05683016cb00b006bc8cd2dd97mr3182697otr.29.1697745084990; Thu, 19 Oct 2023 12:51:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697745084; cv=none; d=google.com; s=arc-20160816; b=IbwlwHn6Oc++uivBzYNrHKDqTMrrU+yf23ccIk4ZAzhPk17HZPyxL4ghmxaqk89npw 8Jg+FwLAKjF19+gXRPiM8x+nq/N2pEl9cwNSEuRwf914v23Ffp44AIwik3xHOrY/ZyHg 4wuDNcIGR6qO/LupTl7mjVQcTdGqrX1Ug/ZBdFMn41Ey2Y7K2q9NWiVJvSMTKIAkVmLG 1TZvqqh8fL9biflVmWh54pJzLzndLyt+/kRBf7sU34gM8DOTli4xeEEOrQ/sxQpy4AK9 soJ5yGRQXWeX+osHdryBy2LQi2IkkmlLIqWD2+ceewuTfSppOApm8bow7LcWofx08wOq sm8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zmKyiXUw03PdyIG0l9m5rnG2yY3mAiEOaPgc0wFDN8s=; fh=CMTBifSPW06/yJKpOlzrgtB1X23FxcaL/UVs8Q0ihe8=; b=L+FNdvbRtsWa9pr1wT4GwUp8EDZawrq9B2W/5FEyLJqa2VRVzMfGANPiJW/IYPo0pB igBbx2tEZWQ+Q0B7MhjEuxlrlpu6s2em/MY8zCl9kO0UIFKzNpjRDtsM6SYwfwqTREp4 DLQLOXLPML3DkH8myX6bgkj4ZGqhVrjTLmSFYy7d6ZMh9V59kC0WJ3baUbWttxC0A7BP 5CKQEfufqd+yqUwsLaiwfd2J2eds9Lp8qJHOmmb+pmTkSk7XvSrL3P+AMjw3NnUxNT77 gQrUxfS8YZxItHBM1TSQZRKeWudacmw5VfZJtq1Ra9JAvmKHv780Q6RkKoRI3fDs82Xl g+DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IDlcoXnC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id c19-20020aa79533000000b006a68a46431bsi337488pfp.50.2023.10.19.12.51.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 12:51:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=IDlcoXnC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 146B58274AD2; Thu, 19 Oct 2023 12:51:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346438AbjJSTvN (ORCPT + 99 others); Thu, 19 Oct 2023 15:51:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229598AbjJSTvL (ORCPT ); Thu, 19 Oct 2023 15:51:11 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9926ACA for ; Thu, 19 Oct 2023 12:51:09 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F586C433C7; Thu, 19 Oct 2023 19:51:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697745069; bh=zmKyiXUw03PdyIG0l9m5rnG2yY3mAiEOaPgc0wFDN8s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IDlcoXnC+v/L+LqFlXCtOMWMZkI/loh/Gnyl+S3J9VMidgUZG/CS37uRJmKD8NoYE g48Z1Tw7C62vixL1+yVHnnE1elOD0nCR1fvR+9ADIol0+IZwc2H8cqBM+2qH+fwqyS 2NOItxcxQ0eTg0sKjOASRJn4TK8/HbZpcPOEv5EKCaKYA5LO4zPIx9KP1EmtrZxr0B L9nWEJp9tFIYRkji2lLxZFyf/juFWX/xnFxhIIUUyWtW8V3yFFKQNB6ZUrD2Gm3AV6 ZkW5/xtlxni/+13DEBSBn42KYDVPxQhttsPFXV9znlJmwMRPxi3mKQ5wLS58yX0o61 H3WqF17ua9ifw== Date: Thu, 19 Oct 2023 12:51:07 -0700 From: Jakub Kicinski To: Shinas Rasheed Cc: "horms@kernel.org" , "linux-kernel@vger.kernel.org" , "pabeni@redhat.com" , "davem@davemloft.net" , "edumazet@google.com" , "egallen@redhat.com" , Haseeb Gani , "mschmidt@redhat.com" , "netdev@vger.kernel.org" , Sathesh B Edara , Veerasenareddy Burru , Vimlesh Kumar Subject: Re: [EXT] Re: [net-next PATCH v3] octeon_ep: pack hardware structure Message-ID: <20231019125107.5acd7c1e@kernel.org> In-Reply-To: References: <20231016092051.2306831-1-srasheed@marvell.com> <20231018170605.392efc0d@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 19 Oct 2023 12:51:17 -0700 (PDT) On Thu, 19 Oct 2023 18:46:09 +0000 Shinas Rasheed wrote: > Since these structures represent how hardware expects data, there can > be a lack of alignment. Doesn't the host allocate at least most of those? Therefore controlling the alignment? > I'm afraid static asserting all the hardware data structures might > force some compilers to fail? C has structure packing rules which mean that in 99.9999% of the cases none of your structs need explicit packing. For the 0.0001% of arches breaking build is fine. At least that's my guess, again, I wasn't the one who rejected the patch. I just noticed it was dropped in patchwork and made a guess based on past experience.