diff mbox series

mptcp: Remove dss_flags field from struct mptcp_options_received

Message ID 20191205234358.27455-1-peter.krystad@linux.intel.com
State Accepted, archived
Delegated to: Matthieu Baerts
Headers show
Series mptcp: Remove dss_flags field from struct mptcp_options_received | expand

Commit Message

Peter Krystad Dec. 5, 2019, 11:43 p.m. UTC
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@linux.intel.com>
---
 include/linux/tcp.h |  1 -
 net/mptcp/options.c | 12 ++++++------
 2 files changed, 6 insertions(+), 7 deletions(-)

Comments

Davide Caratti Dec. 6, 2019, 8:33 a.m. UTC | #1
On Thu, 2019-12-05 at 15:43 -0800, Peter Krystad wrote:
> 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@linux.intel.com>

LGTM.

Acked-by: Davide Caratti <dcaratti@redhat.com>
Matthieu Baerts Dec. 6, 2019, 4:59 p.m. UTC | #2
Hi Peter, Davide,

On 06/12/2019 09:33, Davide Caratti wrote:
> On Thu, 2019-12-05 at 15:43 -0800, Peter Krystad wrote:
>> 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@linux.intel.com>
> 
> LGTM.
> 
> Acked-by: Davide Caratti <dcaratti@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
diff mbox series

Patch

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 184fc88a140b..a6d6438b27b1 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -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,
diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index c5c770d2e711..e69d56bfabc4 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -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,