From: "Jiawen Wu" <jiawenwu@trustnetic•com>
To: "'Keller, Jacob E'" <jacob.e.keller@intel•com>,
"'Andrew Lunn'" <andrew@lunn•ch>
Cc: <andrew+netdev@lunn•ch>, <davem@davemloft•net>,
<edumazet@google•com>, <kuba@kernel•org>, <pabeni@redhat•com>,
<richardcochran@gmail•com>, <linux@armlinux•org.uk>,
<horms@kernel•org>, <netdev@vger•kernel.org>,
<mengyuanlou@net-swift•com>,
"'linglingzhang'" <linglingzhang@net-swift•com>
Subject: RE: [PATCH net-next 1/4] net: wangxun: Add support for PTP clock
Date: Wed, 8 Jan 2025 15:26:20 +0800 [thread overview]
Message-ID: <03e101db619e$9d11d440$d7357cc0$@trustnetic.com> (raw)
In-Reply-To: <CO1PR11MB50894A28220E758BACAADDFBD6122@CO1PR11MB5089.namprd11.prod.outlook.com>
> > > > > > > +/**
> > > > > > > + * wx_ptp_tx_hwtstamp_work
> > > > > > > + * @work: pointer to the work struct
> > > > > > > + *
> > > > > > > + * This work item polls TSYNCTXCTL valid bit to determine when a Tx
> > hardware
> > > > > > > + * timestamp has been taken for the current skb. It is necessary,
> > because the
> > > > > > > + * descriptor's "done" bit does not correlate with the timestamp event.
> > > > > > > + */
> > > > > >
> > > > > > Are you saying the "done" bit can be set, but the timestamp is not yet
> > > > > > in place? I've not read the whole patch, but do you start polling once
> > > > > > "done" is set, or as soon at the skbuff is queues for transmission?
> > > > >
> > > > > The descriptor's "done" bit cannot be used as a basis for Tx hardware
> > > > > timestamp. So we should poll the valid bit in the register.
> > > >
> > > > You did not answer my question. When do you start polling?
> > >
> > > As soon at the skbuff is queues for transmission.
> >
> > I assume polling is not for free? Is it possible to start polling once
> > 'done' is set? Maybe do some benchmarks and see if that saves you some
> > cycles?
> >
> > Andrew
> >
>
> Agreed, I would try to benchmark that. Timestamps need to be returned
> relatively quickly, which means the polling rate needs to be high. This costs a lot
> of CPU, and so any mechanism that lets you start later will help the CPU cost.
May not. We should notify the stack as soon as we get Tx hardware timestamp.
But descriptor's "done" bit may hasn't been set yet.
next prev parent reply other threads:[~2025-01-08 7:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-02 10:30 [PATCH net-next 0/4] Support PTP clock for Wangxun NICs Jiawen Wu
2025-01-02 10:30 ` [PATCH net-next 1/4] net: wangxun: Add support for PTP clock Jiawen Wu
2025-01-02 14:13 ` Andrew Lunn
2025-01-06 7:42 ` Jiawen Wu
2025-01-06 14:26 ` Andrew Lunn
2025-01-07 2:24 ` Jiawen Wu
2025-01-07 13:33 ` Andrew Lunn
2025-01-08 0:34 ` Keller, Jacob E
2025-01-08 7:26 ` Jiawen Wu [this message]
2025-01-08 18:32 ` Andrew Lunn
2025-01-02 16:16 ` kernel test robot
2025-01-02 17:33 ` Vadim Fedorenko
2025-01-06 21:29 ` Keller, Jacob E
2025-01-02 10:30 ` [PATCH net-next 2/4] net: wangxun: Implement get_ts_info Jiawen Wu
2025-01-02 17:44 ` Vadim Fedorenko
2025-01-06 2:35 ` Jiawen Wu
2025-01-02 10:30 ` [PATCH net-next 3/4] net: wangxun: Add watchdog task for PTP clock Jiawen Wu
2025-01-02 17:53 ` Vadim Fedorenko
2025-01-03 8:45 ` Richard Cochran
2025-01-02 10:30 ` [PATCH net-next 4/4] net: ngbe: Add support for 1PPS and TOD Jiawen Wu
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='03e101db619e$9d11d440$d7357cc0$@trustnetic.com' \
--to=jiawenwu@trustnetic$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=andrew@lunn$(echo .)ch \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=jacob.e.keller@intel$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=linglingzhang@net-swift$(echo .)com \
--cc=linux@armlinux$(echo .)org.uk \
--cc=mengyuanlou@net-swift$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=richardcochran@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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