From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3C173A04B5; Thu, 29 Oct 2020 11:40:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 97C03C974; Thu, 29 Oct 2020 11:40:43 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id 3012FC960 for ; Thu, 29 Oct 2020 11:40:41 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 9EE0898E; Thu, 29 Oct 2020 06:40:37 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 29 Oct 2020 06:40:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= 3VrYCHw21zHvWyYTw9gCweMApaBIuQxA8ufbHHDlSA4=; b=CgTS+XYCpPXirnV+ TbF0b6jbtmyT2sSSONFp9JrK3uhX1gTFbRCZXhGna/iz0Y0w7h7rBxHu88QCnGJF J6rYYDbyzV0nRijmq3S8YlYgkjOvmxediLA89btFMOIUcRS/6U6lB9Zr/9Cjsrap Qa9vhAFMOn2NP00HvRAYQmNdiznFLbE6AS4PlXLQCNuTsKR+ibrx3KqXMZ7kHRWo gjRkEqtaQ+DVQwrAf6L+BmHfczYxD4b0A5QOvP8742cvbkmKSVFc3h9AhF9zYG7y pUgdJFooNnCja54Qp9cSZ5BQj1XCx9NGNewx7jhjwZw+npqVYWEakBWqdVCposvv C+i5AA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=3VrYCHw21zHvWyYTw9gCweMApaBIuQxA8ufbHHDlS A4=; b=KYasbKfClf2/SuotiL/O48WO2IrKYCCV8onVY2tsGB204JUorCO+FoIZ9 gUHyxVvUVOzzPUAj082cGc0vDW7ukQZ4TGjy5HSfqcmIn07p06mo6nNbB5DoWjC5 k0toDliRKuaFn2JQ1MS6E5BrtuRijFXYVmosxahScEJGLgjLnjEBLMZLmO/PKv67 amwzgupPXpdj/LciYhFsDNtuDpMsfcp1EObXUx4JHRM+X92Bxh6gHq/KR/pcSws9 yqp2etP4g4TNcf0bhW20AUqQpT9fab6Y7BxywA494Of91ZonzevsGTMy8hS+H2iB RcLEHcADnWqCXbJxiwG5Kfyjl9ucg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleefgddulecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 213C43280064; Thu, 29 Oct 2020 06:40:34 -0400 (EDT) From: Thomas Monjalon To: Andrew Rybchenko Cc: dev@dpdk.org, ferruh.yigit@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, olivier.matz@6wind.com, jerinj@marvell.com, viacheslavo@nvidia.com, Reshma Pattan Date: Thu, 29 Oct 2020 11:40:33 +0100 Message-ID: <3152348.utbCMcdjS4@thomas> In-Reply-To: <49d733c5-2f8c-d62f-4ab8-23548af0d39c@oktetlabs.ru> References: <20201029092751.3837177-1-thomas@monjalon.net> <20201029092751.3837177-5-thomas@monjalon.net> <49d733c5-2f8c-d62f-4ab8-23548af0d39c@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 04/15] latency: switch timestamp to dynamic mbuf field 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 29/10/2020 11:13, Andrew Rybchenko: > On 10/29/20 12:27 PM, Thomas Monjalon wrote: > > The mbuf timestamp is moved to a dynamic field > > in order to allow removal of the deprecated static field. > > The related mbuf flag is also replaced with the dynamic one. > > > > Signed-off-by: Thomas Monjalon > > [snip] > > > diff --git a/lib/librte_latencystats/rte_latencystats.c b/lib/librte_latencystats/rte_latencystats.c > > index ba2fff3bcb..a21f6239d9 100644 > > --- a/lib/librte_latencystats/rte_latencystats.c > > +++ b/lib/librte_latencystats/rte_latencystats.c > > [snip] > > > @@ -204,6 +216,14 @@ int > > rte_latencystats_init(uint64_t app_samp_intvl, > > rte_latency_stats_flow_type_fn user_cb) > > { > > + static const struct rte_mbuf_dynfield timestamp_dynfield_desc = { > > + .name = RTE_MBUF_DYNFIELD_TIMESTAMP_NAME, > > + .size = sizeof(rte_mbuf_timestamp_t), > > + .align = __alignof__(rte_mbuf_timestamp_t), > > + }; > > + static const struct rte_mbuf_dynflag timestamp_dynflag_desc = { > > + .name = RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME, > > + }; > > I dislike the duplication. If we can't just lookup by name > which is done after ethdev configure (I guess so), may be > ethdev should provide an API to register? That's because it is a separate library. We don't know whether the feature timestamp is already enabled. We have the port_id, so we could do something. But the current behaviour is to use timestamp even if it is disabled at ethdev level. And I don't want to change the behaviour. Maybe the right solution is to register a separate field for this lib. Anyway the time base is not the same.