From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH net-next] net/tls: Do not call msg_data_left() twice Date: Wed, 25 Jul 2018 02:49:20 +0100 Message-ID: <20180725014920.GJ30522@ZenIV.linux.org.uk> References: <20180724111118.15415-1-vakul.garg@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, borisp@mellanox.com, aviadye@mellanox.com, davejwatson@fb.com, davem@davemloft.net To: Vakul Garg Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:39510 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727504AbeGYC6k (ORCPT ); Tue, 24 Jul 2018 22:58:40 -0400 Content-Disposition: inline In-Reply-To: <20180724111118.15415-1-vakul.garg@nxp.com> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jul 24, 2018 at 04:41:18PM +0530, Vakul Garg wrote: > In function tls_sw_sendmsg(), msg_data_left() needs to be called only > once. The second invocation of msg_data_left() for assigning variable > try_to_copy can be removed and merged with the first one. You do realize that msg_data_left(msg) is simply msg->msg_iter.count? So I'm not at all sure that your change will be an overall win...