net/tls: rename handle_device_resync() [Linux 5.3]

This Linux kernel change "net/tls: rename handle_device_resync()" is included in the Linux 5.3 release. This change is authored by Jakub Kicinski <jakub.kicinski [at] netronome.com> on Mon Jun 10 21:40:01 2019 -0700. The commit for this change in Linux stable tree is fe58a5a (patch).

net/tls: rename handle_device_resync()

handle_device_resync() doesn't describe the function very well.
The function checks if resync should be issued upon parsing of
a new record.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

There are 7 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 include/net/tls.h    | 2 +-
 net/tls/tls_device.c | 2 +-
 net/tls/tls_sw.c     | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/net/tls.h b/include/net/tls.h
index 25641e2..1c512da 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -608,6 +608,6 @@ int tls_sw_fallback_init(struct sock *sk,
 int tls_set_device_offload_rx(struct sock *sk, struct tls_context *ctx);

 void tls_device_offload_cleanup_rx(struct sock *sk);
-void handle_device_resync(struct sock *sk, u32 seq);
+void tls_device_rx_resync_new_rec(struct sock *sk, u32 seq);

 #endif /* _TLS_OFFLOAD_H */
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index 16635f0..0ecfa0e 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -563,7 +563,7 @@ static void tls_device_resync_rx(struct tls_context *tls_ctx,
    clear_bit_unlock(TLS_RX_SYNC_RUNNING, &tls_ctx->flags);
 }

-void handle_device_resync(struct sock *sk, u32 seq)
+void tls_device_rx_resync_new_rec(struct sock *sk, u32 seq)
 {
    struct tls_context *tls_ctx = tls_get_ctx(sk);
    struct tls_offload_context_rx *rx_ctx;
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index c1d2229..bc3a1b1 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2015,7 +2015,8 @@ static int tls_read_size(struct strparser *strp, struct sk_buff *skb)
        goto read_failure;
    }
 #ifdef CONFIG_TLS_DEVICE
-   handle_device_resync(strp->sk, TCP_SKB_CB(skb)->seq + rxm->offset);
+   tls_device_rx_resync_new_rec(strp->sk,
+                    TCP_SKB_CB(skb)->seq + rxm->offset);
 #endif
    return data_len + TLS_HEADER_SIZE;

Leave a Reply

Your email address will not be published. Required fields are marked *