[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0bbd66a4-add6-7056-2fb4-c1a5cc377f7d@intel.com>
Date: Mon, 21 Nov 2022 09:55:42 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, Jiri Pirko <jiri@...dia.com>
Subject: Re: [PATCH net-next 5/8] devlink: refactor region_read_snapshot_fill
to use a callback function
On 11/18/2022 5:48 PM, Jakub Kicinski wrote:
> On Thu, 17 Nov 2022 14:08:00 -0800 Jacob Keller wrote:
>> + /* Allocate and re-use a single buffer */
>> + data = kzalloc(DEVLINK_REGION_READ_CHUNK_SIZE, GFP_KERNEL);
>> + if (!data)
>> + return -ENOMEM;
>
> Why zalloc? If we expect drivers may underfill we should let them
> return actual length.
>
Probably just habit. Let me check on this one. I don't think there's a
particular reason that drivers would under fill since they're in control
of the region size.
Thanks,
Jake
Powered by blists - more mailing lists