[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240821202110.x6ljy3x3ixvbg43r@skbuf>
Date: Wed, 21 Aug 2024 23:21:10 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Jacob Keller <jacob.e.keller@...el.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: lib/packing.c behaving weird if buffer length is not multiple of
4 with QUIRK_LSW32_IS_FIRST
On Wed, Aug 21, 2024 at 12:12:00PM -0700, Jacob Keller wrote:
> Ok. I'll investigate this, and I will send the two fixes for lib/packing
> in my series to implement the support in ice. That would help on our end
> with managing the changes since it avoids an interdependence between
> multiple series in flight.
There's one patch in there which replaces the packing(PACK) call with a
dedicated pack() function, and packing(UNPACK) with unpack(). The idea
being that it helps with const correctness. I still have some mixed
feelings about this, because a multiplexed packing() call is in some
ways more flexible, but apparently others felt bad enough about the
packing() API to tell me about it, and that stuck with me.
I'm mentioning it because if you're going to use the API, you could at
least consider using the const-correct form, so that there's one less
driver to refactor later.
Powered by blists - more mailing lists