Skip to contentSkip to conversation

mptcp: Remove dss_flags field from struct mptcp_options_received

PATCH In review Peter Krystad 3 participants 3 messages Dec 5, 2019 – Dec 6, 2019

Subsystems (3)
lore
Share & tools
lore

Peter Krystad

author
#0 lore raw

PATCH 1/1 mptcp: Remove dss_flags field from struct mptcp_options_received

This field is used only temporarily while parsing options, use a local variable instead.

Formatted to apply directly to Implement MPTCP receive path.

squashto: Implement MPTCP receive path

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 include/linux/tcp.h |  1 -
 net/mptcp/options.c | 12 ++++++------
 2 files changed, 6 insertions(+), 7 deletions(-)
include/linux/tcp.h +0 -1
index 184fc88a140b..a6d6438b27b1 100644
@@ -107,7 +107,6 @@ struct tcp_options_received {
 			mp_join : 1,
 			dss : 1,
 			version : 4;
-		u8	dss_flags;
 		u8	use_map:1,
 			dsn64:1,
 			data_fin:1,
net/mptcp/options.c +6 -6
index c5c770d2e711..e69d56bfabc4 100644
@@ -99,12 +99,12 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize,
 		pr_debug("DSS");
 		ptr++;
 
-		mp_opt->dss_flags = (*ptr++) & MPTCP_DSS_FLAG_MASK;
-		mp_opt->data_fin = (mp_opt->dss_flags & MPTCP_DSS_DATA_FIN) != 0;
-		mp_opt->dsn64 = (mp_opt->dss_flags & MPTCP_DSS_DSN64) != 0;
-		mp_opt->use_map = (mp_opt->dss_flags & MPTCP_DSS_HAS_MAP) != 0;
-		mp_opt->ack64 = (mp_opt->dss_flags & MPTCP_DSS_ACK64) != 0;
-		mp_opt->use_ack = (mp_opt->dss_flags & MPTCP_DSS_HAS_ACK);
+		flags = (*ptr++) & MPTCP_DSS_FLAG_MASK;
+		mp_opt->data_fin = (flags & MPTCP_DSS_DATA_FIN) != 0;
+		mp_opt->dsn64 = (flags & MPTCP_DSS_DSN64) != 0;
+		mp_opt->use_map = (flags & MPTCP_DSS_HAS_MAP) != 0;
+		mp_opt->ack64 = (flags & MPTCP_DSS_ACK64) != 0;
+		mp_opt->use_ack = (flags & MPTCP_DSS_HAS_ACK);
 
 		pr_debug("data_fin=%d dsn64=%d use_map=%d ack64=%d use_ack=%d",
 			 mp_opt->data_fin, mp_opt->dsn64,
Signature · 1 line
2.17.2
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Peter Krystad

This field is used only temporarily while parsing options, use a local variable instead.

Formatted to apply directly to Implement MPTCP receive path.

squashto: Implement MPTCP receive path

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>

LGTM.

Acked-by Davide Caratti <dcaratti(a)redhat.com>
#2 lore raw

Hi Peter, Davide,

Quoted 6 lines · Davide Caratti
Quoted 5 lines · Peter Krystad

This field is used only temporarily while parsing options, use a local variable instead.

Formatted to apply directly to Implement MPTCP receive path.

Quoted 7 lines
Quoted 3 lines

squashto: Implement MPTCP receive path

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>

LGTM.

Acked-by Davide Caratti <dcaratti(a)redhat.com>

Thank you for the patch and the review!

- 41b4b4c52051: "squashed" in "mptcp: Implement MPTCP receive path"
- d2f877593da0: conflict in t/mptcp-parse-and-emit-MP_CAPABLE-option-according-to-v1-spec
- 1936037fafd4: conflict in t/mptcp-Add-handling-of-incoming-MP_JOIN-requests
- b81566586cde..ff06521bed5e: result

Tests + export are in progress.

Cheers,
Matt

Signature · 5 lines
Matthieu Baerts | R&D Engineer
matthieu.baerts(a)tessares.net
Tessares SA | Hybrid Access Solutions
www.tessares.net
1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium