Date: Fri, 9 Sep 2022 16:19:51 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: c8bc87417203 - main - ip_reass: fixup the just added tunable Message-ID: <202209091619.289GJp5j070960@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c8bc874172033ad2a67c60b70d578fc20f616243 commit c8bc874172033ad2a67c60b70d578fc20f616243 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2022-09-09 16:18:04 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2022-09-09 16:19:39 +0000 ip_reass: fixup the just added tunable - Don't use hardcoded hash mask - free the memory on VNET destroy Fixes: 1494f4776af32b49e3c5bbdf09d6b2995b374614 --- sys/netinet/ip_reass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/netinet/ip_reass.c b/sys/netinet/ip_reass.c index 88ba74ace4d6..5227b1387c69 100644 --- a/sys/netinet/ip_reass.c +++ b/sys/netinet/ip_reass.c @@ -70,7 +70,7 @@ SYSCTL_DECL(_net_inet_ip); */ #define IPREASS_NHASH_LOG2 10 #define IPREASS_NHASH (1 << IPREASS_NHASH_LOG2) -#define IPREASS_HMASK (IPREASS_NHASH - 1) +#define IPREASS_HMASK (V_ipq_hashsize - 1) struct ipqbucket { TAILQ_HEAD(ipqhead, ipq) head; @@ -759,6 +759,7 @@ ipreass_destroy(void) V_ipq_zone = NULL; for (int i = 0; i < V_ipq_hashsize; i++) mtx_destroy(&V_ipq[i].lock); + free(V_ipq, M_IPREASS_HASH); } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209091619.289GJp5j070960>