DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>
To: Olivier Matz <olivier.matz@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Oleg Kuporosov <olegk@mellanox.com>
Subject: Re: [dpdk-dev] [PATCH 1/3] mbuf: embedding timestamp into the packet
Date: Wed, 19 Oct 2016 13:31:12 +0000	[thread overview]
Message-ID: <2601191342CEEE43887BDE71AB9772583F0C3319@irsmsx105.ger.corp.intel.com> (raw)
In-Reply-To: <efb55b81-339b-6706-12ef-d67bae6e6c5f@6wind.com>


Hi lads,
> 
> 
> 
> On 10/13/2016 04:35 PM, Oleg Kuporosov wrote:
> > The hard requirement of financial services industry is accurate
> > timestamping aligned with the packet itself. This patch is to satisfy
> > this requirement:
> >
> > - include uint64_t timestamp field into rte_mbuf with minimal impact to
> >   throughput/latency. Keep it just simple uint64_t in ns (more than 580
> >   years) would be enough for immediate needs while using full
> >   struct timespec with twice bigger size would have much stronger
> >   performance impact as missed cacheline0.
> >
> > - it is possible as there is 6-bytes gap in 1st cacheline (fast path)
> >   and moving uint16_t vlan_tci_outer field to 2nd cacheline.
> >
> > - such move will only impact for pretty rare usable VLAN RX stripping
> >   mode for outer TCI (it used only for one NIC i40e from the whole set and
> >   allows to keep minimal performance impact for RX/TX timestamps.
> 
> This argument is difficult to accept. One can say you are adding
> a field for a pretty rare case used by only one NIC :)
> 
> Honestly, I'm not able to judge whether timestamp is more important than
> vlan_tci_outer. As room is tight in the first cache line, your patch
> submission is the occasion to raise the question: how to decide what
> should be in the first part of the mbuf? There are also some other
> candidates for moving: m->seqn is only used in librte_reorder and it
> is not set in the RX part of a driver.
> 
> About the timestamp, it would be valuable to have other opinions,
> not only about the placement of the field in the structure, but also
> to check that this API is also usable for other NICs.
> 
> Have you measured the impact of having the timestamp in the second part
> of the mbuf?

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.

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.

Another thing, that I am in doubt why to use system time?
Wouldn't raw HW TSC value (rte_rdtsc()) do here?
Konstantin

> 
> Changing the mbuf structure should happen as rarely as possible, and we
> have to make sure we take the correct decisions. I think we will
> discuss this at dpdk userland 2016.
> 
> 
> Apart from that, I wonder if an ol_flag should be added to tell that
> the timestamp field is valid in the mbuf.
> 
> Regards,
> Olivier

  parent reply	other threads:[~2016-10-19 13:31 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 [this message]
2016-10-20  8:03       ` Oleg Kuporosov
2016-10-20 10:57         ` Jan Blunck
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=2601191342CEEE43887BDE71AB9772583F0C3319@irsmsx105.ger.corp.intel.com \
    --to=konstantin.ananyev@intel.com \
    --cc=dev@dpdk.org \
    --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).