netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>, kuba@kernel.org
Cc: netdev@vger.kernel.org, Boris Pismenny <borisp@mellanox.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	Maxim Mikityanskiy <maximmi@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net-next 09/15] Revert "net/tls: Add force_resync for driver resync"
Date: Sat, 27 Jun 2020 14:17:21 -0700	[thread overview]
Message-ID: <20200627211727.259569-10-saeedm@mellanox.com> (raw)
In-Reply-To: <20200627211727.259569-1-saeedm@mellanox.com>

From: Boris Pismenny <borisp@mellanox.com>

This reverts commit b3ae2459f89773adcbf16fef4b68deaaa3be1929.
Revert the force resync API.
Not in use. To be replaced by a better async resync API downstream.

Signed-off-by: Boris Pismenny <borisp@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 include/net/tls.h    | 12 +-----------
 net/tls/tls_device.c |  9 +++------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/include/net/tls.h b/include/net/tls.h
index 3212d3c214a9..ca5f7f437289 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -607,22 +607,12 @@ tls_driver_ctx(const struct sock *sk, enum tls_offload_ctx_dir direction)
 #endif
 
 /* The TLS context is valid until sk_destruct is called */
-#define RESYNC_REQ (1 << 0)
-#define RESYNC_REQ_FORCE (1 << 1)
 static inline void tls_offload_rx_resync_request(struct sock *sk, __be32 seq)
 {
 	struct tls_context *tls_ctx = tls_get_ctx(sk);
 	struct tls_offload_context_rx *rx_ctx = tls_offload_ctx_rx(tls_ctx);
 
-	atomic64_set(&rx_ctx->resync_req, ((u64)ntohl(seq) << 32) | RESYNC_REQ);
-}
-
-static inline void tls_offload_rx_force_resync_request(struct sock *sk)
-{
-	struct tls_context *tls_ctx = tls_get_ctx(sk);
-	struct tls_offload_context_rx *rx_ctx = tls_offload_ctx_rx(tls_ctx);
-
-	atomic64_set(&rx_ctx->resync_req, RESYNC_REQ | RESYNC_REQ_FORCE);
+	atomic64_set(&rx_ctx->resync_req, ((u64)ntohl(seq) << 32) | 1);
 }
 
 static inline void
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index 0e55f8365ce2..a562ebaaa33c 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -694,11 +694,10 @@ void tls_device_rx_resync_new_rec(struct sock *sk, u32 rcd_len, u32 seq)
 {
 	struct tls_context *tls_ctx = tls_get_ctx(sk);
 	struct tls_offload_context_rx *rx_ctx;
-	bool is_req_pending, is_force_resync;
 	u8 rcd_sn[TLS_MAX_REC_SEQ_SIZE];
+	u32 sock_data, is_req_pending;
 	struct tls_prot_info *prot;
 	s64 resync_req;
-	u32 sock_data;
 	u32 req_seq;
 
 	if (tls_ctx->rx_conf != TLS_HW)
@@ -713,11 +712,9 @@ void tls_device_rx_resync_new_rec(struct sock *sk, u32 rcd_len, u32 seq)
 		resync_req = atomic64_read(&rx_ctx->resync_req);
 		req_seq = resync_req >> 32;
 		seq += TLS_HEADER_SIZE - 1;
-		is_req_pending = resync_req & RESYNC_REQ;
-		is_force_resync = resync_req & RESYNC_REQ_FORCE;
+		is_req_pending = resync_req;
 
-		if (likely(!is_req_pending) ||
-		    (!is_force_resync && req_seq != seq) ||
+		if (likely(!is_req_pending) || req_seq != seq ||
 		    !atomic64_try_cmpxchg(&rx_ctx->resync_req, &resync_req, 0))
 			return;
 		break;
-- 
2.26.2


  parent reply	other threads:[~2020-06-27 21:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-27 21:17 [pull request][net-next 00/15] mlx5 tls rx offload 2020-06-26 Saeed Mahameed
2020-06-27 21:17 ` [net-next 01/15] net/mlx5e: Turn XSK ICOSQ into a general asynchronous one Saeed Mahameed
2020-06-27 21:17 ` [net-next 02/15] net/mlx5e: Refactor build channel params Saeed Mahameed
2020-06-27 21:17 ` [net-next 03/15] net/mlx5e: API to manipulate TTC rules destinations Saeed Mahameed
2020-06-27 21:17 ` [net-next 04/15] net/mlx5e: Receive flow steering framework for accelerated TCP flows Saeed Mahameed
2020-06-27 22:34   ` Tom Herbert
2020-06-29  6:57     ` Saeed Mahameed
2020-06-29 14:25       ` Tom Herbert
2020-06-27 21:17 ` [net-next 05/15] net/mlx5e: Accel, Expose flow steering API for rules add/del Saeed Mahameed
2020-06-27 21:17 ` [net-next 06/15] net/mlx5e: kTLS, Improve TLS feature modularity Saeed Mahameed
2020-06-27 21:17 ` [net-next 07/15] net/mlx5e: kTLS, Use kernel API to extract private offload context Saeed Mahameed
2020-06-27 21:17 ` [net-next 08/15] net/mlx5e: kTLS, Add kTLS RX HW offload support Saeed Mahameed
2020-06-27 21:17 ` Saeed Mahameed [this message]
2020-07-08  6:44   ` [net-next 09/15] Revert "net/tls: Add force_resync for driver resync" Tariq Toukan
2020-06-27 21:17 ` [net-next 10/15] net/tls: Add asynchronous resync Saeed Mahameed
2020-06-27 21:17 ` [net-next 11/15] net/mlx5e: kTLS, Add kTLS RX resync support Saeed Mahameed
2020-06-27 21:17 ` [net-next 12/15] net/mlx5e: kTLS, Add kTLS RX stats Saeed Mahameed
2020-06-27 21:17 ` [net-next 13/15] net/mlx5e: Increase Async ICO SQ size Saeed Mahameed
2020-06-27 21:17 ` [net-next 14/15] net/mlx5e: kTLS, Cleanup redundant capability check Saeed Mahameed
2020-06-27 21:17 ` [net-next 15/15] net/mlx5e: kTLS, Improve rx handler function call Saeed Mahameed
2020-06-30  0:24 ` [pull request][net-next 00/15] mlx5 tls rx offload 2020-06-26 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=20200627211727.259569-10-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=maximmi@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=tariqt@mellanox.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;
as well as URLs for NNTP newsgroup(s).