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 B783FA32A2 for ; Thu, 24 Oct 2019 17:44:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 466AB1EB60; Thu, 24 Oct 2019 17:44:14 +0200 (CEST) Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id A69951EB5E for ; Thu, 24 Oct 2019 17:44:13 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id EDF096DA6; Thu, 24 Oct 2019 11:44:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 24 Oct 2019 11:44:12 -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=mesmtp; bh=+hq19AOXQRAPJjYIbS7YFRcGawEha43CMIG17B19Rqs=; b=O0/2T+GyPdmy 4H7PRVsknnDqSy36XniiA25MVBf/638QrR1Jn2OwQmpxmo16XRUrcO795iVuMJgR nkfCO+Y4WoTjCB7PyQTj3BKr4/jVYN/r6dSHC1esH42LyKKDrpTM7LHI9lh3lTuL aEdWogVF6Sy9m7jI3FW9va2uN/ZlQG4= 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=+hq19AOXQRAPJjYIbS7YFRcGawEha43CMIG17B19R qs=; b=cupP66q4kMoBqcAIQA2OUn/aLIn3Uug7HsyhwPhc0nNkeJcN5GeYECSXU cUyZlzdNJKpf85dHW5onMRcBcKpe/5lLaCAHIuHk0S7Uk01epuIqufAF/lBFWAfG 5NqMLz5kbEntzY1CqYHMvPI7RhzY4tTNsPa7JMNbOYwmHMVPkk6Js3w6gHOqSP7y jHCwFlyCupmFuTtk8vDSxEiSiW6AKM+9cBs4Vk0/dC7JBci1CHu7bjRdtl0nv8Hn /1NPdsPEbalu6YQFE5CHjcivCBlcULosjzaMxM1U/mMqCLBNH6iqcHwD8dPX0DZP sugMQlNd1bS6Rz2c32C5N0GsaeYLA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrledugdelvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd 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 673FFD6005E; Thu, 24 Oct 2019 11:44:10 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org, Olivier Matz , Andrew Rybchenko , Bruce Richardson , "Wang, Haiyue" , Jerin Jacob Kollanukkaran , "Wiles, Keith" , "Ananyev, Konstantin" , Morten =?ISO-8859-1?Q?Br=F8rup?= , Shahaf Shuler , Slava Ovsiienko Date: Thu, 24 Oct 2019 17:44:09 +0200 Message-ID: <5384145.2SPEm4a9Id@xps> In-Reply-To: <20191024083042.5cd3dd50@hermes.lan> References: <20190710092907.5565-1-olivier.matz@6wind.com> <20191024081337.26411-1-olivier.matz@6wind.com> <20191024083042.5cd3dd50@hermes.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] mbuf: support dynamic fields and flags 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" 24/10/2019 17:30, Stephen Hemminger: > On Thu, 24 Oct 2019 10:13:37 +0200 > Olivier Matz wrote: > > > +/** > > + * Copy dynamic fields from msrc to mdst. > > + * > > + * @param mdst > > + * The destination mbuf. > > + * @param msrc > > + * The source mbuf. > > + */ > > +static inline void > > +rte_mbuf_dynfield_copy(struct rte_mbuf *mdst, const struct rte_mbuf *msrc) > > +{ > > + memcpy(&mdst->dynfield1, msrc->dynfield1, sizeof(mdst->dynfield1)); > > +} > > Since size is fixed and both are of same type, why not just assign structures? Because they are not structures? uint64_t dynfield1[2];