Netdev List
 help / color / mirror / Atom feed
From: Dave Watson <davejwatson@fb.com>
To: Vakul Garg <vakul.garg@nxp.com>
Cc: Boris Pismenny <borisp@mellanox.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"aviadye@mellanox.com" <aviadye@mellanox.com>
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	[thread overview]
Message-ID: <20180712143128.GA11043@macbook-pro-6.local.dhcp.thefacebook.com> (raw)
In-Reply-To: <DB7PR04MB425292189C05496BD550D3F28B590@DB7PR04MB4252.eurprd04.prod.outlook.com>

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.

      reply	other threads:[~2018-07-12 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12 11:03 [PATCH net-next] net/tls: Removed redundant variable from 'struct tls_sw_context_rx' Vakul Garg
2018-07-12 10:41 ` Boris Pismenny
2018-07-12 11:14   ` Vakul Garg
2018-07-12 14:31     ` Dave Watson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180712143128.GA11043@macbook-pro-6.local.dhcp.thefacebook.com \
    --to=davejwatson@fb.com \
    --cc=aviadye@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vakul.garg@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox