From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 3A305952 for ; Thu, 16 Feb 2017 18:26:40 +0100 (CET) Received: by mail-wm0-f68.google.com with SMTP id r18so4175072wmd.3 for ; Thu, 16 Feb 2017 09:26:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=szPUihZI+cjHHQmRVbfllOXhPUz40ozu/e1pWWuUNiA=; b=GyOPL36YP4Qb/QAAfirIsWh3Md8ei4Di52mo8AHmRvsdqZQAzvugSWohgnVvoBcb28 k+CPdo4GGyZEmrturxpogAIPbN470A08xdq9csUmtg4RtNOawd0Bpjcw2i/hbE4W2OnR bKVM7ee3PICWp/mtN0Q2AB3is/iJXJWhtXppQomS0gV/K+Nrzl1Rh7WiX2HadytKpYqy 5xJQQprw5GNxl3okXHZMXxqniRxzWYiqMeNTw/4wccsik2dmaqKgTdKB07AJv0Q3alYL V1TerkWwXjDF3ameOodRJGlnq8BZTFOXLzX8KyD8iiNwvj4kDt3IqMsD1fwaNdrYQvvL 7qQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=szPUihZI+cjHHQmRVbfllOXhPUz40ozu/e1pWWuUNiA=; b=LCWmLofZ3hpq3yEYJAXjUPeR7+xnMqZQNNe9yUkjaEA7wa2j8KWjJMJSzR+Xrc6P6M wpCNqSGO9SiSm7wQX+l1GUNgTv0RqfZrimrjJEsqKV1KRD7vnWrPVhJS8yZk7nS2hakN ZFy3ljw8vPHZXpET+Zz5LBXuCbfHHRGjLi7RKnfKEbhW/YGZGXQo64ZACgedILm0pPw5 Fbn2CqlC854ENEpsvxcfq8bifzRpjgf02j6NvKqjjq96hw2BJksLQDXVt4b6+gaLBYW4 3IP2lTGK8EYDLLDd91M7KhKC5gu+zEU4XIN+O9Qko4mVi1kIMBxd0sasWp6iIIevTk5q tf1Q== X-Gm-Message-State: AMke39myFKZDSTiqfFmK3WKLIjyYBVY0ySCwUGE2fszLkcCj5+h9xWU7JP/caIbf3sYroitBBiO5gfFos4wEgQ== X-Received: by 10.28.135.82 with SMTP id j79mr13147874wmd.19.1487265999916; Thu, 16 Feb 2017 09:26:39 -0800 (PST) MIME-Version: 1.0 Sender: jblunck@gmail.com Received: by 10.28.211.20 with HTTP; Thu, 16 Feb 2017 09:26:39 -0800 (PST) In-Reply-To: <20170216144807.7add2c71@platinum> References: <1485271173-13408-1-git-send-email-olivier.matz@6wind.com> <2601191342CEEE43887BDE71AB9772583F111A29@irsmsx105.ger.corp.intel.com> <20170216144807.7add2c71@platinum> From: Jan Blunck Date: Thu, 16 Feb 2017 18:26:39 +0100 X-Google-Sender-Auth: iaApEwLOgJyNz72K1UgHHxM34KU Message-ID: To: Olivier Matz Cc: "Ananyev, Konstantin" , "dev@dpdk.org" Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [RFC 0/8] mbuf: structure reorganization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Feb 2017 17:26:40 -0000 On Thu, Feb 16, 2017 at 2:48 PM, Olivier Matz wrote: > On Mon, 6 Feb 2017 18:41:27 +0000, "Ananyev, Konstantin" > wrote: >> > >> > The main changes are: >> > - reorder structure to increase vector performance on some non-ia >> > platforms. >> > - add a 64bits timestamp field in the 1st cache line >> >> Wonder why it deserves to be in first cache line? >> How it differs from seqn below (pure SW stuff right now). > > In case the timestamp is set from a NIC value, it is set in the Rx > path. So that's why I think it deserve to be located in the 1st cache > line. > > As you said, the seqn is a pure sw stuff right: it is set in a lib, not > in a PMD rx path. > If we talk about setting the timestamp value in the RX path this implicitly means software timestamps. Hardware timestamping usually works by letting the hardware inject sync events for coarse time tracking and additionally injecting fine granular per-packet ticks at a specific offset in the packet. Out of performance reasons I don't think it makes sense to extract this during the burst and write it into the mbuf again. The problem with timestamps is to get the abstraction right wrt the correction factors and the size of the tick vs. the timestamp in the events injected. From my perspective it would be better to extract the handling of timestamp data into a library with PMD specific implementation of the conversions. That way the normalized timestamp values can get extracted if they are present. The mbuf itself would only indicate the presence of timestamp metadata in that case.