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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 86FA1C369AB for ; Fri, 25 Apr 2025 00:11:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZT1jPcvqOA/bCwaES44yzXZx238UekkKye3BQb4DP5E=; b=X0CxUFciP8a9CO3ZGaV95yf5Zo FUUSuSewBIqRDRehsHeHc2FXw8vJH18+eoDVy1HFZ9QdtT3R63wSSwO317iqeG+oLTLz8D2Cz94XU DhqNFU+aAU6C0W8ry/mcZd9InB9TG4u9Jz5tZn8a9jhw54VSbolRHvD2UY/E/4ZTremO+d7njmI2V 7ODqNwVU+vqlgj6HLXVykGN6IY6UAW5JTbS8odPzqkr4CzAB4v3rUw3PiNJjiLVsnVxHayz/rB/5R EqGsynvkOdh15ldw2X128sFWwafU4W5THwU0kTtMNpydRTv9m0WJ3EOZwBmbeBlIZNecOmMjYDBPn A7drsWpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u86f7-0000000Fav8-2VoQ; Fri, 25 Apr 2025 00:11:25 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u86dI-0000000Fald-14RX; Fri, 25 Apr 2025 00:09:32 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 7E9BC6845E; Fri, 25 Apr 2025 00:09:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C951AC4CEE3; Fri, 25 Apr 2025 00:09:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1745539771; bh=X27dZXbBf1UyTh3wlr1veO6Mj5ruoi4P1bv5CB1QzcE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RQqKDjKiwOzHkH5YWJteDczIvLI7JWjNDaSlgbSp2xjrWlVs3wKE5/q//I6dz3yvY gnFIU3wLzuJFFileOJ4nbtcMkAuVHtH+LecSU7UqZuZCA+K9wRA0zXWA38wB3c0AwH cnaevBn7myWAiQxyB4G9Rk8mgGjD+Prl1asQvbWxSSrjaJXpw7OFYC6VDRPNEm62+9 ns4KP5gxxqpp9ieOuYVUgoAZaTrOj3EMORvAjQ9H4Gmu1AUY1G+9aTztV4ZLaWHxUp 0QiJKQWLs2ZPxaYB6/dBLYh/h27VxD/rMaLC/IwVBHTvOoK03zm80rHcC91WKNTApI Tj2M4uTp2F7Ag== Date: Thu, 24 Apr 2025 17:09:29 -0700 From: Jakub Kicinski To: Jacob Keller Cc: Lorenzo Bianconi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , , , , Simon Horman Subject: Re: [PATCH net v3] net: airoha: Add missing filed to ppe_mbox_data struct Message-ID: <20250424170929.3fb25bb8@kernel.org> In-Reply-To: References: <20250422-airoha-en7581-fix-ppe_mbox_data-v3-1-87dd50d2956e@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Wed, 23 Apr 2025 09:34:49 -0700 Jacob Keller wrote: > >> One oddity here is that the structure is not marked __packed. This > >> addition of a u8 means there will be a 3-byte gap on platforms which > >> have a 4-byte integer... It feels very weird these are ints and not s32 > >> or something to fully clarify the sizes. > > > > yes, you are right. Let's hold on for a while with this patch and let me ask > > Airoha folks if we can "pack" the struct in the NPU firmware binary so we can use > > __packed attribute here. In any case I will use "u32" instead of "int" in the next > > version. > > Sure. Also, if firmware already has this layout fixed, you could add the > 3 padding bytes marked as reserved to make it more obvious they exist > without needing to remember the rules for how the members will align. +1 FWIW, mark the padding explicitly is good, but don't make everything misaligned with __packed