From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [net-next v5 3/3] net/tls: Remove redundant array allocation. Date: Sat, 21 Jul 2018 19:25:32 -0700 (PDT) Message-ID: <20180721.192532.520509909556885779.davem@davemloft.net> References: <20180719162613.27184-1-vakul.garg@nxp.com> <20180719162613.27184-4-vakul.garg@nxp.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, borisp@mellanox.com, aviadye@mellanox.com, davejwatson@fb.com To: vakul.garg@nxp.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:48096 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728166AbeGVDU3 (ORCPT ); Sat, 21 Jul 2018 23:20:29 -0400 In-Reply-To: <20180719162613.27184-4-vakul.garg@nxp.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Vakul Garg Date: Thu, 19 Jul 2018 21:56:13 +0530 > In function decrypt_skb(), array allocation in case when sgout is NULL > is unnecessary. Instead, local variable sgin_arr[] can be used. > > Signed-off-by: Vakul Garg Hmmm... Dave, can you take a look at this? Do you think there might have been a reason you felt that you needed to dynamically allocate the scatterlists when you COW and skb and do in-place decryption? I guess this change is ok, nsg can only get smaller when the SKB is COW'd.