From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1B27C2E0 for ; Wed, 24 Sep 2025 01:48:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758678537; cv=none; b=K4VBNbV88F5yU7I0k/C4sAXEx+++h04iJ5DriQrBENdwe4ZIw2WlX47v2k9++/l/Xie/p70WkeIa2hhiVCIMS0ZOQEgWqipeIR7vJEGFuRoY8CDVrUp0v/TLuoTvXY4dbvIHPX0wlpJvW/fVF3LYh3QkxLGWOEFnVU70LsdEtn4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758678537; c=relaxed/simple; bh=keYawX+md+ZCO7ZblPXvtGUH/MCNBo8dpci9fyEcHCg=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=J5F0Mype4RQgpBLPgRiz/lmPqk9eHA2OkzAlX0+ModaxDA5Xn0ligHm96x2kiPrItzpYsM4OAemhF5IBN4KKW6oLuOmA8Lgb1LoELnS5iMy+5GqyXm/EWw8QYtlbbCmkiwmVNFJYZdkcOakmLs4EocaHA01z91yCHG4B3niA5Ds= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AZ0iAamN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AZ0iAamN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1134DC4CEF5; Wed, 24 Sep 2025 01:48:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1758678537; bh=keYawX+md+ZCO7ZblPXvtGUH/MCNBo8dpci9fyEcHCg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AZ0iAamNgI28vpzHV+VLhygT6PjwNfl8geXWBrAaS4VibJWqliUdmDEH0dprW0IsP 7VzAtSt+QoDWxF64c5kQk0HOvPyJMi/DpUAwtT+8GeYFvjbv1GK2YkGrfOnl9i/oZj Zfhou55GndCDxdikDQWu30wdL37+rBV3wZn+yiTu7P8hy3xrVIZ90h7y4wgdQZDv9g kQwR5g1TLqRx6hH2FekTcenK1/ACu6HddVrBYcOx3RDTtYvxnHAr8Nnn+vCW5wa5cJ 4/tYTH6lREcvAmqNHawO0mGVQBT3RZll9A0IXRoFmDwHsO5mUx9Mwu16zXN35tFTiF sLO04c0wcGQWg== Date: Tue, 23 Sep 2025 18:48:56 -0700 From: Jakub Kicinski To: Marek Mietus Cc: netdev@vger.kernel.org, sd@queasysnail.net, antonio@openvpn.net, openvpn-devel@lists.sourceforge.net Subject: Re: [PATCH net-next v3 0/3] net: tunnel: introduce noref xmit flows for tunnels Message-ID: <20250923184856.6cce6530@kernel.org> In-Reply-To: <20250922110622.10368-1-mmietus97@yahoo.com> References: <20250922110622.10368-1-mmietus97.ref@yahoo.com> <20250922110622.10368-1-mmietus97@yahoo.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 22 Sep 2025 13:06:19 +0200 Marek Mietus wrote: > This patchset introduces new noref xmit helpers and incorporates > them in the OpenVPN driver. A similar improvement can also be > applied to other tunnel code in the future. The implementation > for OpenVPN is a good starting point as it doesn't use the > udp_tunnel_dst_lookup helper which adds some complexity. You're basically refactoring an API, it's fairly unusual to leave both APIs in place upstream. Unless the number of callers is really huge, say >100, or complexity very high. Not sure how others feel but IMHO you should try to convert all the tunnels. > There are already noref optimizations in both ipv4 and ip6 > (See __ip_queue_xmit, inet6_csk_xmit). This patchset allows for > similar optimizations in udp tunnels. Referencing the dst_entry > is now redundant, as the entire flow is protected under RCU, so > it is removed. > > With this patchset, I was able to observe a 4% decrease in the total > time for ovpn_udp_send_skb using perf. Please provide more meaningful perf wins. Relative change of perf in one function doesn't tell use.. well.. anything. Please do not remove the diff stat generated by git in the cover letter.