Thanks for the comment. I will take this patch out of the series.
> -----Original Message----- > From: Boris Pismenny [mailto:bor...@mellanox.com] > Sent: Thursday, July 19, 2018 3:58 PM > To: Vakul Garg <vakul.g...@nxp.com>; netdev@vger.kernel.org > Cc: avia...@mellanox.com; davejwat...@fb.com; da...@davemloft.net > Subject: Re: [net-next v3 1/5] net/tls: Do not enable zero-copy prematurely > > Hi Vakul, > > On 7/19/2018 7:16 AM, Vakul Garg wrote: > > Zero-copy mode was left enabled even when zerocopy_from_iter() failed. > > Set the zero-copy mode only when zerocopy_from_iter() succeeds. This > > leads to removal of argument 'zc' of function decrypt_skb_update(). > > Function decrypt_skb_update() does not need to check whether > > ctx->decrypted is set since it is never called if ctx->decrypted is > > true. > > > > This patch breaks our tls_device code for the following 2 reasons: > 1. We need to disable zerocopy if the device decrypted the record, because > decrypted data has to be copied to user buffers. > 2. ctx->decrypted must be checked in decrypt_skb_update, because it might > change after calling tls_device_decrypted.