From nobody Mon Mar 18 15:52:59 2024 X-Original-To: dev-commits-src-main@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 4Tyzs80ll3z5Dyct; Mon, 18 Mar 2024 15:53:00 +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 4Tyzs76zYdz4bVl; Mon, 18 Mar 2024 15:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710777180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YVcY3s0G6VR9ZbYM+lujWHN4mxr4jrVVD7EGSOYwzDo=; b=ARXnbDKkGc5kW3bMgg2jc2Pw4OxnWUQu5TU+eb9BCRq2SUrQ1LLcoup44EwEQaqBzFxK4s 9OiaCSEJkTeXNqmOdmaxJn60EUrKC34TzoAqLdgwPWmdWdkr40RbKr02tipvn2tp6lsV/v AWzNAeLMYZx1xmClJn0ENm4KwHeRR0cJ8gr+RcL5q6P+G7VCgFtAgwlB5fAg8FL7lTvqtO xJ9XV8BQH0R9We5KG8Nb/tJcLaxPiejoX1VZyfbDMz6MHF9PO+6dePDEIVywEs3DSrzRD6 rK2KwVIuc67IdMUDyWzUd6urg2bSks/KKVvFXP/mElDxp14P9jgJPEqgha/t3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710777180; a=rsa-sha256; cv=none; b=nmjKHQCyJiw+NV+dX2Q1W/VAAPJ7xSUzAilSbs4/6lIKkp4UC8YLOwmYWhiD8lNS3q05AM uq+kcgRPUPxRr+iSU+S2HhWhMMRqemfDdMw6A4Xp/8Wq0RF1iMinHjKl8+cKTrqa/i3wlq 6L4sU23DOYcEA9h42PF83ac8jKLpbKm+axQEn+PLCdsX1QO9Dcm9fd/A6C0yUTRc1J3vMx Rghse45h0HYiWeLP36+ttDQFqI0GQqXGrrHEcZ8vV8dWJFF2IWxSUH4tLO2uByhZn289Zb W96DdPsjX86SxikS6gGOePgIOEWIPzdX/ag7eq7jAGHfyT/xH4vRw787x3tD+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710777180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YVcY3s0G6VR9ZbYM+lujWHN4mxr4jrVVD7EGSOYwzDo=; b=Wlujt+JMluI+Iz5+/BDxoPjn7VxC+i1l+yFQmlhGjKV1lvgn8JcNqzU3pQ2t6d6IWBtOfk 0ZXT6JGJa5GlC8WqAcGjwV+tSk4X15z/f6LcseyyT8IT5Yd3oEBdSiK7cg3RuFTDJzdc6b W8Z7pwjg6305pRHDaDQ+TDp5HXthDBCiAguS73uQaRvxGVf7Na63jqnAY8jActrs46eoHF 4NT8at4d27AbY9WCNFmZCWk40XgsfIVQ67H0zwoIQjrEEr0GsYqc3qyT6FiKFblAjd0Qdy zzmXyd9u1qEdTaR/T/wPTxnSsD7/gxoeXZeFdgGq3ubyOvvEC5o4X/zHtvLR7A== 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 4Tyzs76ZxPzSy4; Mon, 18 Mar 2024 15:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42IFqxLS000929; Mon, 18 Mar 2024 15:52:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42IFqxxA000926; Mon, 18 Mar 2024 15:52:59 GMT (envelope-from git) Date: Mon, 18 Mar 2024 15:52:59 GMT Message-Id: <202403181552.42IFqxxA000926@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: 027fda80fe8b - main - inpcb: remove unused KPIs to manipulate inpcbs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 027fda80fe8b8f7f76c9e1799753601674954901 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=027fda80fe8b8f7f76c9e1799753601674954901 commit 027fda80fe8b8f7f76c9e1799753601674954901 Author: Gleb Smirnoff AuthorDate: 2024-03-18 15:49:39 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-18 15:49:39 +0000 inpcb: remove unused KPIs to manipulate inpcbs These KPIs were added in 9d29c635daa69 and through 15 years had zero use. They slightly remind what IfAPI does for struct ifnet. But IfAPI does that for the sake of large collection of NIC drivers not being aware of struct ifnet. For the inpcb it is unclear what could be a large collection of externally written kernel modules that need extensively use inpcb and not be aware of its internals at the same time. This isolation of a structure knowledge requires a lot of work, and just throwing in a few KPIs isn't helpful. Reviewed by: kib, bz, markj Differential Revision: https://reviews.freebsd.org/D44310 --- sys/netinet/in_pcb.c | 22 ---------------------- sys/netinet/in_pcb.h | 4 ---- sys/netinet/toecore.h | 1 + 3 files changed, 1 insertion(+), 26 deletions(-) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 981654577deb..16a3707e7c89 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -2835,28 +2835,6 @@ inp_inpcbtosocket(struct inpcb *inp) return (inp->inp_socket); } -struct tcpcb * -inp_inpcbtotcpcb(struct inpcb *inp) -{ - - INP_WLOCK_ASSERT(inp); - return ((struct tcpcb *)inp->inp_ppcb); -} - -int -inp_ip_tos_get(const struct inpcb *inp) -{ - - return (inp->inp_ip_tos); -} - -void -inp_ip_tos_set(struct inpcb *inp, int val) -{ - - inp->inp_ip_tos = val; -} - void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp, uint32_t *faddr, uint16_t *fp) diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 3d633741dc27..7e9de02b0c7c 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -479,12 +479,8 @@ void inp_unlock_assert(struct inpcb *); void inp_apply_all(struct inpcbinfo *, void (*func)(struct inpcb *, void *), void *arg); -int inp_ip_tos_get(const struct inpcb *inp); -void inp_ip_tos_set(struct inpcb *inp, int val); struct socket * inp_inpcbtosocket(struct inpcb *inp); -struct tcpcb * - inp_inpcbtotcpcb(struct inpcb *inp); void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp, uint32_t *faddr, uint16_t *fp); diff --git a/sys/netinet/toecore.h b/sys/netinet/toecore.h index a8e5afd6b50a..612c2fe1caf5 100644 --- a/sys/netinet/toecore.h +++ b/sys/netinet/toecore.h @@ -36,6 +36,7 @@ #include #include +struct tcpcb; struct tcpopt; struct tcphdr; struct in_conninfo;