Subject: Re: [PATCH net-next] net: add the ifindex for trace_net_dev_xmit_timeout

From: Ido Schimmel <[email-masked]>
Date: Wed, 22 Oct 2025 13:45:35 +0300

On Wed, Oct 22, 2025 at 04:31:34PM +0800, Tonghao Zhang wrote:
> > On Oct 22, 2025, at 08:10, Jakub Kicinski <[email-masked]> wrote:
> > 
> > On Tue, 21 Oct 2025 17:19:00 +0800 Tonghao Zhang wrote:
> >> In a multi-network card or container environment, provide more accurate information.
> > 
> > Why do you think that ifindex is more accurate than the name?
> > Neither is unique with netns..
> I thought ifindex was globally unique, but in fact, different namespaces may have the same ifindex value. What about adding the ns.inum inode ?

The netns cookie is probably better. See this thread:

https://lore.kernel.org/netdev/[email-masked]/

You can also retrieve it by attaching a BPF program to the tracepoint.