From mboxrd@z Thu Jan 1 00:00:00 1970 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 C663C819 for ; Fri, 25 Apr 2025 00:09:31 +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=1745539771; cv=none; b=mIr16FJaeECGdYYaARiEF9svX8T3W09Z8RcHS3ExLD1JEO74VNxZic7ncMKsybgJzUJfUHzpk5fNZYXMsOjNykm/16u1MOn29F6rg4tAjMwiKYjSDTeDWarfIq7Om9r5MQqjgGBKaWUDddqNr6Jud9BkLi7GrdBprPQTqZ71DuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745539771; c=relaxed/simple; bh=X27dZXbBf1UyTh3wlr1veO6Mj5ruoi4P1bv5CB1QzcE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LV9aNdmzVrg4ajeAIJiByu5HRbOmu8+F/49tKm0Yx20SYag2pnrPd2HUaZy/egW/Y6gNcWMxc4fCxEkyUWtXt/Q0RTBVD0BnWDf7xfMXzZL/ga2f+EpAGtt54IZCh4DwL3JroTnF0Z64U5LU736JQ/FZjr4VO1qC0VD2yHudrG0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RQqKDjKi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RQqKDjKi" 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> Precedence: bulk X-Mailing-List: netdev@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 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