summaryrefslogtreecommitdiff
path: root/include/uapi/linux/tcp.h
diff options
context:
space:
mode:
authorDmitry Safonov <dima@arista.com>2023-10-23 20:22:05 +0100
committerDavid S. Miller <davem@davemloft.net>2023-10-27 10:35:45 +0100
commitaf09a341dcf63b34ce742295ad1ce876246c5de2 (patch)
tree7cb38d0d08bc96cc8398c465c0a6de76245fc0d6 /include/uapi/linux/tcp.h
parent0a3a809089eb1d4a0a2fd0c16b520d603988c859 (diff)
net/tcp: Add TCP-AO segments counters
Introduce segment counters that are useful for troubleshooting/debugging as well as for writing tests. Now there are global snmp counters as well as per-socket and per-key. Co-developed-by: Francesco Ruggeri <fruggeri@arista.com> Signed-off-by: Francesco Ruggeri <fruggeri@arista.com> Co-developed-by: Salam Noureddine <noureddine@arista.com> Signed-off-by: Salam Noureddine <noureddine@arista.com> Signed-off-by: Dmitry Safonov <dima@arista.com> Acked-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/tcp.h')
-rw-r--r--include/uapi/linux/tcp.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index fa49f03e62fe..9c48964849d1 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -404,9 +404,15 @@ struct tcp_ao_info_opt { /* setsockopt(TCP_AO_INFO) */
__u32 set_current :1, /* corresponding ::current_key */
set_rnext :1, /* corresponding ::rnext */
ao_required :1, /* don't accept non-AO connects */
- reserved :29; /* must be 0 */
+ set_counters :1, /* set/clear ::pkt_* counters */
+ reserved :28; /* must be 0 */
+ __u16 reserved2; /* padding, must be 0 */
__u8 current_key; /* KeyID to set as Current_key */
__u8 rnext; /* KeyID to set as Rnext_key */
+ __u64 pkt_good; /* verified segments */
+ __u64 pkt_bad; /* failed verification */
+ __u64 pkt_key_not_found; /* could not find a key to verify */
+ __u64 pkt_ao_required; /* segments missing TCP-AO sign */
} __attribute__((aligned(8)));
/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */