From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 617986CD2 for ; Wed, 19 Oct 2016 15:31:16 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP; 19 Oct 2016 06:31:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,514,1473145200"; d="scan'208";a="21338259" Received: from irsmsx152.ger.corp.intel.com ([163.33.192.66]) by orsmga005.jf.intel.com with ESMTP; 19 Oct 2016 06:31:14 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.196]) by IRSMSX152.ger.corp.intel.com ([169.254.6.13]) with mapi id 14.03.0248.002; Wed, 19 Oct 2016 14:31:13 +0100 From: "Ananyev, Konstantin" To: Olivier Matz , "dev@dpdk.org" CC: Oleg Kuporosov Thread-Topic: [dpdk-dev] [PATCH 1/3] mbuf: embedding timestamp into the packet Thread-Index: AQHSJV8bj/4elBiqLE6jYPhOJqx9R6CuUVSAgAF16fA= Date: Wed, 19 Oct 2016 13:31:12 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772583F0C3319@irsmsx105.ger.corp.intel.com> References: <1476369308-17021-1-git-send-email-olegk@mellanox.com> <1476369308-17021-2-git-send-email-olegk@mellanox.com> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/3] mbuf: embedding timestamp into the packet X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 13:31:16 -0000 Hi lads, >=20 >=20 >=20 > 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. >=20 > This argument is difficult to accept. One can say you are adding > a field for a pretty rare case used by only one NIC :) >=20 > 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. >=20 > 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. >=20 > 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:=20 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 >=20 > 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. >=20 >=20 > Apart from that, I wonder if an ol_flag should be added to tell that > the timestamp field is valid in the mbuf. >=20 > Regards, > Olivier