]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/tls: add TlsDeviceRxResync statistic
authorJakub Kicinski <jakub.kicinski@netronome.com>
Fri, 4 Oct 2019 23:19:27 +0000 (16:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Oct 2019 23:29:00 +0000 (16:29 -0700)
Add a statistic for number of RX resyncs sent down to the NIC.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/tls.rst
include/uapi/linux/snmp.h
net/tls/tls_device.c
net/tls/tls_proc.c

index ab82362dd819ec2f8f099dcbc4ce7bdbfd44a429..8cb2cd4e2a80a49d7d51ef4541d9f7683e94a7e6 100644 (file)
@@ -236,3 +236,6 @@ TLS implementation exposes the following per-namespace statistics
 
 - ``TlsDecryptError`` -
   record decryption failed (e.g. due to incorrect authentication tag)
+
+- ``TlsDeviceRxResync`` -
+  number of RX resyncs sent to NICs handling cryptography
index c9e4963e26f0f2b9f5fba99780995e48aada50d9..7eee233e78d2740e15b2abe445f7b6d40d217846 100644 (file)
@@ -336,6 +336,7 @@ enum
        LINUX_MIB_TLSTXDEVICE,                  /* TlsTxDevice */
        LINUX_MIB_TLSRXDEVICE,                  /* TlsRxDevice */
        LINUX_MIB_TLSDECRYPTERROR,              /* TlsDecryptError */
+       LINUX_MIB_TLSRXDEVICERESYNC,            /* TlsRxDeviceResync */
        __LINUX_MIB_TLSMAX
 };
 
index 5a9a86bf0ee1e02a55e689618a9c1a5907b8d4ef..f306e4c7bf151be53398a0ec1974cb934be12f2f 100644 (file)
@@ -661,6 +661,7 @@ static void tls_device_resync_rx(struct tls_context *tls_ctx,
                netdev->tlsdev_ops->tls_dev_resync(netdev, sk, seq, rcd_sn,
                                                   TLS_OFFLOAD_CTX_DIR_RX);
        clear_bit_unlock(TLS_RX_SYNC_RUNNING, &tls_ctx->flags);
+       TLS_INC_STATS(sock_net(sk), LINUX_MIB_TLSRXDEVICERESYNC);
 }
 
 void tls_device_rx_resync_new_rec(struct sock *sk, u32 rcd_len, u32 seq)
index 2bea7ef4823c2aac3a0a3048994c7f73343a9fa7..83d9c80a684ef06729471510d2899c2aa260090f 100644 (file)
@@ -16,6 +16,7 @@ static const struct snmp_mib tls_mib_list[] = {
        SNMP_MIB_ITEM("TlsTxDevice", LINUX_MIB_TLSTXDEVICE),
        SNMP_MIB_ITEM("TlsRxDevice", LINUX_MIB_TLSRXDEVICE),
        SNMP_MIB_ITEM("TlsDecryptError", LINUX_MIB_TLSDECRYPTERROR),
+       SNMP_MIB_ITEM("TlsRxDeviceResync", LINUX_MIB_TLSRXDEVICERESYNC),
        SNMP_MIB_SENTINEL
 };