From nobody Tue Apr 14 16:06:03 2026 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 4fw8Jx05hGz6Z3J2 for ; Tue, 14 Apr 2026 16:06:09 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fw8Jw63Yjz3MXB for ; Tue, 14 Apr 2026 16:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776182768; 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=3jVmgSYb7CpQv0UNV2HckNKrJbJkv760ccFi2p8Ex6g=; b=PDIofHC+6la4Qi/eICDhaBvqJj5bEQ5eQtpYIeYSum0bSvmqHjRnarf1lhWCJmttP1WKQ8 cYbdntSRsk0kJ1Ea2o2gWIYCTLQ0BGUttkZiZiaB6ICE5bUV1EQge6auubF1zbiJxIH0i7 vDOhKJTpa08t460+1uxXu9hXD3vfy5703JXz/ZBYi3tEm1j2MchJ3LcI4eF8A/rY+OJjwS lwO7RqBgbPCw15vYwEfMMZ1BTzwCv+G0HNOPcCqeJxrMGn8npwru20GK5bPD7lwqnaR798 yfj9Y3/K/MQ0xM/EyuzyJ4ozefUtP7caqDbmXxXIdoIrFhapJhbEztTkFoCCiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776182768; a=rsa-sha256; cv=none; b=bHWH7pNbgejd1rCK3lRyk+wt6/CxBLlR6ExsjeaVf2QkjFzAsYdmTpCr5HDcX4WiYhQm2c cYy1C8EH2DeojoKedL7u0yo2fv+g9BHuipTkT3Lq5acYKQ9rzZa4m0UGEkEUvmOZzySgvP WSr4znZbZFsDKNR7EWVZCXTaP6CA7jTcE1/UuOjcZm0RylkY4rAA+Qoo6F+0xSSf1UosrA 3LcGfgkucrg25KSEhed98wZFs/zMBm6isYUcOEDqxz8aWgZ+H6CuM23JZ/Xh0c4rbUdNEB kVNSPZYQDkS6Lbxj3AmdscTjYSFPujbjhbMd0su5QdCZB037Rio27YaEN6lOiA== 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=1776182768; 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=3jVmgSYb7CpQv0UNV2HckNKrJbJkv760ccFi2p8Ex6g=; b=jhiUaHapCGSPJZIAJL82Hv/Y89ItrVMnLct7z0/ZHqTz17MmjponrBAaTAfi7xsYIMujzs OZHCJE2mxdtBzrZjDZZ3AnakPCrGcd6PMYmEzcNtun2x9VQH55T+nKucGYVlc6f2dEZDkj 2+2yRcWg7ZDUbwOWkh+/nP1dVVnLv6z1AUYSSITO52rAIZT6636nKZJH5tZ1F2ZJCRDrHu Xs2IBcvsp+Ex1xslwmwNn/sDwACFIM1NIS8UW+TFIL+l3Ej3GqdW33eEB+ZW3U2MA+GpXi CtB1mpXuy8Qer0mDUDE8K0lEOzU7A9dSWVt0ejWqIbIYLPjgV3k+JMPTAIm0NQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fw8Jw5NB6zxJX for ; Tue, 14 Apr 2026 16:06:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21a5c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 14 Apr 2026 16:06:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 9b76228006d8 - main - inpcb: retire inp_vnet 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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: 9b76228006d8f0e45dea03d305eeac587d7a8500 Auto-Submitted: auto-generated Date: Tue, 14 Apr 2026 16:06:03 +0000 Message-Id: <69de65eb.21a5c.61244c2a@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9b76228006d8f0e45dea03d305eeac587d7a8500 commit 9b76228006d8f0e45dea03d305eeac587d7a8500 Author: Gleb Smirnoff AuthorDate: 2026-04-14 16:02:00 +0000 Commit: Gleb Smirnoff CommitDate: 2026-04-14 16:02:00 +0000 inpcb: retire inp_vnet Now that a functional inpcb can not outlive its socket, just use socket's vnet pointer. --- sys/kern/uipc_ktls.c | 4 ++-- sys/netinet/in_pcb.c | 3 --- sys/netinet/in_pcb.h | 8 -------- sys/netinet/tcp_hpts.c | 2 +- sys/netinet/tcp_timer.c | 10 +++++----- 5 files changed, 8 insertions(+), 19 deletions(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 0112cf8b6941..4c3a4085b8db 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1797,7 +1797,7 @@ ktls_reset_send_tag(void *context, int pending) INP_WLOCK(inp); tp = intotcpcb(inp); if (!(tp->t_flags & TF_DISCONNECTED)) { - CURVNET_SET(inp->inp_vnet); + CURVNET_SET(inp->inp_socket->so_vnet); tp = tcp_drop(tp, ECONNABORTED); CURVNET_RESTORE(); if (tp != NULL) { @@ -2475,7 +2475,7 @@ ktls_drop(struct socket *so, int error) NET_EPOCH_ENTER(et); INP_WLOCK(inp); if (!(tp->t_flags & TF_DISCONNECTED)) { - CURVNET_SET(inp->inp_vnet); + CURVNET_SET(inp->inp_socket->so_vnet); tp = tcp_drop(tp, error); CURVNET_RESTORE(); if (tp != NULL) diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index af62aea91bf8..22c3287b93fd 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -558,9 +558,6 @@ in_pcbinfo_init(struct inpcbinfo *pcbinfo, struct inpcbstorage *pcbstor, mtx_init(&pcbinfo->ipi_hash_lock, pcbstor->ips_hashlock_name, NULL, MTX_DEF); -#ifdef VIMAGE - pcbinfo->ipi_vnet = curvnet; -#endif CK_LIST_INIT(&pcbinfo->ipi_list_unconn); pcbinfo->ipi_count = 0; diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 8663ba205b0a..1a6ce50aedbb 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -299,7 +299,6 @@ struct xktls_session { #include #include #include -#include #include #include @@ -418,8 +417,6 @@ struct inpcb { }; }; -#define inp_vnet inp_pcbinfo->ipi_vnet - /* * Per-VNET pcb database for each high-level protocol (UDP, TCP, ...) in both * IPv4 and IPv6. @@ -478,11 +475,6 @@ struct inpcbinfo { * hashed by local port. */ struct inpcblbgrouphead *ipi_lbgrouphashbase; /* (r:e/w:h) */ - - /* - * Pointer to network stack instance - */ - struct vnet *ipi_vnet; /* (c) */ }; /* diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 8dfbe126d46a..2bb78ed28372 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1359,7 +1359,7 @@ again: */ __tcp_set_hpts(pace, tp); } - CURVNET_SET(inp->inp_vnet); + CURVNET_SET(inp->inp_socket->so_vnet); /* Lets do any logging that we might want to */ tcp_hpts_log(hpts, tp, &tv, slots_to_run, i, from_callout); diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index b409daf5895e..ca242f2be627 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -315,7 +315,7 @@ tcp_timer_delack(struct tcpcb *tp) INP_WLOCK_ASSERT(inp); - CURVNET_SET(inp->inp_vnet); + CURVNET_SET(inp->inp_socket->so_vnet); tp->t_flags |= TF_ACKNOW; TCPSTAT_INC(tcps_delack); NET_EPOCH_ENTER(et); @@ -335,7 +335,7 @@ tcp_timer_2msl(struct tcpcb *tp) INP_WLOCK_ASSERT(inp); TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); - CURVNET_SET(inp->inp_vnet); + CURVNET_SET(inp->inp_socket->so_vnet); tcp_log_end_status(tp, TCP_EI_STATUS_2MSL); tcp_free_sackholes(tp); /* @@ -385,7 +385,7 @@ tcp_timer_keep(struct tcpcb *tp) INP_WLOCK_ASSERT(inp); TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); - CURVNET_SET(inp->inp_vnet); + CURVNET_SET(inp->inp_socket->so_vnet); /* * Because we don't regularly reset the keepalive callout in * the ESTABLISHED state, it may be that we don't actually need @@ -493,7 +493,7 @@ tcp_timer_persist(struct tcpcb *tp) INP_WLOCK_ASSERT(inp); TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); - CURVNET_SET(inp->inp_vnet); + CURVNET_SET(inp->inp_socket->so_vnet); /* * Persistence timer into zero window. * Force a byte to be output, if possible. @@ -560,7 +560,7 @@ tcp_timer_rexmt(struct tcpcb *tp) INP_WLOCK_ASSERT(inp); TCP_PROBE2(debug__user, tp, PRU_SLOWTIMO); - CURVNET_SET(inp->inp_vnet); + CURVNET_SET(inp->inp_socket->so_vnet); if (tp->t_fb->tfb_tcp_rexmit_tmr) { /* The stack has a timer action too. */ (*tp->t_fb->tfb_tcp_rexmit_tmr)(tp);