Article View: linux.kernel.netdev
Article #180Re: [PATCH net-next 0/3] Report netns cookie in FIB lookup tracepoints
From: Ferenc Fejes
Date: Wed, 07 Oct 2026 12:34
Date: Wed, 07 Oct 2026 12:34
52 lines
8978 bytes
8978 bytes
On Tue, 2026-10-06 at 18:54 +0300, Ido Schimmel wrote:
> The fib:fib_table_lookup and fib6:fib6_table_lookup tracepoints do
> not
> report the network namespace in which the lookup was performed, so
> lookups performed in different namespaces cannot be told apart. The
> recorded PID does not help either, as lookups in the receive path are
> performed in softIRQ context.
>
> This is a problem, for example, for netns-aware tracers [1] and
> multi-ASIC systems where each ASIC and its ports reside in a separate
> network namespace.
>
> This patchset reports the network namespace cookie in both
> tracepoints,
> as commit 27cb3de7f43a ("net: add net cookie for net device trace
> events") did for the net device tracepoints. This allows filtering
> lookups performed in a specific network namespace, for example:
>
> # perf record -a -e fib:fib_table_lookup --filter 'net_cookie == 12'
>
> The cookie of a given network namespace can be retrieved using "ip
> netns
> cookie" [2].
>
> Patch #1 reports the cookie in the IPv6 tracepoint, which is already
> passed the network namespace.
>
> Patch #2 passes the network namespace to fib_table_lookup() and from
> there to the IPv4 tracepoint.
>
> Patch #3 reports the cookie in the IPv4 tracepoint.
>
>
Thank you! With the user-facing changes given net-next is 100%
justified.
I wonder if the parameter passing itself, e.g. the line
+int fib_table_lookup(struct net *net, struct fib_table *tb, ...
can be a standalone change. It would introduce no functional or user-
facing changes and could therefore target the "net" tree, with the
potential to be backported. Pure kfunc/kprobe-based eBPF tracers could
benefit from that, with the downside of introducing an unused variable.
I assume this would be a hard sell, to say the least :-)
For the whole set:
Reviewed-by: Ferenc Fejes <ferenc@fejes.dev>
Best,
Ferenc
Technical Details
Message-ID:
<364f670e60754319fab25302b2b49e3269ec49da.camel@fejes.dev>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-342331-linux-kernel-netdev=dewy.ruReferences:
<20261006155454.853588-1-idosch@nvidia.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-342331-linux-kernel-netdev=dewy.ru
From: ferenc@fejes.dev (Ferenc Fejes)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 0/3] Report netns cookie in FIB lookup
tracepoints
Date: Wed, 07 Oct 2026 14:34:51 +0200
Organization: Usenet Network
Message-ID: <364f670e60754319fab25302b2b49e3269ec49da.camel@fejes.dev>
References: <20261006155454.853588-1-idosch@nvidia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="651664"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:yG5omq+ZfopOSa0Zxf+TFfmyxxY= sha256:sO/1lsvKrQuFEi/2bzSJVK0QOo4MB4ik5JeBv4a0/nQ=
sha1:W9bAPo6O81bHAJKy87mVFupL9TI= sha256:kQtfN14fM/P6dIOphYrfbGticWwqIh9c5KO9gGqzATM=
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 AE28210F166; Wed, 7 Oct 2026 16:20:24 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.751
X-Spam-Status: No, score=-0.751 tagged_above=-9999 required=6.31
tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 uKiDRgfReKYq;
Wed, 7 Oct 2026 16:20:22 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-342331-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=fejes.dev
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 08B7C10F141; Wed, 7 Oct 2026 16:20:18 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
by sto.lore.kernel.org (Postfix) with ESMTP id 068B160D654; Wed, 7 Oct 2026 12:35:07 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B2460471CE1;
Wed, 7 Oct 2026 12:35:04 +0000 (UTC)
X-Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48])
(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 65EBB4734F3
for <netdev@vger.kernel.org>; Wed, 7 Oct 2026 12:34:56 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1791376504; cv=none; b=rr16NKVIz3Y8gqSybRaudtPKEsYsHfqyltdkuXoO62I8H1yG4O0gxHLJGGPOLMbqv9z2b1vdCg9MeUtmKDIsmaV9zV97CQhAKXp+l5wANuTc5ZD1NOA8YYqBCgHiubv4HeokSNlBPgtpMrup9ncMYvupykfaHsyMxQVYLIubBzc=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1791376504; c=relaxed/simple;
bh=X5ldmMZ8oVc3uhLMHuL3apnRWJjXy5+ZyFq1ypFigeQ=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=HMcvT5FT+s5gmqposUAn9JGbnRbzBoROcwVzeb2WgPrViJeKaK54sh01Gr7jrG9Frs3iVJ428XqN4FuKncbkNrRR0EJGVRp7nu/jWBO35LgG4IKnHd6HZI4GvDhu9zQF/8mBMROK7EvVJhn9slVrMj/dbm05Lz8Aoys8xv1RaYk=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=fejes.dev; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.48
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=fejes.dev
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-49d0da752ffso34534405e9.3
for <netdev@vger.kernel.org>; Wed, 07 Oct 2026 05:34:56 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1791376494; x=1791981294;
h=mime-version:user-agent:content-transfer-encoding:content-type
:references:in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=X5ldmMZ8oVc3uhLMHuL3apnRWJjXy5+ZyFq1ypFigeQ=;
b=0UQmBwKdAUWk3j8eXenc3CvUE+x3S4NLS1wc+yUeFCmg5J6UMoHJcOCAM3ge4Va1Ui
WpBa2ms0ZckRPtdfaOlhFzgEGiQpdQvnlItTsSb8X+/5LyZhNQtxR/y4DQToEzEpjo/C
w+J0kJvz5LMuUaf5CLLQSvD5PwRubl8mB2vbc3Ncy0l1b46NS0cEZj5z0dbJOKuVP9ee
exM8dxJzaOc+vRs+6jXsFDwuSBuWWRq9FGGiLRFCLR9wtu5q69kXgpM95c7AY9OzpPap
tdI6xLTpDDM975UeQ4suIqQM5buCB8xYy5MhI0W4ZeteC4FqcFgMn33XYMVA1W2Ne6KY
Gfqw==
X-Forwarded-Encrypted: i=1; AKwUvBw4SUcb6jEt02a1JhyjEcTfLXOAKRFJZF5sedImFgF7XTyPq18kqvWFQzGKgTtVz7/Z5KEpZrY=@vger.kernel.org
X-Gm-Message-State: AFuF++m52MIS4g9rBi9YEJHenJ8A/t62l0YRIgl9LsASkHM2RwQpwfZL
eUmgVeFa539qAWTadVGrVq4Jk4Z68FOr4SwgN2pueJY3LKlpQYEl4etH
X-Gm-Gg: AYBFou3zDXE/6Oii3F8GubE+HY9LzBy7hnnDYj6pheKVVdIXBNGg1OOTReWx/l673gB
e1p9yPGI3bibLT8bgUaWotDfIwfgTbrcuzjI3KAw9dG44r2oAE4Q8wZr24UZbY1/jIS/PcXozdt
Hnhka2g+EVdxaYeTM2IpeceDUbHSnBiJLHp5d8Bvf+kOSe8a4BoxgJ72xv+iPppi++5uzqan1Gn
V6HlFIDBQHBvLmXCvlIpd0aUdrm6yTotLa8Hac2XbktKFLMSrVKB8DABuuQBy0aKEJfNshR0b3T
H22fmcNJYNObkV/U24HT4XpQHXr2bGnUDVSuOtuum9vrNl8iLjEzzVjWIy019QDZLRrrTYW3vqo
OW/nXSd9zFCsxB899uLPZ1hTkvkisDppib9xW9ejvbPUfdzZwzAgfxe3MzsVcw+XXh0a3oA+sku
pkL4i1mjDJGQQ+tY+6EgYRpQ/18yg2Da4s83fzaDyNGJzArxf/oaSKloeJSub5IIfwEBWazn8yG
l5Q4BHp/U3Ufumg/dqMxvySSWu5lfpAd3chW0wjdPsXD48KDlbkg0G39KAj615NKcRoCSTdnSOj
cCdiGGfn0uR/ytGAqdvn2H8aEw2ZocOsaf92X18NvguQkeZQr/M5ClegUScowttbMC1/foKAMrX
13JbRBEt8zDnQ5YAA
X-Received: by 2002:a05:600c:821a:b0:4a1:777b:8a12 with SMTP id 5b1f17b1804b1-4a1803112f1mr35573575e9.14.1791376494096;
Wed, 07 Oct 2026 05:34:54 -0700 (PDT)
X-Received: from [10.148.83.18] (business-89-135-192-225.business.broadband.hu. [89.135.192.225])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1787e7792sm141655035e9.0.2026.10.07.05.34.51
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 07 Oct 2026 05:34:52 -0700 (PDT)
X-Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@kernel.org, dsahern@kernel.org, horms@kernel.org,
petrm@nvidia.com, rostedt@goodmis.org, daniel@iogearbox.net
X-In-Reply-To: <20261006155454.853588-1-idosch@nvidia.com>
X-User-Agent: Evolution 3.56.2-10+b1
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>