From nobody Mon Oct 18 17:33:51 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A05B117F7210; Mon, 18 Oct 2021 17:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HY3rb3CzSz3H22; Mon, 18 Oct 2021 17:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E7EC24A1D; Mon, 18 Oct 2021 17:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19IHXpgx045810; Mon, 18 Oct 2021 17:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19IHXpHM045809; Mon, 18 Oct 2021 17:33:51 GMT (envelope-from git) Date: Mon, 18 Oct 2021 17:33:51 GMT Message-Id: <202110181733.19IHXpHM045809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 5a78df20ce77 - main - in_pcb: garbage collect unused structure in_pcblist List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a78df20ce77e418503d0264d3daa26487908b1f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=5a78df20ce77e418503d0264d3daa26487908b1f commit 5a78df20ce77e418503d0264d3daa26487908b1f Author: Gleb Smirnoff AuthorDate: 2021-04-27 17:43:56 +0000 Commit: Gleb Smirnoff CommitDate: 2021-10-18 17:06:39 +0000 in_pcb: garbage collect unused structure in_pcblist --- sys/netinet/in_pcb.c | 22 ---------------------- sys/netinet/in_pcb.h | 8 -------- 2 files changed, 30 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 189f73028198..fc2914730e43 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1665,28 +1665,6 @@ in_pcbrele(struct inpcb *inp) return (in_pcbrele_wlocked(inp)); } -void -in_pcblist_rele_rlocked(epoch_context_t ctx) -{ - struct in_pcblist *il; - struct inpcb *inp; - struct inpcbinfo *pcbinfo; - int i, n; - - il = __containerof(ctx, struct in_pcblist, il_epoch_ctx); - pcbinfo = il->il_pcbinfo; - n = il->il_count; - INP_INFO_WLOCK(pcbinfo); - for (i = 0; i < n; i++) { - inp = il->il_inp_list[i]; - INP_RLOCK(inp); - if (!in_pcbrele_rlocked(inp)) - INP_RUNLOCK(inp); - } - INP_INFO_WUNLOCK(pcbinfo); - free(il, M_TEMP); -} - static void inpcbport_free(epoch_context_t ctx) { diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index c20c516628b8..77a99e666663 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -407,13 +407,6 @@ struct inpcbport { u_short phd_port; }; -struct in_pcblist { - int il_count; - struct epoch_context il_epoch_ctx; - struct inpcbinfo *il_pcbinfo; - struct inpcb *il_inp_list[0]; -}; - /*- * Global data structure for each high-level protocol (UDP, TCP, ...) in both * IPv4 and IPv6. Holds inpcb lists and information for managing them. @@ -872,7 +865,6 @@ void in_pcbrehash_mbuf(struct inpcb *, struct mbuf *); int in_pcbrele(struct inpcb *); int in_pcbrele_rlocked(struct inpcb *); int in_pcbrele_wlocked(struct inpcb *); -void in_pcblist_rele_rlocked(epoch_context_t ctx); void in_losing(struct inpcb *); void in_pcbsetsolabel(struct socket *so); int in_getpeeraddr(struct socket *so, struct sockaddr **nam);