History

net/tcp: Add TCP_AO_REPAIR

Add TCP_AO_REPAIR setsockopt(), getsockopt(). They let a user to repair TCP-AO ISNs/SNEs. Also let the user hack around when (tp->repair) is on and add ao_info on a socket in any supported state. As SNEs now can be read/written at any moment, use WRITE_ONCE()/READ_ONCE() to set/read them.

Dmitry Safonov committed 3 years ago

Commit faadfab1 parent 248411b4 files · +125 −11Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/tcp.h+8−0
@@ -133,6 +133,7 @@ enum { · 132 unmodified lines
133#define TCP_AO_DEL_KEY 39 /* Delete MKT */133#define TCP_AO_DEL_KEY 39 /* Delete MKT */
134#define TCP_AO_INFO 40 /* Set/list TCP-AO per-socket options */134#define TCP_AO_INFO 40 /* Set/list TCP-AO per-socket options */
135#define TCP_AO_GET_KEYS 41 /* List MKT(s) */135#define TCP_AO_GET_KEYS 41 /* List MKT(s) */
136#define TCP_AO_REPAIR 42 /* Get/Set SNEs and ISNs */
136 137
137#define TCP_REPAIR_ON 1138#define TCP_REPAIR_ON 1
138#define TCP_REPAIR_OFF 0139#define TCP_REPAIR_OFF 0
@@ -458,6 +459,13 @@ struct tcp_ao_getsockopt { /* getsockopt(TCP_AO_GET_KEYS) */ · 319 unmodified lines
458 __u64 pkt_bad; /* out: segments that failed verification */459 __u64 pkt_bad; /* out: segments that failed verification */
459} __attribute__((aligned(8)));460} __attribute__((aligned(8)));
460 461
462struct tcp_ao_repair { /* {s,g}etsockopt(TCP_AO_REPAIR) */
463 __be32 snt_isn;
464 __be32 rcv_isn;
465 __u32 snd_sne;
466 __u32 rcv_sne;
467} __attribute__((aligned(8)));
468
461/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */469/* setsockopt(fd, IPPROTO_TCP, TCP_ZEROCOPY_RECEIVE, ...) */
462 470
463#define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1471#define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1

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