* [MPTCP] [PATCH 3/3] mptcp:options: merge two holes in one
@ 2019-10-02 16:40 Matthieu Baerts
0 siblings, 0 replies; only message in thread
From: Matthieu Baerts @ 2019-10-02 16:40 UTC (permalink / raw)
To: mptcp
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
Instead of having two u8 not fully used, we switch to one u16 with only
one "__unused" variable.
I guess we will want to optimise this code in
'struct tcp_options_received' to use even more unions and reduce the
structure size, e.g. we cannot receive an MP_CAPABLE option and an
MP_JOIN one, etc.
Signed-off-by: Matthieu Baerts <matthieu.baerts(a)tessares.net>
---
include/linux/tcp.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 58902cea4a26..b6fce4c93f3a 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -115,15 +115,15 @@ struct tcp_options_received {
u64 thmac;
u8 hmac[20];
u8 dss_flags;
- u8 use_map:1,
- dsn64:1,
- data_fin:1,
- use_ack:1,
- ack64:1,
- __unused:3;
- u8 add_addr : 1,
+ u16 use_map : 1,
+ dsn64 : 1,
+ data_fin : 1,
+ use_ack : 1,
+ ack64 : 1,
+ add_addr : 1,
rm_addr : 1,
family : 4;
+ __unused : 5;
u8 addr_id;
union {
struct in_addr addr;
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-02 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 16:40 [MPTCP] [PATCH 3/3] mptcp:options: merge two holes in one Matthieu Baerts
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.