diff options
author | bz <bz@FreeBSD.org> | 2016-06-23 11:55:15 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2016-06-23 11:55:15 +0000 |
commit | 4a8148b86d9b9351f3612d0e48e9e8269759b919 (patch) | |
tree | 0f0a7d2e97ab133e3113c66130350e4cf5f1a6bf /sys/netinet | |
parent | 16acbc91020f45db9a00908b62cdb949646d1ca7 (diff) | |
download | FreeBSD-src-4a8148b86d9b9351f3612d0e48e9e8269759b919.zip FreeBSD-src-4a8148b86d9b9351f3612d0e48e9e8269759b919.tar.gz |
In VNET TCP teardown Do not sleep unconditionally but only if we
have any TCP connections left.
Submitted by: zec
Approved by: re (hrs)
MFC after: 13 days
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_subr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index f219e6b..cb5a0f1 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -739,10 +739,11 @@ tcp_destroy(void *unused __unused) * Sleep to let all tcpcb timers really disappear and cleanup. */ do { - pause("tcpdes", hz/10); INP_LIST_RLOCK(&V_tcbinfo); n = V_tcbinfo.ipi_count; INP_LIST_RUNLOCK(&V_tcbinfo); + if (n != 0) + pause("tcpdes", hz / 10); } while (n != 0); tcp_hc_destroy(); syncache_destroy(); |