From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Watson Subject: Re: [PATCH net-next] net/tls: Removed redundant variable from 'struct tls_sw_context_rx' Date: Thu, 12 Jul 2018 07:31:28 -0700 Message-ID: <20180712143128.GA11043@macbook-pro-6.local.dhcp.thefacebook.com> References: <20180712110350.25011-1-vakul.garg@nxp.com> <3e1dfaea-8895-69fc-476f-b80124713652@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Boris Pismenny , "davem@davemloft.net" , "netdev@vger.kernel.org" , "aviadye@mellanox.com" To: Vakul Garg Return-path: Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:52184 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727094AbeGLOku (ORCPT ); Thu, 12 Jul 2018 10:40:50 -0400 Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On 07/12/18 11:14 AM, Vakul Garg wrote: > Hi Boris > > Thanks for explaining. > Few questions/observations. > > 1. Isn't ' ctx->decrypted = true' a redundant statement in tls_do_decryption()? > The same has been repeated in tls_recvmsg() after calling decrypt_skb()? > > 2. Similarly, ctx->saved_data_ready(sk) seems not required in tls_do_decryption(). > This is because tls_do_decryption() is already triggered from tls_recvmsg() i.e. from user space app context. > > 3. In tls_queue(), I think strp->sk->sk_state_change() needs to be replaced with ctx->saved_data_ready(). Yes, I think these 3 can all be changed. #2 would be required if do_decryption ever is called not in user context, but that's not the case currently.