Re: [PATCH net-next 2/2] net: lan966x: Stop using packing library
From: Jakub Kicinski
Date: Mon Mar 13 2023 - 18:18:53 EST
On Mon, 13 Mar 2023 17:04:11 +0000 David Laight wrote:
> It has to be possible to do much better that that.
> Given that 'pos' and 'length' are always constants it looks like
> each call should reduce to (something like):
> ifh[k] |= val << n;
> ifk[k + 1] |= val >> (8 - n);
> ...
> It might be that the compiler manages to do this, but I doubt it.
Agreed, going bit-by-bit seems overly cautious.