Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	 Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Pauli Virtanen <pav@iki.fi>,
	 linux-bluetooth@vger.kernel.org,  netdev@vger.kernel.org,
	 davem@davemloft.net,  kuba@kernel.org,
	 willemdebruijn.kernel@gmail.com
Subject: Re: [PATCH v5 1/5] net-timestamp: COMPLETION timestamp on packet tx completion
Date: Thu, 20 Mar 2025 10:49:53 -0400	[thread overview]
Message-ID: <67dc2b111b3cf_a8274294af@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <CABBYNZJk2QjUaJCurAocMAJdOTfFHCjKO_S2rcxWLwTv8K9VDw@mail.gmail.com>

Luiz Augusto von Dentz wrote:
> Hi Pauli, Willem, Jason,
> 
> On Wed, Mar 19, 2025 at 11:48 AM Paul Menzel <pmenzel@molgen.mpg.de> wrote:
> >
> > Dear Pauli,
> >
> >
> > Thank you for your patch. Two minor comments, should you resend.
> >
> > You could make the summary/title a statement:
> >
> > Add COMPLETION timestamp on packet tx completion
> >
> > Am 18.03.25 um 20:06 schrieb Pauli Virtanen:
> > > Add SOF_TIMESTAMPING_TX_COMPLETION, for requesting a software timestamp
> > > when hardware reports a packet completed.
> > >
> > > Completion tstamp is useful for Bluetooth, as hardware timestamps do not
> > > exist in the HCI specification except for ISO packets, and the hardware
> > > has a queue where packets may wait.  In this case the software SND
> > > timestamp only reflects the kernel-side part of the total latency
> > > (usually small) and queue length (usually 0 unless HW buffers
> > > congested), whereas the completion report time is more informative of
> > > the true latency.
> > >
> > > It may also be useful in other cases where HW TX timestamps cannot be
> > > obtained and user wants to estimate an upper bound to when the TX
> > > probably happened.
> > >
> > > Signed-off-by: Pauli Virtanen <pav@iki.fi>
> > > ---
> > >
> > > Notes:
> > >      v5:
> > >      - back to decoupled COMPLETION & SND, like in v3
> > >      - BPF reporting not implemented here
> > >
> > >   Documentation/networking/timestamping.rst | 8 ++++++++
> > >   include/linux/skbuff.h                    | 7 ++++---
> > >   include/uapi/linux/errqueue.h             | 1 +
> > >   include/uapi/linux/net_tstamp.h           | 6 ++++--
> > >   net/core/skbuff.c                         | 2 ++
> > >   net/ethtool/common.c                      | 1 +
> > >   net/socket.c                              | 3 +++
> > >   7 files changed, 23 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/Documentation/networking/timestamping.rst b/Documentation/networking/timestamping.rst
> > > index 61ef9da10e28..b8fef8101176 100644
> > > --- a/Documentation/networking/timestamping.rst
> > > +++ b/Documentation/networking/timestamping.rst
> > > @@ -140,6 +140,14 @@ SOF_TIMESTAMPING_TX_ACK:
> > >     cumulative acknowledgment. The mechanism ignores SACK and FACK.
> > >     This flag can be enabled via both socket options and control messages.
> > >
> > > +SOF_TIMESTAMPING_TX_COMPLETION:
> > > +  Request tx timestamps on packet tx completion.  The completion
> > > +  timestamp is generated by the kernel when it receives packet a
> > > +  completion report from the hardware. Hardware may report multiple
> >
> > … receives packate a completion … sounds strange to me, but I am a
> > non-native speaker.
> >
> > […]
> >
> >
> > Kind regards,
> >
> > Paul
> 
> Is v5 considered good enough to be merged into bluetooth-next and can
> this be send to in this merge window or you think it is best to leave
> for the next? In my opinion it could go in so we use the RC period to
> stabilize it.

I'm fine with merging as is.

Most of my comments were design points for consideration. If Pauli
prefers as is, no objections from me.

For the series:

Reviewed-by: Willem de Bruijn <willemb@google.com>


  reply	other threads:[~2025-03-20 14:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 19:06 [PATCH v5 0/5] net: Bluetooth: add TX timestamping for ISO/L2CAP/SCO Pauli Virtanen
2025-03-18 19:06 ` [PATCH v5 1/5] net-timestamp: COMPLETION timestamp on packet tx completion Pauli Virtanen
2025-03-19  0:13   ` Jason Xing
2025-03-19 14:37   ` Willem de Bruijn
2025-03-19 15:48   ` Paul Menzel
2025-03-20 14:43     ` Luiz Augusto von Dentz
2025-03-20 14:49       ` Willem de Bruijn [this message]
2025-03-20 17:12       ` Pauli Virtanen
2025-03-20 17:51         ` Jason Xing
2025-03-18 19:06 ` [PATCH v5 2/5] Bluetooth: add support for skb TX SND/COMPLETION timestamping Pauli Virtanen
2025-03-19  0:39   ` Jason Xing
2025-03-19 14:44     ` Willem de Bruijn
2025-03-19 17:43       ` Pauli Virtanen
2025-03-19 20:00         ` Willem de Bruijn
2025-03-19 21:30           ` Pauli Virtanen
2025-03-19 21:35             ` Willem de Bruijn
2025-03-19 21:16         ` Luiz Augusto von Dentz
2025-03-19 18:21     ` Pauli Virtanen
2025-03-20  0:25       ` Jason Xing
2025-03-18 19:06 ` [PATCH v5 3/5] Bluetooth: ISO: add TX timestamping Pauli Virtanen
2025-03-19 14:49   ` Willem de Bruijn
2025-03-18 19:06 ` [PATCH v5 4/5] Bluetooth: L2CAP: " Pauli Virtanen
2025-03-18 19:06 ` [PATCH v5 5/5] Bluetooth: SCO: " Pauli Virtanen
2025-03-20 16:10 ` [PATCH v5 0/5] net: Bluetooth: add TX timestamping for ISO/L2CAP/SCO patchwork-bot+bluetooth

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=67dc2b111b3cf_a8274294af@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pav@iki.fi \
    --cc=pmenzel@molgen.mpg.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox