All of lore.kernel.org
 help / color / mirror / Atom feed
From: JR Lanteigne <root@dnim.dev>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.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>,
	Miroslav Lichvar <mlichvar@redhat.com>,
	richardcochran@gmail.com
Subject: Re: [PATCH net] net: fall back to skb_iif for the timestamping pktinfo if_index
Date: Mon, 24 Aug 2026 07:24:21 -0300	[thread overview]
Message-ID: <178756706164.4072964.5948114813697377372@dnim.dev> (raw)
In-Reply-To: <willemdebruijn.kernel.150ff949d6753@gmail.com>

Willem de Bruijn wrote:
> I don't mind adding a fallback. As long as possibly passing an
> aggregate (or tunnel) device cannot cause regressions to existing
> users, notably chrony and linuxptp.

I checked both.

linuxptp does not use SCM_TIMESTAMPING_PKTINFO at all, and its event
sockets are opened per port and bound with SO_BINDTODEVICE, so
timestamps are attributed to an interface by socket, not by this
cmsg.

chrony matches the cmsg if_index only against interfaces listed in
its hwtimestamp directive, with the PHC resolved by its own
ETHTOOL_GET_TS_INFO on the configured name. An index it was not
configured for (an unconfigured aggregate) fails the lookup exactly
like the 0 it gets today, where it silently degrades to the kernel
software timestamp. If the user did configure the aggregate, the
value is nothing new either: on kernels without this cmsg (pre-4.13)
chrony already falls back to the IP_PKTINFO/IPV6_PKTINFO index,
which is the same aggregate device skb_iif holds, since
__netif_receive_skb_core() resets skb_iif after the bond/bridge
rx_handler rewrites skb->dev and inet_iif()/IP6CB(skb)->iif report
that device.

The fallback also only fires when the napi lookup already failed, so
the bonding configurations the referenced commit was added for,
where the napi id resolves to the physical slave, are unchanged.

  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 [this message]
2026-08-24  7:58 ` Miroslav Lichvar
2026-08-24 10:24   ` JR Lanteigne
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=178756706164.4072964.5948114813697377372@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=richardcochran@gmail.com \
    --cc=willemb@google.com \
    --cc=willemdebruijn.kernel@gmail.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.