History

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.

Dmitry Safonov committed 3 years ago

Commit af09a341 parent 0a3a8099 files · +77 −15Browse files

Showing the changes to include/uapi (2 of 9 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/snmp.h +4 −0
  2. include/uapi/linux/tcp.h +7 −1
include/uapi/linux/snmp.h+4−0
@@ -297,6 +297,10 @@ enum · 296 unmodified lines
297 LINUX_MIB_TCPMIGRATEREQSUCCESS, /* TCPMigrateReqSuccess */297 LINUX_MIB_TCPMIGRATEREQSUCCESS, /* TCPMigrateReqSuccess */
298 LINUX_MIB_TCPMIGRATEREQFAILURE, /* TCPMigrateReqFailure */298 LINUX_MIB_TCPMIGRATEREQFAILURE, /* TCPMigrateReqFailure */
299 LINUX_MIB_TCPPLBREHASH, /* TCPPLBRehash */299 LINUX_MIB_TCPPLBREHASH, /* TCPPLBRehash */
300 LINUX_MIB_TCPAOREQUIRED, /* TCPAORequired */
301 LINUX_MIB_TCPAOBAD, /* TCPAOBad */
302 LINUX_MIB_TCPAOKEYNOTFOUND, /* TCPAOKeyNotFound */
303 LINUX_MIB_TCPAOGOOD, /* TCPAOGood */
300 __LINUX_MIB_MAX304 __LINUX_MIB_MAX
301};305};
302 306
include/uapi/linux/tcp.h+7−1
@@ -404,9 +404,15 @@ struct tcp_ao_info_opt { /* setsockopt(TCP_AO_INFO) */ · 403 unmodified lines
404 __u32 set_current :1, /* corresponding ::current_key */404 __u32 set_current :1, /* corresponding ::current_key */
405 set_rnext :1, /* corresponding ::rnext */405 set_rnext :1, /* corresponding ::rnext */
406 ao_required :1, /* don't accept non-AO connects */406 ao_required :1, /* don't accept non-AO connects */
407 reserved :29; /* must be 0 */407 set_counters :1, /* set/clear ::pkt_* counters */
408 reserved :28; /* must be 0 */
409 __u16 reserved2; /* padding, must be 0 */
408 __u8 current_key; /* KeyID to set as Current_key */410 __u8 current_key; /* KeyID to set as Current_key */
409 __u8 rnext; /* KeyID to set as Rnext_key */411 __u8 rnext; /* KeyID to set as Rnext_key */
412 __u64 pkt_good; /* verified segments */
413 __u64 pkt_bad; /* failed verification */
414 __u64 pkt_key_not_found; /* could not find a key to verify */
415 __u64 pkt_ao_required; /* segments missing TCP-AO sign */
410} __attribute__((aligned(8)));416} __attribute__((aligned(8)));
411 417
412/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */418/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t