From: Vakul Garg <vakul.garg@nxp.com>
To: netdev@vger.kernel.org
Cc: borisp@mellanox.com, aviadye@mellanox.com, davejwatson@fb.com,
davem@davemloft.net, Vakul Garg <vakul.garg@nxp.com>
Subject: [net-next v2 3/5] net/tls: Remove redundant variable assignments and wakeup
Date: Mon, 16 Jul 2018 21:27:13 +0530 [thread overview]
Message-ID: <20180716155715.13987-3-vakul.garg@nxp.com> (raw)
In-Reply-To: <20180716155715.13987-1-vakul.garg@nxp.com>
In function decrypt_skb_update(), the assignment to tls receive context
variable 'decrypted' is redundant as the same is being done in function
tls_sw_recvmsg() after calling decrypt_skb_update(). Also calling callback
function to wakeup processes sleeping on socket data availability is
useless as decrypt_skb_update() is invoked from user processes only. This
patch cleans these up.
Signed-off-by: Vakul Garg <vakul.garg@nxp.com>
---
net/tls/tls_sw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 186152dced25..6eaaa587db71 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -675,8 +675,6 @@ static int decrypt_skb_update(struct sock *sk, struct sk_buff *skb,
rxm->offset += tls_ctx->rx.prepend_size;
rxm->full_len -= tls_ctx->rx.overhead_size;
tls_advance_record_sn(sk, &tls_ctx->rx);
- ctx->decrypted = true;
- ctx->saved_data_ready(sk);
return err;
}
--
2.13.6
next prev parent reply other threads:[~2018-07-16 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 15:57 [net-next v2 1/5] net/tls: Do not enable zero-copy prematurely Vakul Garg
2018-07-16 15:57 ` [net-next v2 2/5] net/tls: Use socket data_ready callback on record availability Vakul Garg
2018-07-16 15:57 ` Vakul Garg [this message]
2018-07-16 15:57 ` [net-next v2 4/5] net/tls: Remove redundant array allocation Vakul Garg
2018-07-16 15:57 ` [net-next v2 5/5] net/tls: Rework error checking after decrypt_skb_update() Vakul Garg
2018-07-18 20:23 ` [net-next v2 1/5] net/tls: Do not enable zero-copy prematurely David Miller
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=20180716155715.13987-3-vakul.garg@nxp.com \
--to=vakul.garg@nxp.com \
--cc=aviadye@mellanox.com \
--cc=borisp@mellanox.com \
--cc=davejwatson@fb.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).