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
297297 LINUX_MIB_TCPMIGRATEREQSUCCESS, /* TCPMigrateReqSuccess */
298298 LINUX_MIB_TCPMIGRATEREQFAILURE, /* TCPMigrateReqFailure */
299299 LINUX_MIB_TCPPLBREHASH, /* TCPPLBRehash */
300+ LINUX_MIB_TCPAOREQUIRED, /* TCPAORequired */
301+ LINUX_MIB_TCPAOBAD, /* TCPAOBad */
302+ LINUX_MIB_TCPAOKEYNOTFOUND, /* TCPAOKeyNotFound */
303+ LINUX_MIB_TCPAOGOOD, /* TCPAOGood */
300304 __LINUX_MIB_MAX
301305 };
302306
include/uapi/linux/tcp.h+7−1
@@ -404,9 +404,15 @@ struct tcp_ao_info_opt { /* setsockopt(TCP_AO_INFO) */ · 403 unmodified lines
404404 __u32 set_current :1, /* corresponding ::current_key */
405405 set_rnext :1, /* corresponding ::rnext */
406406 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 */
408410 __u8 current_key; /* KeyID to set as Current_key */
409411 __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 */
410416 } __attribute__((aligned(8)));
411417
412418 /* 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