🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5537

Re: [PATCH] udp: Add noinline_for_tracing annotation for udp{,_v6}_send_skb()

#5537
From: Willem de Bruijn
Date: Tue, 20 Oct 2026 13:50
44 lines
12870 bytes
Jason Xing wrote:
> On Tue, Oct 20, 2026 at 7:08 AM Josh Don <joshdon@google.com> wrote:
> >
> > We hook udp_send_skb() and udp_v6_send_skb() using BPF fentry programs
> > to monitor UDP transmits. Both functions are static and have two
> > callers: udp{,v6}_sendmsg() and udp{,_v6}_push_pending_frames().
> >
> > After an FDO profile update, udp_v6_send_skb() is now inlined into
> > udpv6_sendmsg(), while an out-of-line copy remains for
> > udp_v6_push_pending_frames(). The fentry program still attaches
> > successfully, but it is silently bypassed for all uncorked sends.
> >
> > To address this, make both functions noinline explicitly for tracing,
> > as was done for tcp_drop_reason() in commit dbd5e2e79ed8 ("net: tcp:
> > Add noinline_for_tracing annotation for tcp_drop_reason()").
> >
> > Assisted-by: LLM
> > Signed-off-by: Josh Don <joshdon@google.com>
> 
> I actually mentioned this thing a few times before. The original
> thread was from Breno who tried to apply a similar change for tcp
> sendmsg. The fact is until now we don't guarantee those functions
> should be kept noinline like how uAPI works just for BPF prog. What I
> suggested was to select a series of functions in one Doc so that we
> could tell people those functions should be noinline or whatever else
> just for tracing in a soft way?
> 
> Otherwise people would argue there are more functions that should be
> done in the same way because they internally trace it.
> 
> Willem, Kuniyuki, any thoughts?

We'll have to review hooks on a case-by-case basis for performance
impact.

If possible, it's preferable to select hooks that cannot be inlined.
Over limiting what the compiler is allowed to do.
Technical Details
Message-ID: <willemdebruijn.kernel.1a81a5aacc334@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349331-linux-kernel-netdev=dewy.ru
References: <20261019230758.2960779-1-joshdon@google.com> <CAL+tcoBjWDwA+MrjzRapUeAom-4siL-cnXXLQrVf-A4myNRxyg@mail.gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-349331-linux-kernel-netdev=dewy.ru
From: willemdebruijn.kernel@gmail.com (Willem de Bruijn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] udp: Add noinline_for_tracing annotation for
 udp{,_v6}_send_skb()
Date: Tue, 20 Oct 2026 09:50:32 -0400
Organization: Usenet Network
Message-ID: <willemdebruijn.kernel.1a81a5aacc334@gmail.com>
References: <20261019230758.2960779-1-joshdon@google.com>
 <CAL+tcoBjWDwA+MrjzRapUeAom-4siL-cnXXLQrVf-A4myNRxyg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
	logging-data="3872406"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:38afMJQWp7FLi2DTq6d/iy7CX68= sha256:Sy9gzunvmLLGXsU3cnC8nh66Q1eAGKW0oz2vCfbHlLw=
	sha1:F11jSIYwr7Ej6yfvui76b6083MY= sha256:pKZS5AXICV4RGX8yjYTCEPvx2UiK2B/uWgFCwvOcrhI=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 28E1A110D33; Tue, 20 Oct 2026 17:25:40 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.048
X-Spam-Status: No, score=-3.048 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 55DzVMDa-oKF;
	Tue, 20 Oct 2026 17:25:37 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-349331-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 4BB5E110D2A; Tue, 20 Oct 2026 17:25:28 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 68F7039617; Tue, 20 Oct 2026 13:53:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792504235;
	b=pnyPqo3JHK00ZGr6Uv6+HpPFgljy4LO9G0zBOmSZsF1isKIJEjf5pRVPmN/ZOlmkzrEZ
	 oUxOgt3F7ExAzCdE3Bjo9Guntj4XxWqE14ASDP1LKUnP8kUDI6Cw6Wsx1DsfezJAKY2Mn
	 10HWAmavFtBFtDDFpJh8FRdZ2OBoOSoSjAB4puSU3dz8EITBAK2awlcmnK/2xs4kLYoRA
	 HvOHV89yg2Jk6URNTBRlLe83o9QzYOqzmooY1AR+V2t1b5C/hHwNGpJ7x7HwFzhtZHVjk
	 zx9YVLhsuPZ/nOzbT9PYyWGXS4dhH62vNs+HVkB+j9N/lzLVrkvH2WCty1fVnEeASAQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792504235;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
	 X-Gm-Gg:X-Received:Received:Date:From:To:Cc:Message-ID:In-Reply-To:
	 References:Subject:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Type:Content-Transfer-Encoding;
	bh=96lFzuIF0y8LTZ/Xj/gpwS61X9RAuz+hWffATqcJfZw=;
	b=BgugcsM7XXf7es0UbUwosO4cEFJsgmq7tRzNglkMBdfvAlyqTJ0Z3LGl5ylKaB5Kaamh
	 gdHs9pKNc2qhQLZUw590WuetNe6U4rRj5+x/qdLoFdLIGy6WagKMOP3OUb52gw+VHh14t
	 8pH2pjNTm0n8zaYWcdlV9am4jF86UBWT6op2Q1E0jwuZNY/EO3vdUuSCUZpfA1DI31qss
	 at9O1I/HGqHz12IuXPLMvJonPsZwzenuMQe0Pe7BgC9vNgt/FCVof8UTG1utQXgRA57cK
	 nykcK/kKKqNtG29MO7RV4U12XspKSismKK5/bU8Fz9ObD2Ndy/koaeojKdgnRAeWMvg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=ONkEtMSC;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A8BDD606AB31;
	Tue, 20 Oct 2026 13:50:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=ONkEtMSC
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.174
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792504234;
	b=PP1mcc6asu6SdFh9fgakQ3GSM56sSErY/+o3Lgk9nXxyv0Z2XhMgtwTn5IpIjWMEz7EI
	 /aNZBA0NEb/46qUGNjGB54yfrln7+uMIxnI9A/wKwSzL8rlM4ml+MopCwR+Ywp4TAiKys
	 8mHcbcKEnthuwYifYaYi4vCWip8/IKuWlCdctfoPohnQiTKvgUYCA5XuRF5HZ9wW452os
	 q74ZfpdNS2piHWiyqmrfezvH+8mdIFdkucqEBCd7pe8A7K8Cvt7vsj1Go5k1SVIyEfq9m
	 q9bGTrnfu8u/kxogn9Tl20lhPaqRMah0KbFJOCwORUEBi5au0GsnhxU7LBEJg0sK6ZA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792504234;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
	 Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:
	 MIME-Version:Content-Type:Content-Transfer-Encoding;
	bh=96lFzuIF0y8LTZ/Xj/gpwS61X9RAuz+hWffATqcJfZw=;
	b=IBUfxLMMWLhDZxKjZij78RqR24R1k7DCdsrVTA/IPQsgPAPwluRdUkctTaNooxLBz8g6
	 JtNX8s88odEfZu4WmnvOcinUe6c/iPBy/YLjmMhJnMA64cQm4bcHNxJyQo6kPSwymtV2t
	 41v91ZaM3TvzBY/QUe5kp3eMyixgjOiRDToel7fv0q1TcNU3fv1oHLwQVTjTEODq4YACv
	 9a+ilgue3fF7G663tzNpFMU+KIFRl14NYeAVpAhULqueGCbPJHy08dMXJR04ctPkcfB9u
	 pXopWURluAJok1j0LID97he6UileI2lWBaqWkMPcSX6KBNC1tqiurW5nUsWJGMusBrw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=ONkEtMSC;
	arc=none smtp.remote-ip=209.85.221.174
X-Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69A2E606AB27
	for <netdev@vger.kernel.org>; Tue, 20 Oct 2026 13:50:34 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 69A2E606AB27
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-vk1-f174.google.com with SMTP id 71dfb90a1353d-5e948e56af3so1075422e0c.2
        for <netdev@vger.kernel.org>; Tue, 20 Oct 2026 06:50:34 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792504233; x=1793109033; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:mime-version:subject
         :references:in-reply-to:message-id:cc:to:from:date:from:to:cc
         :subject:date:message-id:reply-to:content-type;
        bh=96lFzuIF0y8LTZ/Xj/gpwS61X9RAuz+hWffATqcJfZw=;
        b=ONkEtMSChaZ/kXr1iIEYaNVrBiwMiySHPPA4GNOuWGjsv2BrWZaUOoJ5J8X79pnhzx
         7xeioSNgPyYCGWj1xPBLR07Leiirw6LR50AaNasrNP9fdE0h+qyR4cqnPsx559blmnCm
         /J8TRgNz/PJHHKEYIHNmhgqbj4I8QUPvUY3njmNyIrRaQ/WgCBs3Y4m9U1tLESg4FdLg
         VHwJR/y8o8iNmGCnvKhfdShCGL7l9Wd13QQBbEg1M22mdwsRPfSXn3CUVUGdQp0noAq9
         +9hlGW6PebbaVKG4L+r2scB6fSxBz2vzVEP8IPYNFObQfW4GxhGEyGD7r1f4zzOCfn+U
         /+eg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792504233; x=1793109033;
        h=content-transfer-encoding:content-type:mime-version:subject
         :references:in-reply-to:message-id:cc:to:from:date:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=96lFzuIF0y8LTZ/Xj/gpwS61X9RAuz+hWffATqcJfZw=;
        b=gt6WB8Rhug/yNngKIfx4XB9bOsEoZu1EHxrEbeg/HsWw2ZqHRy3aLsqYuEhywVLqWO
         Bikf7Hl0MWLP+8b1xIWyrfE6qeoUCLwtSVyNWC3Wds8zzU7fEVyoTXUusNwTGL5+yEuP
         Av9bS7KwASiZYVP49ONdAH3hgNjV5WOWAyfLnxSKDCKVHtpJi6i8OHqLz02UdCfRYeGf
         1VN3Iuo7xlJWo3gvkuq5U0CQzB0No3lAx9pTiPbAaj/gsv3zZwBzDkiam5tUA0vQUA4g
         wqZoXr9yg2AoE348oL1cPnYXsq54Cgl6LxH+mVAKxLuoUCYSiZIMAawEPWys4nQ2WNnr
         ozlQ==
X-Forwarded-Encrypted: i=1; AKwUvBxud+LPMLvTsonv+iusgZq0ou383MrPQdDugkPnm/FYl3a6YGdJ5F/Vb1eqEItTVGvQCHGQkDs=@vger.kernel.org
X-Gm-Message-State: AFq9FYKz09xZrKhOnPlST1z+yHFtDTr6QxgX+hyet9cAHd5ztooPRTQk
	0bP8kvQp2yhan4DCe2OINixn7CdYZlfDBR5fYTNjqB0JtWtwTWFouCQS
X-Gm-Gg: AYBFou32m4CKGRJQNX6L4PR9z3hZtUrp9UqwGWDdClzpEuiKxc438Y4y4/d4TSg5yFf
	OhGQIt0W1e2J5Qm96Mkmc7WvSA3Y/tlymyUfiXlcnjIXQMC6CyWqM34m1sIe0abIgBxzcgCHc6Z
	+3NiKeVVozToovjWiXLwgw8jZuOnDMk/ItGpZiXm/hw36cOJ4z11ej2AU/tBInxseoM2khNQCic
	UIfDstfoDU25h8UwIzJiYOIX6cPAVmVa2g64jvwgBhlTe1ooc4xAyrFaD3PDwcqacm/TyTGOtqM
	iWmQH6YrikV2Y9MxNvM366wgMSyTrbm3bOqrPYwHmYAXvUJsUOYco1C9l3KMZStkGqSaRVmCu47
	kc3riceSSR3iEDWEBM05DGieuZCyQ+6kJY7m6Voywgz1t60LzkcnnpRCFpf+DwKK1nrXNpKE9Vd
	8QAntPP+gfmFL2B31D3czVz2DkFT9CPzsn6meR+6uGx2xTN38i1at+78Y7kFeyFrW71VzDRiCxH
	Nj6cyXEZ3RYzkMZpS+nnMrDXlshlcGEvPxknetV4hqKJ84MJbAzKMSjyaoCDAKTZBkKFUofvCYS
	40D5ej3Ex9m/zsrc2GWRCNKJX51HCvmIjk9uFg==
X-Received: by 2002:a05:6122:4890:b0:5e9:5e79:ab3 with SMTP id 71dfb90a1353d-5eaaa954f51mr4242745e0c.21.1792504233298;
        Tue, 20 Oct 2026 06:50:33 -0700 (PDT)
X-Received: from gmail.com (111.46.245.35.bc.googleusercontent.com. [35.245.46.111])
        by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-5eac20d6aa6sm7205788e0c.7.2026.10.20.06.50.32
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Tue, 20 Oct 2026 06:50:32 -0700 (PDT)
X-Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>, 
 "David S. Miller" <davem@davemloft.net>, 
 Eric Dumazet <edumazet@kernel.org>, 
 Jakub Kicinski <kuba@kernel.org>, 
 Paolo Abeni <pabeni@redhat.com>, 
 Simon Horman <horms@kernel.org>, 
 netdev@vger.kernel.org, 
 linux-kernel@vger.kernel.org
X-In-Reply-To: <CAL+tcoBjWDwA+MrjzRapUeAom-4siL-cnXXLQrVf-A4myNRxyg@mail.gmail.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list