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 B9F18A0521; Tue, 3 Nov 2020 10:59:26 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA26BC848; Tue, 3 Nov 2020 10:59:24 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 833C2C832 for ; Tue, 3 Nov 2020 10:59:23 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 1CE365C0236; Tue, 3 Nov 2020 04:59:22 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 03 Nov 2020 04:59:22 -0500 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= 8jgxouOFOuyz0Tv0wANM/2sFJ99Yi2gW51ubu8nDgzk=; b=Ld8dZTbOljJrRDfl mvqzNqrT5Yo/hnyFEpgxxjBuamYv3EL8PLjLn/J3sG8Ba5ijw9lumhLryOLleuUi /GcTAZG20A7xJHIVNYn4FwNyDfWgS+Y/EU9N3lcu9+aKIrwfgNJSeBcXZvqLaucM NCHkNt2+0+yh69gIaRQp6SaIK8o9EvPfOwGy/5sqGyoYrx2w4jxEk0SNiZ6uQS8f XNWWErt6rDHJNVkCO8FqM7rMSViAFmSGycdjzkcu8r3p+VeEkNUh2WlJ9lpdYdTA o3axk3YNvKa7k7hOuCZFGZRSVu5v6SEmBzqWj6uFOfBuI4N4iDMCZXjDMa5YPfq7 RobvYg== 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=8jgxouOFOuyz0Tv0wANM/2sFJ99Yi2gW51ubu8nDg zk=; b=ZlALFrSFl2+Df9mTKk/xyJ+ybV6LTFIcQO02TBIxK0ZHl5GZsAxV9McX8 xgs6V3apYjx63yY5UjlTxnseB0qnxdhRBV4IMsbg2NLpQ5oLdlYTg0ZDtU31Kzu8 rqv27x9yuDDMmPIpdzxYgzzNEvAVG315ws4dLI2Xdq0dSie0GuWtqpUsISZLIsjR FY7/H2n1Kw2kcD4FnINkwk7vOCkEVzAjRRH7daHya6fMoAmmqFW3qFftqiWENKG4 yWBO5lczE9fX0f2rOVQhfYXcZfSQgw31jnuVmjkq3+IlElaKVpfinDvYgqGk8aC+ WgMW8st9QnEUcTDeUor0u2tnTPymw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtfedguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght 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 084F53064683; Tue, 3 Nov 2020 04:59:19 -0500 (EST) From: Thomas Monjalon To: Olivier Matz Cc: dev@dpdk.org, ferruh.yigit@intel.com, david.marchand@redhat.com, bruce.richardson@intel.com, andrew.rybchenko@oktetlabs.ru, jerinj@marvell.com, viacheslavo@nvidia.com, Ray Kinsella , Neil Horman Date: Tue, 03 Nov 2020 10:59:18 +0100 Message-ID: <1691753.xb2opVfOED@thomas> In-Reply-To: <20201103093355.GB1898@platinum> References: <20201029092751.3837177-1-thomas@monjalon.net> <20201103001407.2931963-3-thomas@monjalon.net> <20201103093355.GB1898@platinum> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3 02/16] mbuf: add Rx timestamp flag and helpers 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" 03/11/2020 10:33, Olivier Matz: > On Tue, Nov 03, 2020 at 01:13:53AM +0100, Thomas Monjalon wrote: > > +static int > > +rte_mbuf_dyn_timestamp_register(int *field_offset, uint64_t *flag, > > + const char *direction, const char *flag_name) > > +{ > > + static const struct rte_mbuf_dynfield field_desc = { > > + .name = RTE_MBUF_DYNFIELD_TIMESTAMP_NAME, > > + .size = sizeof(rte_mbuf_timestamp_t), > > + .align = __alignof__(rte_mbuf_timestamp_t), > > + }; > > + struct rte_mbuf_dynflag flag_desc; > > + int offset; > > + > > + offset = rte_mbuf_dynfield_register(&field_desc); > > + if (offset < 0) { > > + RTE_LOG(ERR, MBUF, > > + "Failed to register mbuf field for timestamp\n"); > > + return -1; > > + } > > + if (field_offset != NULL) > > + *field_offset = offset; > > + > > + strlcpy(flag_desc.name, flag_name, sizeof flag_desc.name); > > The rest of the flag_desc structure is not initialized to 0 (the "flags" > field). > > I suggest to do it at declaration: > > struct rte_mbuf_dynflag flag_desc = { 0 }; Yes I forgot, thanks for catching.