DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jan Blunck <jblunck@infradead.org>
To: Oleg Kuporosov <olegk@mellanox.com>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	Olivier Matz <olivier.matz@6wind.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/3] mbuf: embedding timestamp into the packet
Date: Thu, 20 Oct 2016 06:57:21 -0400	[thread overview]
Message-ID: <CALe+Z03xSbTaVcgXWRvmz12-J8uQ+_kR917RBnPas7bxGQS=bQ@mail.gmail.com> (raw)
In-Reply-To: <AM4PR0501MB2785719BC5F3F80A197318CACFD50@AM4PR0501MB2785.eurprd05.prod.outlook.com>

On Thu, Oct 20, 2016 at 4:03 AM, Oleg Kuporosov <olegk@mellanox.com> wrote:
> Hello Konstantin,
>
>>
>> My vote also would be to have timestamp in the second cache line.
>> About moving seqn to the 2-nd cache line too - that's probably a fair point.
>
> It may impact throughput till ~6% for applications required such embedded
> Timestamps.
>
>> About the rest of the patch:
>> Do you really need to put that code into the PMDs itself?
>> Can't the same result be achieved by using RX callbacks?
>> Again that approach would work with any PMD and there would be no need
>> to modify PMD code itself.
>
> Correct, the approach with using callbacs (rte_eth_timesync_read_[r|t]x_timestamp())
> Has also some Cons for this use case:
> - FSI needs the most accurate stamping as possible by reasons were described in
> Cover letter

>From my experience this is only true if there is near-zero performance
impact. From my perspective this is only relevant if the used hardware
supports offloading of writing the timestamps. Everything else is a
huge impact if its unconditionally enabled.

The regulatory requirements are already covered by the exchange
protocols which means that timestamps are already present in the
network packet payload (generated by the exchange trading system
and/or the trading application itself). In the end it is the exchange
itself and its members that are regulated. I can see that this might
be interesting for exchange members allowing sponsored naked access
(for non-exchange members) to generate data that they are not
front-running their clients.

I doubt that this non-functional requirement is important enough to
sacrifice the functional requirement of supporting QinQ.

> - callback will be called from user app and so you have to take into account
> Difference between time when packet was released by NIC and callback call

Have you looked at using dedicated preallocated trace buffers that are
filled with timestamps values? This should work fine for getting some
inside into the latency between application readiness and the actual
time the burst happened.

Thanks,
Jan

> - such difference is not easy to estimate correctly due to dependency on CPU type,
> Its frequency and current load conditions
> - even estimated it would be hard without additional performance penalty to align
> Packet with timestamp, taking account that call may actually placed from
> Different thread or even process.
>
> It looks the least impacting and correct way is to have timestamp in rte_mbuf and fill
> It in Rx burst procedure.
>
>> Another thing, that I am in doubt why to use system time?
>> Wouldn't raw HW TSC value (rte_rdtsc()) do here?
>
> System time is being used for periodic clock synchronization between wall
> clock and NIC to estimate NIC clock deviation. It is in assumption the system itself is
> synchronized by PTP from master clock. It is run on context of control thread.
>
> Thanks,
> Oleg.

  reply	other threads:[~2016-10-20 10:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-13 14:35 [dpdk-dev] [PATCH 0/3] Improvements in packet timestamps support Oleg Kuporosov
2016-10-13 14:35 ` [dpdk-dev] [PATCH 1/3] mbuf: embedding timestamp into the packet Oleg Kuporosov
2016-10-18 15:43   ` Olivier Matz
2016-10-19 10:14     ` Pattan, Reshma
2016-10-19 17:40       ` Oleg Kuporosov
2016-10-25 12:39         ` Pattan, Reshma
2016-10-19 13:31     ` Ananyev, Konstantin
2016-10-20  8:03       ` Oleg Kuporosov
2016-10-20 10:57         ` Jan Blunck [this message]
2016-10-19 17:08     ` Oleg Kuporosov
2017-01-24 15:27   ` Olivier MATZ
2016-10-13 14:35 ` [dpdk-dev] [PATCH 2/3] app/testpmd: enabled control for packet timestamps Oleg Kuporosov
2017-04-25 14:02   ` Wu, Jingjing
2017-04-25 16:22     ` Thomas Monjalon
2017-04-28  0:19       ` Wu, Jingjing
2017-04-28  9:12         ` Thomas Monjalon
2017-04-28 10:04           ` Olivier Matz
2016-10-13 14:35 ` [dpdk-dev] [PATCH 3/3] net/mlx5: implementation of Rx packet timestamping support Oleg Kuporosov
2016-10-17 11:24 ` [dpdk-dev] [PATCH 0/3] Improvements in packet timestamps support Nélio Laranjeiro
2017-10-17 13:57   ` Thomas Monjalon

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='CALe+Z03xSbTaVcgXWRvmz12-J8uQ+_kR917RBnPas7bxGQS=bQ@mail.gmail.com' \
    --to=jblunck@infradead.org \
    --cc=dev@dpdk.org \
    --cc=konstantin.ananyev@intel.com \
    --cc=olegk@mellanox.com \
    --cc=olivier.matz@6wind.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).