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 1A124A04B5; Thu, 29 Oct 2020 11:44:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F2241C9AC; Thu, 29 Oct 2020 11:44:45 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id B88EEC996 for ; Thu, 29 Oct 2020 11:44:43 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 62D43A03; Thu, 29 Oct 2020 06:44:42 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 29 Oct 2020 06:44:43 -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= fUym8wR0/0rGwusodLP9Gsl/C2m/NLRNcbu8tWR7fy8=; b=gCzProFjcmNpwKXy vzUjLv63OUlcDrIzVjcDtAthCR7vXK9mLgVD4Ir37fgJB3mot/Syqt25qMLn56bg 00ztoAHolB+QDZIetDdZNXoUiALiDNpd2IKF/92KELHFEnhoXEx0AFikQ0X9GE/W VlcF2nkVt6ObFHsZKnjwyWYtBdOy2dld/mS9uVqxncCBilzFi+88t6bcuoA60I5f R13AGDgHVIcPq33BoBX/AdcBQbKuK5DTnXWghmBmT7nVp8TFQVrr+l3xMQYG2SYl 3VEeXP9ups3d29MEpHins3m/laGn6TW+GM9PMXY8qOZBuEVG+dc81J13ByLzHt3d 6Ua4HA== 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=fUym8wR0/0rGwusodLP9Gsl/C2m/NLRNcbu8tWR7f y8=; b=G3cD0tf+7qnt5P90lOMH/JE0UF6ymjuO33NNb0+LJmBpGzFTU+Dm2EU2o +173E4cfarhLVrksGvjtwcE1Jk5NOINB7KnAKCo808Xg90qr8dzVHGr0JG2P75N6 TTeLnOIMm6pWIqkxSc+jKbdtIaLhtOHTVb8RrwXBr7nFCcUKWWfFSedofgYi2Fdt ghF70oQR1pbXw5p2xCklTNlkMRMz/1Irapm1QyERZDRk58NPYZaSCf6KK0Hq1LPm 3EALzJIa9LLtZ9LrQuQ47rSBNehDtsYbOkjqbXh8kjEb+BrS9cRkZi2qEAZ60pX/ eOzkAFeTKivUSj05eGHd86rBYGHZg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrleefgddvtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgepudenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho 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 23F93328005E; Thu, 29 Oct 2020 06:44:40 -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, John McNamara Date: Thu, 29 Oct 2020 11:44:39 +0100 Message-ID: <3951794.ODhEdjmXXD@thomas> In-Reply-To: <4344b79a-7630-c5b0-f622-1d3afbc9d8de@oktetlabs.ru> References: <20201029092751.3837177-1-thomas@monjalon.net> <20201029092751.3837177-14-thomas@monjalon.net> <4344b79a-7630-c5b0-f622-1d3afbc9d8de@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 13/15] examples/rxtx_callbacks: switch timestamp to dynamic 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:21, 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. > > > > Signed-off-by: Thomas Monjalon > > --- > > examples/rxtx_callbacks/main.c | 12 +++++++++++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c > > index b9a98ceddc..4798e0962c 100644 > > --- a/examples/rxtx_callbacks/main.c > > +++ b/examples/rxtx_callbacks/main.c > > @@ -19,6 +19,10 @@ > > #define MBUF_CACHE_SIZE 250 > > #define BURST_SIZE 32 > > > > +static int hwts_dynfield_offset = -1; > > +#define HWTS_FIELD(mbuf) (*RTE_MBUF_DYNFIELD(mbuf, \ > > + hwts_dynfield_offset, rte_mbuf_timestamp_t *)) > > + > > Why is approach here differs? Macro vs inline function. Because it is a self-contained file, and there is already a macro for another field. If you really want a function, I could it for both fields.