mbox series

[net-next,0/5] selftests: expand txtimestamp with new features

Message ID 20200317192509.150725-1-jianyang.kernel@gmail.com
Headers show
Series selftests: expand txtimestamp with new features | expand

Message

Jian Yang March 17, 2020, 7:25 p.m. UTC
From: Jian Yang <jianyang@google.com>

Current txtimestamp selftest issues requests with no delay, or fixed 50
usec delay. Nsec granularity is useful to measure fine-grained latency.
A configurable delay is useful to simulate the case with cold
cachelines.

This patchset adds new flags and features to the txtimestamp selftest,
including:
- Printing in nsec (-N)
- Polling interval (-b, -S)
- Using epoll (-E, -e)
- Printing statistics
- Running individual tests in txtimestamp.sh

Jian Yang (5):
  selftests: txtimestamp: allow individual txtimestamp tests.
  selftests: txtimestamp: allow printing latencies in nsec.
  selftests: txtimestamp: add new command-line flags.
  selftests: txtimestamp: add support for epoll().
  selftests: txtimestamp: print statistics for timestamp events.

 .../networking/timestamping/txtimestamp.c     | 179 ++++++++++++++++--
 .../networking/timestamping/txtimestamp.sh    |  31 ++-
 2 files changed, 187 insertions(+), 23 deletions(-)

Comments

Jakub Kicinski March 17, 2020, 8:33 p.m. UTC | #1
On Tue, 17 Mar 2020 12:25:04 -0700 Jian Yang wrote:
> From: Jian Yang <jianyang@google.com>
> 
> Current txtimestamp selftest issues requests with no delay, or fixed 50
> usec delay. Nsec granularity is useful to measure fine-grained latency.
> A configurable delay is useful to simulate the case with cold
> cachelines.
> 
> This patchset adds new flags and features to the txtimestamp selftest,
> including:
> - Printing in nsec (-N)
> - Polling interval (-b, -S)
> - Using epoll (-E, -e)
> - Printing statistics
> - Running individual tests in txtimestamp.sh

Is there any chance we could move/integrate the txtimestamp test into
net/?  It's the only test under networking/

I feel like I already asked about this, but can't find the email now.
Willem de Bruijn March 17, 2020, 8:39 p.m. UTC | #2
On Tue, Mar 17, 2020 at 4:33 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 17 Mar 2020 12:25:04 -0700 Jian Yang wrote:
> > From: Jian Yang <jianyang@google.com>
> >
> > Current txtimestamp selftest issues requests with no delay, or fixed 50
> > usec delay. Nsec granularity is useful to measure fine-grained latency.
> > A configurable delay is useful to simulate the case with cold
> > cachelines.
> >
> > This patchset adds new flags and features to the txtimestamp selftest,
> > including:
> > - Printing in nsec (-N)
> > - Polling interval (-b, -S)
> > - Using epoll (-E, -e)
> > - Printing statistics
> > - Running individual tests in txtimestamp.sh
>
> Is there any chance we could move/integrate the txtimestamp test into
> net/?  It's the only test under networking/
>
> I feel like I already asked about this, but can't find the email now.

We can probably move all targets from networking/timestamping to net.

TEST_GEN_FILES := hwtstamp_config rxtimestamp timestamping txtimestamp
TEST_PROGS := txtimestamp.sh

For a separate follow-up patchset?
Jakub Kicinski March 17, 2020, 9:54 p.m. UTC | #3
On Tue, 17 Mar 2020 16:39:33 -0400 Willem de Bruijn wrote:
> On Tue, Mar 17, 2020 at 4:33 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > Is there any chance we could move/integrate the txtimestamp test into
> > net/?  It's the only test under networking/
> >
> > I feel like I already asked about this, but can't find the email now.  
> 
> We can probably move all targets from networking/timestamping to net.
> 
> TEST_GEN_FILES := hwtstamp_config rxtimestamp timestamping txtimestamp
> TEST_PROGS := txtimestamp.sh
> 
> For a separate follow-up patchset?

Yup, thanks!
David Miller March 22, 2020, 3:13 a.m. UTC | #4
From: Jian Yang <jianyang.kernel@gmail.com>
Date: Tue, 17 Mar 2020 12:25:04 -0700

> From: Jian Yang <jianyang@google.com>
> 
> Current txtimestamp selftest issues requests with no delay, or fixed 50
> usec delay. Nsec granularity is useful to measure fine-grained latency.
> A configurable delay is useful to simulate the case with cold
> cachelines.
> 
> This patchset adds new flags and features to the txtimestamp selftest,
> including:
> - Printing in nsec (-N)
> - Polling interval (-b, -S)
> - Using epoll (-E, -e)
> - Printing statistics
> - Running individual tests in txtimestamp.sh

I'll apply this, thank you.
David Miller March 22, 2020, 3:13 a.m. UTC | #5
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: Tue, 17 Mar 2020 16:39:33 -0400

> On Tue, Mar 17, 2020 at 4:33 PM Jakub Kicinski <kuba@kernel.org> wrote:
>> Is there any chance we could move/integrate the txtimestamp test into
>> net/?  It's the only test under networking/
 ...
> For a separate follow-up patchset?

Yes.