Files
android_kernel_xiaomi_sm8450/include/linux
Martin KaFai Lau 70a217f197 tcp: Use a struct to represent a saved_syn
The TCP_SAVE_SYN has both the network header and tcp header.
The total length of the saved syn packet is currently stored in
the first 4 bytes (u32) of an array and the actual packet data is
stored after that.

A later patch will add a bpf helper that allows to get the tcp header
alone from the saved syn without the network header.  It will be more
convenient to have a direct offset to a specific header instead of
re-parsing it.  This requires to separately store the network hdrlen.
The total header length (i.e. network + tcp) is still needed for the
current usage in getsockopt.  Although this total length can be obtained
by looking into the tcphdr and then get the (th->doff << 2), this patch
chooses to directly store the tcp hdrlen in the second four bytes of
this newly created "struct saved_syn".  By using a new struct, it can
give a readable name to each individual header length.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200820190014.2883694-1-kafai@fb.com
2020-08-24 14:34:59 -07:00
..
2020-08-03 18:19:23 -07:00
2020-06-25 22:25:13 -07:00
2020-06-16 14:19:57 +02:00
2020-07-27 14:55:22 +01:00
2020-05-24 20:48:11 +02:00
2020-07-21 08:24:52 -05:00
2020-07-08 10:48:35 -07:00
2020-07-21 13:26:26 -07:00
2020-05-19 09:40:29 -06:00
2020-04-10 15:36:21 -07:00
2020-06-24 17:08:31 +02:00
2020-06-16 19:25:20 +02:00
2020-07-27 14:29:23 -04:00
2020-05-04 11:19:58 -07:00
2020-06-17 00:07:38 +02:00
2020-08-14 19:56:56 -07:00
2020-05-28 07:59:45 -07:00
2020-07-24 17:12:41 -07:00
2020-04-30 12:54:01 -07:00
2020-08-04 21:02:38 -04:00
2020-07-24 17:12:41 -07:00
2020-05-18 10:30:21 +01:00
2020-06-26 10:01:08 -06:00
2020-06-02 15:15:46 +01:00
2020-05-08 18:18:11 +01:00
2020-05-08 00:12:42 +02:00
2020-05-28 10:31:09 +02:00
2020-07-31 18:08:59 +10:00
2020-07-24 15:41:54 -07:00
2020-05-09 13:57:12 +02:00
2020-07-01 10:49:02 +02:00
2020-07-23 17:34:18 +10:00
2020-05-15 13:51:28 -07:00
2020-05-09 13:57:12 +02:00
2020-07-16 23:19:51 +02:00
2020-07-20 09:39:11 +02:00
2020-08-07 11:33:24 -07:00
2020-05-17 14:10:07 -06:00
2020-05-14 16:44:24 +02:00
2020-05-04 09:16:37 -07:00
2020-05-29 14:52:53 +02:00
2020-07-04 09:35:36 -05:00
2020-07-07 11:58:59 -05:00
2020-08-01 11:28:17 +02:00
2020-04-17 06:05:30 -04:00
2020-06-26 00:27:38 -07:00