From patchwork Mon Sep 22 11:06:19 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Mietus X-Patchwork-Id: 22 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:c08a:b0:72f:f16c:e055 with SMTP id jr10csp112893mab; Mon, 22 Sep 2025 04:07:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUtcwd1mHH8XRHeyBInc8fpyBfJcBTPayelxvX9gRkTOnv/UgvR6DGU0yqFRExa/iLVVGx0ZvfZ+lQ=@openvpn.net X-Google-Smtp-Source: AGHT+IFtGwBYACWcUVrrmHyuRsdOwx0TDWQMjvvGsol8d4ta+kxfbZo82eGsNu1o3hPmtKLES1XG X-Received: by 2002:a05:6871:2c8a:b0:341:6ba8:fe71 with SMTP id 586e51a60fabf-3416bb89d41mr1777453fac.44.1758539237326; Mon, 22 Sep 2025 04:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1758539237; cv=none; d=google.com; s=arc-20240605; b=Gw9TzAoMvsbd2ybCoxykE35bxldjj0leDU+JsX0nQGSwg3h0m0vyLJJRfWFZfG//ym Fiw28yaWJhWljm2cvWvoMA0ruXjyPHzWlvpcw/yTic8xuZO/YvmuMpLZaGij2lAexAyg D0DhixAvsvdWt6rqRCN4GYQcJ3FsJ+5frUIGpitIOE9FajCLU/v2+qsxnHc1SvsAbrue m9IgeEw5w8dpkzBlxVKqiXdLHeENHR7kpVcp8Ubj1IkmItQ9U9hY4XvFu1Anf0T7bbU3 bPJuEXQICTFq5bcrT5OJch2Qu1tjXQSUBNNtX6fRQTyhc7jgqQipogDkaAfBKpaqmGoY Temw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:cc:reply-to:from:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:references:mime-version:message-id:date:to :dkim-signature:dkim-signature:dkim-signature:dkim-signature; bh=mEBt3rGF2At7/6uLWfihu85lZDuDXykANatgI9djSl8=; fh=6EbcJF2Br7Ckqvxmbzy/aBW5ZDkZ8Oeawieh63Sh7bg=; b=YgmEKxU+5PofGJozGxDSITYiiVx5kgrwLfmW7yvj5xu/5l8xAB8Xi8C7jRyqhaR9F6 m3QCtPa7fdRkrRs0S2/sA4pZF33a55Jscgn3hrZIMg4vkoWLsxJNvxRal1SJOsQoZtE8 X/xo5ffbV5mv0wn1DyxJeUQB77BPMh6GMgG/2uYqmj9l5fNqJZ/SR+FcQ65cxZ0vT9/a Lj3Jt8FbY9wOy+G/zAnYD5r0cGW5P4WyyxY959C5rw8iUBjrr81kEut0etIOaZQwD03+ RsGePwy2jQoojvruhd1P3n3OxMliDaA4IYDwIqO5VqyRz2zflNWxYXAVlakTXahDCQHX wWsQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=UUcw6fIu; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=RRXOcStd; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PJIzRcq6; dkim=neutral (body hash did not verify) header.i=@yahoo.com header.s=s2048 header.b=jJW52GZi; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lists.sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-3432f6f1f4csi473112fac.88.2025.09.22.04.07.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Sep 2025 04:07:17 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=UUcw6fIu; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=RRXOcStd; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=PJIzRcq6; dkim=neutral (body hash did not verify) header.i=@yahoo.com header.s=s2048 header.b=jJW52GZi; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lists.sourceforge.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:References:MIME-Version:Message-ID:Date:To: Sender:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Owner; bh=mEBt3rGF2At7/6uLWfihu85lZDuDXykANatgI9djSl8=; b=UUcw6fIuzhYcS/NfF6e9kjMPS8 0/ajaulvdJYPkzhA0SzD0cn2/UBMd25LzgVFh9h3rjiBQR5X5gok5HCzeA6pdqYoGPtLT4RiH0WB7 5T/afljuEDvAkh/zerVK0eirk2j5B9MsPFVrgnu4jB8uTO15mDqHKUgo7b79BKDQizUs=; Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1v0eO0-0000Jb-UK; Mon, 22 Sep 2025 11:07:13 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1v0eNz-0000JQ-Kl for openvpn-devel@lists.sourceforge.net; Mon, 22 Sep 2025 11:07:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ehl5+t27O7RCiJKa2RedcznDCrR7yc1A+gVkxEZAdXA=; b=RRXOcStdfefxowC+tJT8QwlMxx piwRfBMmN0p3E+8szehzRe+r2pGkZ30fKTDAJ+icYCE4jc/oNfIePcGzx307yWFMINC1QwfaKE3Pk uyUZXh6hEmVgLrMet5YgsGknNPEVcyO7UZ/h1pbKx4ZkO0s+/6Rz/zgzFh4U8THLfRFE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject :Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=ehl5+t27O7RCiJKa2RedcznDCrR7yc1A+gVkxEZAdXA=; b=P JIzRcq6DJC0M7Ypm3tO8IlxylhdHm6WFhC/vUBTMqV95Lyq/FdxtOgVjfjiFfSYr92Ky6LVlj2xhu E90i43AB0L1Oszp34BkVF8snNYdM/SPqNL31G3VdLqn640YZyQ2fCvlm9f0zS1MeXfgH/Tmeeegcy v93LlusUCxmM5qMA=; Received: from sonic311-23.consmr.mail.ne1.yahoo.com ([66.163.188.204]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1v0eNz-0004yx-Nf for openvpn-devel@lists.sourceforge.net; Mon, 22 Sep 2025 11:07:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758539220; bh=ehl5+t27O7RCiJKa2RedcznDCrR7yc1A+gVkxEZAdXA=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=jJW52GZi6nq6DNWdNRppj4StfPYYA5xcNgHS/p0yn7Fas1o/6Uiqhw/LphmEJyzfUcTehm13VUEd3MPBwKx2ZJnqQCX9SWkOCHg2NfdOdxKC57q3j5zxYpi4cK99A2mEPOd9hMx0DJqIKpTbXqSogkmdoaZujJ8JoX2tO99OaoqkmTvOt3zKCp8jBmws8k9XeF1sW2F6z7gxXkv1S4SQRYmA3NRA25M1kn/AO0Ztw/B+5qD+SwCGFsdcU3SE/CY0se+8OHVM0ZzpTlKl7SGSEFIbVY8AzSaNC7b74615+RL7aKrG4qSAkr5jH5b3Myjg00/4+67CQSinALjH6KB+KQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758539220; bh=8oZZciAOfSmeieMOwpDOc460ude8gc+HgDYCfF4SAF+=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Iaf7L4Pikw+DR8gvU/9zsu6yXIcSupoDLwPMxjyODAi2/Ob7VROLUmfI77AvB9MFjT2KxQBXL7AdMcsFW3/V9nmatwe7IWWaVauh26kmJoIW+biamHcOxYFF74GkKf4k7c1HastQMZoewoqkB0TaA5AgBqCD2ldna8D5OjrQbLcliMhdgKM6hKodbcF/d2nkKSVxxtf7ubZSpjCo+8QV+YMRxT0VNuyDznhg/ao0hVwjZWEQpJCQ09nqauRUfgYAmcnl4kx7CgUIgpbHoMeG9mg26gkFBTdrdb6TW7U82hWAJTIuPFj6aPMQZoYVDXmkHObzS6RWJv8Bi6kRTSgbzA== X-YMail-OSG: 3_FkBaYVM1ntPo7M4p.ZwUyeK4hYl8cj31_q4220uk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fg0nic8f6qcfj7Aw9n5Qv1Lp7Nekw-- X-Sonic-MF: X-Sonic-ID: b005ffc3-6b19-4577-b996-14f1f683284c Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Mon, 22 Sep 2025 11:07:00 +0000 Received: by hermes--production-ir2-74585cff4f-4sjhz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ca5bfbd718d89396be3325d48d68935b; Mon, 22 Sep 2025 11:06:53 +0000 (UTC) To: netdev@vger.kernel.org, sd@queasysnail.net, antonio@openvpn.net Date: Mon, 22 Sep 2025 13:06:19 +0200 Message-ID: <20250922110622.10368-1-mmietus97@yahoo.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 References: <20250922110622.10368-1-mmietus97.ref@yahoo.com> Content-Length: 1031 X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-1.hosts.colo.sdot.me", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Currently, all xmit flows use dst_cache in a way that references its dst_entry for each xmitted packet. These atomic operations are redundant in some flows. 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 OpenVP [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [66.163.188.204 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [mmietus97(at)yahoo.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [mmietus97(at)yahoo.com] X-Headers-End: 1v0eNz-0004yx-Nf Subject: [Openvpn-devel] [PATCH net-next v3 0/3] net: tunnel: introduce noref xmit flows for tunnels X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Marek Mietus via Openvpn-devel From: Marek Mietus Reply-To: Marek Mietus Cc: openvpn-devel@lists.sourceforge.net Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1843962039154364195?= X-GMAIL-MSGID: =?utf-8?q?1843962039154364195?= Currently, all xmit flows use dst_cache in a way that references its dst_entry for each xmitted packet. These atomic operations are redundant in some flows. 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. 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. Changes in v3: - Added implementation for ip6 - Updated cover letter and commit messages Link to v2: https://lore.kernel.org/netdev/20250912112420.4394-1-mmietus97@yahoo.com/