Skip to contentSkip to conversation

mptcp: Remove version field from subflow_request_sock

PATCH In review Peter Krystad 2 participants 4 messages Dec 12, 2019 – Dec 13, 2019

Subsystems (2)
lore
Share & tools
lore

Peter Krystad

author
#0 lore raw

PATCH 1/1 mptcp: Remove version field from subflow_request_sock

This field is not used. Version checking is performed in mptcp_parse_options().

squashto: Create SUBFLOW socket for incoming connections

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/protocol.h | 3 +--
 net/mptcp/subflow.c  | 4 ----
 2 files changed, 1 insertion(+), 6 deletions(-)
net/mptcp/protocol.h +1 -2
index 3ac8cb7f38fd..b43fa3ec5d23 100644
@@ -56,8 +56,7 @@ struct mptcp_subflow_request_sock {
 	struct	tcp_request_sock sk;
 	u8	mp_capable : 1,
 		mp_join : 1,
-		backup : 1,
-		version : 4;
+		backup : 1;
 	u64	local_key;
 	u64	remote_key;
 };
net/mptcp/subflow.c +0 -4
index 9f148d19ee10..1874e41066bb 100644
@@ -43,10 +43,6 @@ static void subflow_init_req(struct request_sock *req,
 
 	if (rx_opt.mptcp.mp_capable && listener->request_mptcp) {
 		subflow_req->mp_capable = 1;
-		if (rx_opt.mptcp.version >= listener->request_version)
-			subflow_req->version = listener->request_version;
-		else
-			subflow_req->version = rx_opt.mptcp.version;
 		subflow_req->remote_key = rx_opt.mptcp.sndr_key;
 	}
 }
Signature · 1 line
2.17.2
#1 lore raw

Hi Peter, Paolo,

Quoted 4 lines · Peter Krystad

This field is not used. Version checking is performed in mptcp_parse_options().

squashto: Create SUBFLOW socket for incoming connections

Thank you for the patch and the review!

- 24201a067136: "squashed" in "mptcp: Create SUBFLOW socket for incoming connections"
- 222ce475568a: conflict in t/mptcp-Add-key-generation-and-token-tree
- 3f97d6a7010d: conflict in t/mptcp-parse-and-emit-MP_CAPABLE-option-according-to-v1-spec
- bc5f2367d3e2: conflict in t/mptcp-process-MP_CAPABLE-data-option
- bc5f2367d3e2: conflict in t/mptcp-process-MP_CAPABLE-data-option
- 55f1d621d32b..c5b8ad49fc3a: result

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
#3 lore raw
In reply to Peter Krystad

Hi Peter,

Quoted 30 lines · Peter Krystad

This field is not used. Version checking is performed in mptcp_parse_options().

squashto: Create SUBFLOW socket for incoming connections

Signed-off-by Peter Krystad <peter.krystad(a)linux.intel.com>
---
  net/mptcp/protocol.h | 3 +--
  net/mptcp/subflow.c  | 4 ----
  2 files changed, 1 insertion(+), 6 deletions(-)
net/mptcp/protocol.h +1 -2
index 3ac8cb7f38fd..b43fa3ec5d23 100644
@@ -56,8 +56,7 @@ struct mptcp_subflow_request_sock {
  	struct	tcp_request_sock sk;
  	u8	mp_capable : 1,
  		mp_join : 1,
-		backup : 1,
-		version : 4;
+		backup : 1;
  	u64	local_key;
  	u64	remote_key;
  };
net/mptcp/subflow.c +0 -0
index 9f148d19ee10..1874e41066bb 100644

net/mptcp/subflow.c static void subflow_init_req(struct request_sock *req, · line 48

Quoted 10 lines
net/mptcp/subflow.c +0 -4
@@ -43,10 +43,6 @@ static void subflow_init_req(struct request_sock *req,
 
  	if (rx_opt.mptcp.mp_capable && listener->request_mptcp) {
  		subflow_req->mp_capable = 1;
-		if (rx_opt.mptcp.version >= listener->request_version)
-			subflow_req->version = listener->request_version;
-		else
-			subflow_req->version = rx_opt.mptcp.version; >   		subflow_req->remote_key = rx_opt.mptcp.sndr_key;
  	}
  }
 

It seems that this code was introduced in the parent commit: "mptcp:
Handle MP_CAPABLE options for outgoing connections". So I re-apply your patch, this time on the right (I think, it's late :) ) commit:

- 2c12cadbe9c9: "squashed" in "mptcp: Handle MP_CAPABLE options for outgoing connections"
- 1cb1c55ccee7..357e47f49334: result

Relaunching the tests.

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
#2 lore raw
In reply to Matthieu Baerts

Hi Peter, Paolo,

Quoted 10 lines · Matthieu Baerts

Hi Peter, Paolo,

Quoted 4 lines · Peter Krystad

This field is not used. Version checking is performed in mptcp_parse_options().

squashto: Create SUBFLOW socket for incoming connections

Thank you for the patch and the review!

Quoted 8 lines

- 24201a067136: "squashed" in "mptcp: Create SUBFLOW socket for incoming connections"
- 222ce475568a: conflict in t/mptcp-Add-key-generation-and-token-tree
- 3f97d6a7010d: conflict in t/mptcp-parse-and-emit-MP_CAPABLE-option-according-to-v1-spec
- bc5f2367d3e2: conflict in t/mptcp-process-MP_CAPABLE-data-option
- bc5f2367d3e2: conflict in t/mptcp-process-MP_CAPABLE-data-option
- 55f1d621d32b..c5b8ad49fc3a: result

I went a bit too fast on this one:

- 78b5742651e0: mptcp: fix wrong merge conflict resolution
- 0b89eccbe98a: conflict in t/mptcp-Add-path-manager-interface
- 357e47f49334..45cba5f6b369: result

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