From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sonic305-20.consmr.mail.ne1.yahoo.com (sonic305-20.consmr.mail.ne1.yahoo.com [66.163.185.146]) (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 14ADB24169F for ; Mon, 17 Nov 2025 11:51:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.163.185.146 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763380286; cv=none; b=YAzcUEeRYJMe5grV9eyf0X/ZrFbdFdjVW2QY21oA1ksWFdYNMaYe9RJNC16Hia+IEvxsqQ/0ugbDqOSvxochdkdca+BeaptK0JsoWauktztjaKqX5P/ho5G+s2VU2Kcx1XCvClSiidUQB1h1xDzoPEukmy78kloZ7Tt7HagWmuk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763380286; c=relaxed/simple; bh=/WUHdRQodpj86CCo0OeYs2AhSUdEyxyMr5neyZ0MmL0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iuUmxXSV1ny+hWCQbaJKtjVmCetOj86jztKcw2IdrdmZ3fbJbrsw4tvmzOsb+ZbhRTg+wpnQdPwSuwJq5ojFmhYfEQNlQtKy+5z6RwikR1sxZn2P2/CcQIK5ecGsBBHwttynJdw4A9h0OVNGVpNGC/M2h31tq9k5l/wWthDFVJM= 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=Ua7EF2UV; arc=none smtp.client-ip=66.163.185.146 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="Ua7EF2UV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1763380284; bh=GELvACo1tkiW+N4Xdx8cldnc6GFh0Mi59dIg9K0Mzk4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=Ua7EF2UVqj6GYDfyPQ2a3kYAaCtMzwlFMiP4ZPNyks6Xn1Gi/N3bTyuOxjYyzu9cIZ3ueX7HF/Wyv5UQnQ9wKSuMwru5hnpTZNhDoCICXnA7tpHEJCrPNHDY+p029XILOcOO+0ju93LkndWX79UKauazKdQNpLPllY99/YvpTkyd5NLV53P3hsy3ZvUG6L9EQdOiW7f3fB/SmezHW+FhJoAv+yF9sj7P+n0s/LprhWJMpU/0mYhhVXYrM+Vq2Docyh7uP1UMgRgnPOj3U4maVunnQ8+LPTKPlrMplk21XnqLv5jf2Ustsovfc2YR0v13IlRd+jaCrB4Y4t6lLAxd6g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1763380284; bh=BHAoW772i33wGlzqGr4EZUTClljn3PwzJl1cXnUIqj8=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=llUyDCrYzRj7O0DPUql/lI+FQS++SmKB8psm6M4153QNoohphTjabGAvFq2NuCnaebuBqBGsa64842JzG25VHqTulpmxLCtAuaRGqKa0fJTbeOAelyP5mSOgBy0loeYES3324JykyBppEezECi9SZKiUnNUVqKHH4zVyg7Ozip3b5zIqNhziFD9NvqmwLfnK3mCAweYHHMmitkb78f3Ktl6tnl2V3y2r3L4sQwsBltismF0WKRZoRvPYrMKvT54F9VFeEbMZJhNmumf8uZ7jT9oI3ZYMB/hG6L5oDI1mIj9FCGzFyWscL1fyq91d4mKg8oEu7ayGkfTnTGxrjx6fog== X-YMail-OSG: p6r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F1u3iQ_YKTvCIJakNgLkyyvqtd3seWsmiEwaGnxDmvAP.Wc6p28Cz0mT FnNkrdqj5omRMB.05fCaXXcvWv8Q- X-Sonic-MF: X-Sonic-ID: 997ffb10-dd23-4c38-b603-418e2e199767 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Mon, 17 Nov 2025 11:51:24 +0000 Received: by hermes--production-ir2-5fcfdd8d7f-zwzps (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ad4d1dd8edd9dcc9f081b91f969eda15; Mon, 17 Nov 2025 11:31:08 +0000 (UTC) Message-ID: <39fbfcb8-20a4-4693-af24-ea59a726bbec@yahoo.com> Date: Mon, 17 Nov 2025 12:31:00 +0100 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 v4 02/14] net: skb: use dstref for storing dst entry To: Sabrina Dubroca , Eric Dumazet Cc: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com, davem@davemloft.net References: <20251112072720.5076-1-mmietus97@yahoo.com> <20251112072720.5076-3-mmietus97@yahoo.com> <5af3e1bd-6b20-432b-8223-9302a8f9fe44@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.24652 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Dear Eric and Sabrina, I'm replying to both of you here. W dniu 11/13/25 o 19:17, Sabrina Dubroca pisze: > Eric, it seems your email didn't make it to netdev, quoting: > > 2025-11-13, 02:38:02 -0800, Eric Dumazet wrote: >> On Thu, Nov 13, 2025 at 1:37 AM Marek Mietus wrote: >> >>> W dniu 11/12/25 o 18:09, Sabrina Dubroca pisze: >>>> 2025-11-12, 08:27:08 +0100, Marek Mietus wrote: >>>>> Use the newly introduced dstref object for storing the dst entry >>>>> in skb instead of using _skb_refdst, and remove code related >>>>> to _skb_refdst. >>>> >>>> This is an important change to a very core part of networking. You >>>> need to CC all the networking maintainers/reviewers for this series >>>> (ask scripts/get_maintainer.pl). >>> >>> Noted for next time. >>> >>>> >>>>> This is mostly a cosmetic improvement. It improves readability >>>> >>>> That rename, and the rest of the changes in this series. is causing >>>> some non-negligible churn and will take a while to review, to ensure >>>> all the conversions are correct. >>>> >>>> @Maintainers can I get some time to look at this in detail? >>>> >>> >>> I figured it would require a thorough review. >>> Thank you for taking the time to look at it! >>> >>>> >>>> Also, I'm not sure how we ended up from the previous proposal ("some >>>> tunnels are under RCU so they don't need a reference" [1]) to this. >>>> >>>> [1] >>> https://lore.kernel.org/netdev/20250922110622.10368-1-mmietus97@yahoo.com/ >>>> >>> >>> As previously discussed with Jakub [2], tunnels that use >>> udp_tunnel_dst_lookup >>> add notable complexity because the returned dst could either be from >>> ip_route_output_key (referenced) or from the dst_cache (which I'm changing >>> to >>> be noref). There are also other tunnels that follow a similar pattern. > > But IMO Jakub's comment about technical debt is not addressed by > pushing dstref all over the tunnel code. > > I understood it differently. I thought the aforementioned debt referred to maintaining two different APIs that accomplish the same result, which is why I took the time to replace all callers in all of the tunnels to use the new API, and removed the old API. Maybe Jakub can clarify. >>> The cleanest way to keep track of which dst is referenced and which isn't >>> is to borrow existing refdst concepts. This allows us to more easily track >>> the ref state of dst_entries in later flows to avoid unnecessarily taking >>> a reference. I played around with a couple implementations and this turned >>> out to be the most elegant. It's a big change, but it's mostly semantic. >>> >>> [2] https://lore.kernel.org/netdev/20250923184856.6cce6530@kernel.org/ >> >> >> I have not seen the series, so I had to go to the archives. >> >> Too much code churn for my taste, and a true nightmare for future backports >> to stable kernels. >> >> Unless I am mistaken, this is your first submission to the linux kernel, >> please start with more manageable patches. > You are correct. This is my first submission. Initially, this series was much smaller, but that changed due to the generous feedback from Sabrina, Jakub and Paolo. I tried to make this series smaller, but that ended up in code duplication between tunnels and some spaghetti code. I did spend quite some time on this new version, so I'd love to hear your suggestions / feedback if you have any, as I'd like to continue working on this feature.