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 E07A2A04B5; Thu, 29 Oct 2020 11:14:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B6DE5C912; Thu, 29 Oct 2020 11:14:01 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by dpdk.org (Postfix) with ESMTP id 17659C910 for ; Thu, 29 Oct 2020 11:13:59 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id A0CA87F483; Thu, 29 Oct 2020 13:13:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru A0CA87F483 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1603966437; bh=AoC2zQ3/DTNYl/i+We6X3oL3HZGr3cvH+lJJUNG8liU=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=a/TSmah255oMjlLKTGgCy1OetH30ZuAFBbKnw9EeN2vSUsaKUR757zV1GbAjq5c+a 4sNxksz8lR/x1UdmmHIuaki0VcQ9utb7V8ppWUWW6A2Kx3X4CEy+Icysjz1R0d+5Oo NKrmoApGPUMk3dVhBqV/DG6ZVbyO0eYUu5p01ar8= To: Thomas Monjalon , dev@dpdk.org Cc: ferruh.yigit@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, olivier.matz@6wind.com, jerinj@marvell.com, viacheslavo@nvidia.com, Reshma Pattan References: <20201029092751.3837177-1-thomas@monjalon.net> <20201029092751.3837177-5-thomas@monjalon.net> From: Andrew Rybchenko Organization: OKTET Labs Message-ID: <49d733c5-2f8c-d62f-4ab8-23548af0d39c@oktetlabs.ru> Date: Thu, 29 Oct 2020 13:13:57 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201029092751.3837177-5-thomas@monjalon.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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" 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?