[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230313151844.6eee28c6@kernel.org>
Date: Mon, 13 Mar 2023 15:18:44 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: David Laight <David.Laight@...LAB.COM>
Cc: 'Horatiu Vultur' <horatiu.vultur@...rochip.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"richardcochran@...il.com" <richardcochran@...il.com>,
"UNGLinuxDriver@...rochip.com" <UNGLinuxDriver@...rochip.com>
Subject: Re: [PATCH net-next 2/2] net: lan966x: Stop using packing library
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.
Powered by blists - more mailing lists