From nobody Mon Nov 23 22:08:19 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 4jYKny424Xz71hTt; Mon, 23 Nov 2026 22:08:22 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jYKny3YHGz3KHS; Mon, 23 Nov 2026 22:08:22 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795471702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hWB1cQJSt3cY/DaIIir9Zl4Zk4CPAr6zE3vEJgWCK/w=; b=eDkMSj8ZFddLYxrf1veV2tWhY6rFfnVy0UPAgNNK1MWCMhGAbfvDocQhuBOQdn6gPSDrSQ hLJ6OYJMkRB7PCxnBDMtwkN3WanY2r3PQxOHodsH/iugqjbCgBSoSJbpQbSJiAIYs18G0a L0Pbn6f0S0YCSmUamzrO164rsDyPwPBCxWmLYC7B7YgGa15NZH6ll44LA2iAPEGKNRsH+0 MZxjh1bhmS7S14yrlIyMrKRkuYuJ+d73HGN+2CkeDNwFtILuCRUdKpPtEcfsRB6GrtVUuH bQxcr5YNCd+vVr5+jA9i2kPBrnQpm6PhcngKOE7pkea6IS9VACMWDQ8wPZLkVg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795471702; b=CwZsENqNNoAyPGV1bx0QZBx5IrRp4MAApbVOJh4h04HVUJSSWTPYlcb54pKamx6wCgDULR VlNGWntCn/VIYh++/LK9OxSCph4uTvbx4hdc1PVuwLIwB8mcIqNOYfeJa58H1RGYO4LDQB lGsVReH8hMJ08oItGa8/IPUhdhCO3livm1uwbswcIMWMc5hTZM6zWNJVabLmgB9p8Cy9oj /jYkoWdXjq6Yadd0W8cj1GX/X7nIPtUwCCqK+XREyawmAlInVX6n5P4CmKoRPhqkB5hRDx sE/WIy8ppkBVEZTOLpK+h9FKsRaIEQIrmewBJinDiEBSzLTFYLCBil5uj4qUHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795471702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hWB1cQJSt3cY/DaIIir9Zl4Zk4CPAr6zE3vEJgWCK/w=; b=Kj2OvXTbVnsA+UQ5xyvUEgcNDnX+ebkxw39t0tkzDuNScZgB+GMVaeaeF3xcOPAR3QmNNH xS1SwTCAg4cGC35rZNsDY9kEjR28ot/xy6TYpNFhRIgBq6C6JpIYE44cqNPvEY2k4OkqRx 4uXbZZgoVXdPtrawbK4Vswa5X30/SbZLTXUSWKijdlr7O6kF6wM9xcugiewAXX9NeodEz2 B4J/XL/A7XmZFS87lQyjMro8CwC7uCQN5TOUxJNmmClPlZ6RvtbwFXVMuxERLersVC9gkU WWrPjJ+mttAzYZLej8pZ3lsjmn3q9PPING1+I5Pa/WWjMpxSvieXhiJuAGONhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from cell.glebi.us (glebi.us [162.251.186.162]) (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) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4jYKnx6zN0zpfS; Mon, 23 Nov 2026 22:08:21 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Mon, 23 Nov 2026 14:08:19 -0800 From: Gleb Smirnoff To: "R. Christian McDonald" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: c9f9c4fe47bf - main - ip6_forward: Do not reference the nexthop Message-ID: References: <6b035c39.9cba.75b8db0@gitrepo.freebsd.org> List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b035c39.9cba.75b8db0@gitrepo.freebsd.org> On Sun, Nov 22, 2026 at 09:18:49PM +0000, R. Christian McDonald wrote: R> Author: R. Christian McDonald R> AuthorDate: 2026-11-22 21:18:16 +0000 R> Commit: R. Christian McDonald R> CommitDate: 2026-11-22 21:18:16 +0000 R> R> ip6_forward: Do not reference the nexthop R> R> ip6_forward() looked the route up with NHR_REF and released the nexthop R> before returning. It runs in the network epoch and uses the nexthop R> only until it returns: nd6_output_ifp() gets the interface, and R> icmp6_redirect_output() runs before the return. The epoch keeps the R> nexthop valid that long, which ip6_tryforward() already relies on. R> R> Every packet that takes this path wrote twice to the nexthop reference R> count, which all CPUs forwarding to that nexthop share. Forwarded R> packets take it whenever IPsec has a security policy, and today also R> whenever net.inet6.ip6.redirect is set, which is the default. R> R> Look the nexthop up without a reference, and assert that the caller is R> in the network epoch. R> R> No functional change intended. I think this commit actually carries quite a lot of functional change if we are talking about how the code works. It doesn't bring any user visible change, though. We should use this statement (NFC) more responsibly. -- Gleb Smirnoff