From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sonic304-21.consmr.mail.ne1.yahoo.com (sonic304-21.consmr.mail.ne1.yahoo.com [66.163.191.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1FB4225A3B for ; Thu, 18 Sep 2025 16:41:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.163.191.147 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758213680; cv=none; b=Xtw4MtFR1d9vYgxknrTVZjZzZIzBJAX60us/QWY5KFQ4DZaHDuJ4QEN/7WCH6Zi+GuRfA/ba3s9lOrvbCn5lA8iGQ3slfD18supSqEUXUQXv3fxHrm6gnHcQZ6izxzj45Tpz8krt3//5HehuG87OwdU0O8H5nseBKiQJxdzDrUw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758213680; c=relaxed/simple; bh=gGbzZ5VV3OIn62Eu6iZwDqNaFqwL/+7x16wU9sQnAis=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uTn2MLLDP+SzdG2vgrAuVN6WIul4O2BIl5CqooMrC/oDoSWpc/fkO3NgyRU5fs2cpHB+tJnCgELFZSNgRZu4/LVxjZRHjDK2dD0GOxCF9ghRRYKe0B/m+NzI3578FyVF560IjFGw04TGJpHj1imRiBu8KxanQ8vfmh4jsIeFtNs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com; spf=pass smtp.mailfrom=yahoo.com; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b=LnQKRMBa; arc=none smtp.client-ip=66.163.191.147 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=yahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=yahoo.com header.i=@yahoo.com header.b="LnQKRMBa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758213678; bh=/4PcM/wn+07Mm2majPeVM3gZSggh73UfIq3Vf1R81K4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=LnQKRMBaxEkuhGbh4ME2CRnJnN8lWMl5FJFzE6iuh+J+nmED0V2SOdZlcIFgDP/dEQ5eOtC17ZV2QnXM1+L6acExm3itEs0uVPPOZAR+PCye+8akXVWnABpOubSnYzPzqcoCxitcet+jkQwdHjgDg19oynHtc8MnuYCJJpLqw71+8PnQB4/juEq4Pw4foRY1SRMLbkND87BQJWbTgoBQilOtH4wu4MV1Nq2Qgz80ec5DX1acJBF9q2y+Yv5sA9YBcjvw+EQW/guhCOXpKc7oEgU1uCYIEN0LVzT0/w+e96s6ry8TFI5llM5qD/3RDjJh2FRmQtO4Gjsd77RwCM7ytg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1758213678; bh=OHboz8RJa4KPoMxgbHWMtzOo7Se50Q2WBrR33eEn/Qr=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=IShDeQHdoGVoVpHnz04yzCg7Z163i9B/qvmeYcSSzSjEW9GIdLaRf+0OhFobnSDZeaGAlGSQMOgfc+Z1R2/Oz67TlFvVVVlD0CzFLy3arcYZx9jCXMTog659ojdXhmfmmjizXU1xxi2sMdYqyE4Ctf8B9UZoeTpYst9iRHjha0kFYlOLDNRJ41aabglhsiUBDeM7qJEXsyRLLA3G4t4JBtb9yT5Gak5oy+NgyKjKWHzFathgrB65ztc6wqM6odYgkUeSRbWOqxJMMOm+hxtYra7D2DeZHHLUJXzEjYjxc+AjExjlfHEGbrm+Qyh3CFCjgC4733ZgslJq6tAjU5/qzQ== X-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cI3YrecviVOMO6CP2JlFVRq4J2UZcO_t08EB0wO6LqCS3OkEzL9z3e4__ YbTuAYtgaqD3KBlVxAhURcQGPZ842kPrQEaqNcX7B X-Sonic-MF: X-Sonic-ID: a098bdce-3a02-4107-ab3b-992d6f1a8803 Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ne1.yahoo.com with HTTP; Thu, 18 Sep 2025 16:41:18 +0000 Received: by hermes--production-ir2-74585cff4f-g8xqt (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 66fa4a894ced73a43e3b3b871bfd45cf; Thu, 18 Sep 2025 16:31:06 +0000 (UTC) Message-ID: Date: Thu, 18 Sep 2025 18:31:01 +0200 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 0/3] net: tunnel: introduce noref xmit flows for tunnels To: Sabrina Dubroca Cc: Antonio Quartulli , netdev@vger.kernel.org, openvpn-devel@lists.sourceforge.net References: <20250909054333.12572-1-mmietus97.ref@yahoo.com> <20250909054333.12572-1-mmietus97@yahoo.com> <8e6b83b3-c986-4d6e-b61a-363e13bf1ddc@yahoo.com> Content-Language: en-US From: Marek Mietus In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.24425 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo W dniu 9/16/25 o 12:43, Sabrina Dubroca pisze: > 2025-09-09, 16:43:01 +0200, Marek Mietus wrote: >> W dniu 9/9/25 o 13:17, Antonio Quartulli pisze: >>> On 09/09/2025 07:43, Marek Mietus wrote: >>>> 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. >>> >>> Can you elaborate on the current limits/drawbacks and explain what we gain with this new approach? >>> >>> It may be obvious for some, but it's not for me. >>> >> >> The only difference with the new approach is that we avoid taking an unnecessary >> reference on dst_entry. This is possible since the entire flow is protected by RCU. >> This change reduces an atomic write operation on every xmit, resulting in a performance >> improvement. > > It would be nice to incorporate this information into the cover > letter, and to provide numbers showing the performance > improvement. That way, it's available to other reviewers and gets > recorded in the git log. Are you doing crypto with some accelerator? > Otherwise I'd imagine skipping a few atomic operations is not really > noticeable. > >> There are other flows in the kernel where a similar approach is used (e.g. __ip_queue_xmit >> uses skb_dst_set_noref). >> >>> Also it sounded as if more tunnels were affected, but in the end only ovpn is being changed. >>> Does it mean all other tunnels don't need this? >>> >> >> More tunneling code can be updated to utilize these new helpers. I only worked >> on OpenVPN, as I am more familiar with it. It was very easy to implement the >> changes in OpenVPN because it doesn't use the udp_tunnel_dst_lookup helper >> that adds some complexity. >> >> I hope to incorporate these changes in more tunnels in the future. > > It would also be good to add this to the cover letter. Something like > "For now, only ovpn is updated , but other tunnels could > also take advantage of this." > Noted, will add in the next revision.