From: JR Lanteigne <root@dnim.dev>
To: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Simon Horman <horms@kernel.org>
Subject: Re: [PATCH net] net: fall back to skb_iif for the timestamping pktinfo if_index
Date: Mon, 24 Aug 2026 07:24:32 -0300 [thread overview]
Message-ID: <178756707212.4073008.8425791726071449399@dnim.dev> (raw)
In-Reply-To: <aov5lCT4P_3tmRqR@localhost>
Miroslav Lichvar wrote:
> That would cause applications to receive a wrong index in some cases,
> right? If it's possible, it should report the index of the physical
> interface, but it should not be guessing.
Right: with the fallback a nonzero if_index is no longer guaranteed
to be the physical timestamping device. An application that maps the
index to a PHC without validating it could see the aggregating
device where it previously saw 0.
Reporting the physical interface does not look implementable in the
two failing cases. Without CONFIG_NET_RX_BUSY_POLL there is no napi
id recorded at all. For cpsw the napi belongs to a DMA channel
shared by both ports, so there is no per-napi net_device to attach;
the delivering port is only known per packet, and there skb->dev is
set correctly, so skb_iif is exactly the physical interface. The
index only becomes an aggregate with bonding or bridging on top,
where the napi lookup would have failed anyway.
So the choice for these packets is between 0 and the skb_iif value,
which is what IP_PKTINFO already reports. No objection from me if
this is dropped; I can respin if there is a form of the fallback
worth keeping.
next prev parent reply other threads:[~2026-08-24 10:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-23 5:21 [PATCH net] net: fall back to skb_iif for the timestamping pktinfo if_index JR Lanteigne
2026-08-24 2:21 ` Willem de Bruijn
2026-08-24 10:24 ` JR Lanteigne
2026-08-24 7:58 ` Miroslav Lichvar
2026-08-24 10:24 ` JR Lanteigne [this message]
2026-08-24 14:06 ` Willem de Bruijn
2026-08-24 16:55 ` JR Lanteigne
2026-08-24 18:35 ` Willem de Bruijn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178756707212.4073008.8425791726071449399@dnim.dev \
--to=root@dnim.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=mlichvar@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.