netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] simplify the tcp_conn_request.
@ 2017-08-16 15:28 Tonghao Zhang
  2017-08-16 15:28 ` [PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request Tonghao Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Tonghao Zhang @ 2017-08-16 15:28 UTC (permalink / raw)
  To: netdev; +Cc: Tonghao Zhang

These patches are not bugfix. But just simplify the tcp_conn_request
function.

These patches are based on Davem's net-next tree.

Tonghao Zhang (2):
  tcp: Remove unnecessary dst check in tcp_conn_request.
  tcp: Remove the unused parameter for tcp_try_fastopen.

 include/net/tcp.h       |  3 +--
 net/ipv4/tcp_fastopen.c |  6 ++----
 net/ipv4/tcp_input.c    | 11 +++++------
 3 files changed, 8 insertions(+), 12 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request.
  2017-08-16 15:28 [PATCH net-next v2 0/2] simplify the tcp_conn_request Tonghao Zhang
@ 2017-08-16 15:28 ` Tonghao Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Tonghao Zhang @ 2017-08-16 15:28 UTC (permalink / raw)
  To: netdev; +Cc: Tonghao Zhang

Because we remove the tcp_tw_recycle support in the commit
4396e46187c ('tcp: remove tcp_tw_recycle') and also delete
the code 'af_ops->route_req' for sysctl_tw_recycle in tcp_conn_request.
Now when we call the 'af_ops->route_req', the dist always is
NULL, and we remove the unnecessay check.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
---
 net/ipv4/tcp_input.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d73903f..7eee2c7 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -6132,11 +6132,10 @@ int tcp_conn_request(struct request_sock_ops *rsk_ops,
 
 		isn = af_ops->init_seq(skb);
 	}
-	if (!dst) {
-		dst = af_ops->route_req(sk, &fl, req);
-		if (!dst)
-			goto drop_and_free;
-	}
+
+	dst = af_ops->route_req(sk, &fl, req);
+	if (!dst)
+		goto drop_and_free;
 
 	tcp_ecn_create_request(req, skb, sk, dst);
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH net-next v2 0/2] simplify the tcp_conn_request.
@ 2017-08-17  3:02 Tonghao Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Tonghao Zhang @ 2017-08-17  3:02 UTC (permalink / raw)
  To: netdev; +Cc: Tonghao Zhang

These patches are not bugfix. But just simplify the tcp_conn_request
function.

These patches are based on Davem's net-next tree.

Tonghao Zhang (2):
  tcp: Remove unnecessary dst check in tcp_conn_request.
  tcp: Remove the unused parameter for tcp_try_fastopen.

 include/net/tcp.h       |  3 +--
 net/ipv4/tcp_fastopen.c |  6 ++----
 net/ipv4/tcp_input.c    | 11 +++++------
 3 files changed, 8 insertions(+), 12 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-17  3:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16 15:28 [PATCH net-next v2 0/2] simplify the tcp_conn_request Tonghao Zhang
2017-08-16 15:28 ` [PATCH net-next v2 1/2] tcp: Remove unnecessary dst check in tcp_conn_request Tonghao Zhang
  -- strict thread matches above, loose matches on Subject: below --
2017-08-17  3:02 [PATCH net-next v2 0/2] simplify the tcp_conn_request Tonghao Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).