History

tcp: extend TCP flags to allow AE bit/ACE field

With AccECN, there's one additional TCP flag to be used (AE) and ACE field that overloads the definition of AE, CWR, and ECE flags. As tcp_flags was previously only 1 byte, the byte-order stuff needs to be added to it's handling.

Ilpo Järvinen committed 1 year ago

Commit 2c2f08d1 parent 0114a916 files · +26 −14Browse files

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

Unified · Split

include/uapi/linux/tcp.h+6−3
@@ -28,7 +28,8 @@ struct tcphdr { · 27 unmodified lines
2828 __be32 seq;
2929 __be32 ack_seq;
3030 #if defined(__LITTLE_ENDIAN_BITFIELD)
31− __u16 res1:4,
31+ __u16 ae:1,
32+ res1:3,
3233 doff:4,
3334 fin:1,
3435 syn:1,
@@ -40,7 +41,8 @@ struct tcphdr { · 5 unmodified lines
4041 cwr:1;
4142 #elif defined(__BIG_ENDIAN_BITFIELD)
4243 __u16 doff:4,
43− res1:4,
44+ res1:3,
45+ ae:1,
4446 cwr:1,
4547 ece:1,
4648 urg:1,
@@ -70,6 +72,7 @@ union tcp_word_hdr { · 23 unmodified lines
7072 #define tcp_flag_word(tp) (((union tcp_word_hdr *)(tp))->words[3])
7173
7274 enum {
75+ TCP_FLAG_AE = __constant_cpu_to_be32(0x01000000),
7376 TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000),
7477 TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000),
7578 TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000),
@@ -78,7 +81,7 @@ enum { · 2 unmodified lines
7881 TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000),
7982 TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000),
8083 TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000),
81− TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000),
84+ TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0E000000),
8285 TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000)
8386 };
8487