aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maximmi@nvidia.com>2022-05-30 17:14:38 +0300
committerDavid Ahern <dsahern@kernel.org>2022-05-30 09:52:55 -0600
commit21c07b45688fee4e3b690816ecc4d5206d15a135 (patch)
tree4e273f306b80a12662a56a13e79e045e701187a6
parent2a0541810c85bc948de183ca62e931a3d6fd9a16 (diff)
downloadiproute2-21c07b45688fee4e3b690816ecc4d5206d15a135.tar.gz
ss: Show zerocopy sendfile status of TLS sockets
Print the activation status of zerocopy sendfile on TLS sockets. Zerocopy sendfile was recently added to Linux and exposed via sock_diag. Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Signed-off-by: David Ahern <dsahern@kernel.org>
-rw-r--r--misc/ss.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/ss.c b/misc/ss.c
index 4b3ca9c4e..57677cf25 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -2952,6 +2952,11 @@ static void tcp_tls_conf(const char *name, struct rtattr *attr)
}
}
+static void tcp_tls_zc_sendfile(struct rtattr *attr)
+{
+ out(" zerocopy_sendfile: %s", attr ? "active" : "inactive");
+}
+
static void mptcp_subflow_info(struct rtattr *tb[])
{
u_int32_t flags = 0;
@@ -3182,6 +3187,7 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r,
tcp_tls_cipher(tlsinfo[TLS_INFO_CIPHER]);
tcp_tls_conf("rxconf", tlsinfo[TLS_INFO_RXCONF]);
tcp_tls_conf("txconf", tlsinfo[TLS_INFO_TXCONF]);
+ tcp_tls_zc_sendfile(tlsinfo[TLS_INFO_ZC_SENDFILE]);
}
if (ulpinfo[INET_ULP_INFO_MPTCP]) {
struct rtattr *sfinfo[MPTCP_SUBFLOW_ATTR_MAX + 1] =