From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69ABFC4332F for ; Mon, 28 Nov 2022 19:00:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232220AbiK1TAO (ORCPT ); Mon, 28 Nov 2022 14:00:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231734AbiK1TAN (ORCPT ); Mon, 28 Nov 2022 14:00:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68ABE24BF5 for ; Mon, 28 Nov 2022 11:00:09 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 01605613C5 for ; Mon, 28 Nov 2022 19:00:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36AF1C433D7; Mon, 28 Nov 2022 19:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1669662008; bh=MJuMaWfuHqsDQ1pSCuRgBmvfdr+ZHwUfh6yhD9zD5uY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=X8ii6oP2VlwwX0Zh+kAvjEN4NpTQyLquUnQyzUW/qniEYdj+MRBwH+m4amYueiAUS Wd7bZC/B60/mdAr0n+rmibN9CTKKuTDBlduHmVvGNmuQwQHT300tfwAR3QTB2d/dQU p1fE4dHzt76hNZvmJMxhJF720cgqyh+MAAGhFZtd8R2LOt1DZxPHyqKAEsp8FgDUkc xUdCpPzHK1seV9V6AK8O8YfakbYfe0pZGLfjOXSKdebbe5Uvyaa+9f6NF95eiXNppG fBfC9UZIKhq8CXXpMAr02u+zOrNHEVlNtw89OWnNZGMxzkdm6IfytPaPW7NdOG1aS/ MxVppvVcRvZ4A== Date: Mon, 28 Nov 2022 11:00:07 -0800 From: Jakub Kicinski To: "Keller, Jacob E" Cc: Jiri Pirko , "netdev@vger.kernel.org" , Jiri Pirko Subject: Re: [PATCH net-next v2 5/9] devlink: refactor region_read_snapshot_fill to use a callback function Message-ID: <20221128110007.0c362163@kernel.org> In-Reply-To: References: <20221123203834.738606-1-jacob.e.keller@intel.com> <20221123203834.738606-6-jacob.e.keller@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 28 Nov 2022 18:27:42 +0000 Keller, Jacob E wrote: > > Hmm, I tried to figure out how to do this without extra alloc and > > memcpy, didn't find any nice solution :/ > > I also came up blank as well :( I can take another look when sending v3 with the other fixups. You can certainly rearrange things to nla_reserve() the space in the message and pass to the driver a pointer to a buffer already in the skb. But I don't think it's worth the code complexity.