[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231018170605.392efc0d@kernel.org>
Date: Wed, 18 Oct 2023 17:06:05 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Shinas Rasheed <srasheed@...vell.com>
Cc: <horms@...nel.org>, <linux-kernel@...r.kernel.org>,
<pabeni@...hat.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
<egallen@...hat.com>, <hgani@...vell.com>, <mschmidt@...hat.com>,
<netdev@...r.kernel.org>, <sedara@...vell.com>,
<vburru@...vell.com>, <vimleshk@...vell.com>
Subject: Re: [net-next PATCH v3] octeon_ep: pack hardware structure
On Mon, 16 Oct 2023 02:20:51 -0700 Shinas Rasheed wrote:
> Clean up structure defines related to hardware data to be
> attributed 'packed' in the code, as padding is not allowed
> by hardware.
Looks like the patch was marked as Changes Requested in pw.
I'm guessing it's because we generally discourage __packed.
It's better to add size asserts, e.g.:
static_assert(sizeof(struct octep_oq_desc_hw) == 16);
__packed also implies lack of alignment, which may force compiler
to generate worse code.
Powered by blists - more mailing lists