Skip to content

Commit

Permalink
net/tls: add TlsDeviceRxResync statistic
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Oct 5, 2019
1 parent 5c5ec66 commit a4d26fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Documentation/networking/tls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions include/uapi/linux/snmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ enum
LINUX_MIB_TLSTXDEVICE, /* TlsTxDevice */
LINUX_MIB_TLSRXDEVICE, /* TlsRxDevice */
LINUX_MIB_TLSDECRYPTERROR, /* TlsDecryptError */
LINUX_MIB_TLSRXDEVICERESYNC, /* TlsRxDeviceResync */
__LINUX_MIB_TLSMAX
};

Expand Down
1 change: 1 addition & 0 deletions net/tls/tls_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions net/tls/tls_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down

0 comments on commit a4d26fd

Please sign in to comment.