git: 7c71f3bd6ace - main - tcp_hostcache: remove extraneous check. All paths leading here already checked this setting.

Gleb Smirnoff glebius at FreeBSD.org
Fri Apr 9 21:21:07 UTC 2021


The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=7c71f3bd6acea654b3fc6fdb44f30e8ea601b422

commit 7c71f3bd6acea654b3fc6fdb44f30e8ea601b422
Author:     Gleb Smirnoff <glebius at FreeBSD.org>
AuthorDate: 2021-04-08 21:17:39 +0000
Commit:     Gleb Smirnoff <glebius at FreeBSD.org>
CommitDate: 2021-04-09 21:07:19 +0000

    tcp_hostcache: remove extraneous check.
    All paths leading here already checked this setting.
    
    Reviewed by:    rscheff
---
 sys/netinet/tcp_hostcache.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 130b08425096..300cbafe4bcd 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -325,9 +325,6 @@ tcp_hc_lookup(struct in_conninfo *inc, bool update)
 	struct hc_head *hc_head;
 	struct hc_metrics *hc_entry;
 
-	if (!V_tcp_use_hostcache)
-		return NULL;
-
 	KASSERT(inc != NULL, ("tcp_hc_lookup with NULL in_conninfo pointer"));
 
 	/*
@@ -395,9 +392,6 @@ tcp_hc_insert(struct in_conninfo *inc)
 	struct hc_head *hc_head;
 	struct hc_metrics *hc_entry;
 
-	if (!V_tcp_use_hostcache)
-		return NULL;
-
 	KASSERT(inc != NULL, ("tcp_hc_insert with NULL in_conninfo pointer"));
 
 	/*


More information about the dev-commits-src-main mailing list