Subject: [PATCH iproute2-next v2] ss: Shorter display format for TLS zerocopy sendfile

From: Jakub Kicinski <[email-masked]>
Date: Wed, 1 Jun 2022 16:42:49 -0700

Commit 21c07b45688f ("ss: Show zerocopy sendfile status of TLS
sockets") used "key: value" format for the sendfile read-only
optimization. Move to a more appropriate "flag" display format.
Rename the flag to something based on the assumption it allows
the kernel to make. Avoid "salesman speak", the term "zero-copy"
is particularly confusing in TLS where we call decrypt/encrypt
directly from user space a zero-copy as well.

Signed-off-by: Jakub Kicinski <[email-masked]>
---
 misc/ss.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/misc/ss.c b/misc/ss.c
index c4434a20bcfe..ac678c296006 100644
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -2988,7 +2988,8 @@ 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");
+	if (attr)
+		out(" sendfile_ro");
 }
 
 static void mptcp_subflow_info(struct rtattr *tb[])
-- 
2.36.1