diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2017-06-21 22:40:13 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-22 17:34:04 +0200 |
commit | c14b0366813a8f6df7de181d8a333af7db6fb84e (patch) | |
tree | 25b75d4ca8004759f2da15b26f2cc5700e51becf /net/rds/connection.c | |
parent | rds: tcp: send handshake ping-probe from passive endpoint (diff) | |
download | linux-c14b0366813a8f6df7de181d8a333af7db6fb84e.tar.xz linux-c14b0366813a8f6df7de181d8a333af7db6fb84e.zip |
rds: tcp: set linger to 1 when unloading a rds-tcp
If we are unloading the rds_tcp module, we can set linger to 1
and drop pending packets to accelerate reconnect. The peer will
end up resetting the connection based on new generation numbers
of the new incarnation, so hanging on to unsent TCP packets via
linger is mostly pointless in this case.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Tested-by: Jenny Xu <jenny.x.xu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/connection.c')
-rw-r--r-- | net/rds/connection.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/connection.c b/net/rds/connection.c index 382443b060cb..50a3789ac23e 100644 --- a/net/rds/connection.c +++ b/net/rds/connection.c @@ -412,6 +412,7 @@ void rds_conn_destroy(struct rds_connection *conn) "%pI4\n", conn, &conn->c_laddr, &conn->c_faddr); + conn->c_destroy_in_prog = 1; /* Ensure conn will not be scheduled for reconnect */ spin_lock_irq(&rds_conn_lock); hlist_del_init_rcu(&conn->c_hash_node); |