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 691D7A32A2 for ; Thu, 24 Oct 2019 19:07:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 21C731EBA0; Thu, 24 Oct 2019 19:07:46 +0200 (CEST) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id E20411EB9A for ; Thu, 24 Oct 2019 19:07:43 +0200 (CEST) Received: by mail-pf1-f194.google.com with SMTP id q7so15528138pfh.8 for ; Thu, 24 Oct 2019 10:07:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Nscu6Uy5Ku15biwlOyxG1bqwwe6+LYbWSu/VxSnlauQ=; b=aS0ewwZGPq9VTq0RpiMpKuWvul/jX+IuTKrbqxcJkUqenO3XsTHIRsn2Z0bTQmcrFf rYSGSCXTQEPg1jPKOChWawiW3ETNWVSYwvkEXOfK3bI/tO2EePnuZ7M3k+8ou+xOhf9S qzaS0DBTYK5fAHrmSEQpXGvQpJVauW1Xs6wbjWqxQTknjh95b8RHjxHNTDUGjudSZNJJ VnDvFytEpMDXTct6AKPUc96kMxmwTNwftg3Dfjo2tfXQH2cDJwmlV3kKLYWPspYN56Yo +O6FOIXDkS0K0DkCjkHdBF+mLkCpaeNbQ3jZkMrQ3l/42dEE+AbPfa1Wn25Ms1X3EWtq G5fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Nscu6Uy5Ku15biwlOyxG1bqwwe6+LYbWSu/VxSnlauQ=; b=npiq9gKBbrpXHCm34oXHLBi2NzIC1sRAukDUngN3QadXiPlBX/9v6lqdGS7QWXs109 QadMrsSe/LDP8rLF061lZbxZ1mUQqdIbcfzkihsb6eql77DREFuUUBW+rfRJ5PVmOChz lP4Vo3jWiVlwn8weW9aCINkHJH0+zGkwW15hebGz0YNfUi2wck2h9FNh6+6KOrGPFuks 1BFiGbYwXtg9w60ZIBSP+1pd4A2+Rdwg6lM6DSbEAEsKapt0oO/E1ohM5c+EwpHqeajq 91R4j/VmDWT6hdCBNh6bWhG4Aiv5zcEYPp9v/nSWWloGo4cKLF2iCYdItvqGSik9aaXD +BrA== X-Gm-Message-State: APjAAAVaAJxUHjFhP+pHeeaMySxF3umfQw8iL6KwAcJprDuJY8vI6L/X 3nrzRvAISKT46xYNRQY86LipAg== X-Google-Smtp-Source: APXvYqxGC1/mL4rNz5VnHfRT0Bzt7xswMV0fLTTwWlSOT6yTvY6N8uxUHA8kSCSnNRgeonwh5QBcLA== X-Received: by 2002:a17:90a:eace:: with SMTP id ev14mr8534419pjb.57.1571936863049; Thu, 24 Oct 2019 10:07:43 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id c19sm7046463pfn.44.2019.10.24.10.07.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 10:07:42 -0700 (PDT) Date: Thu, 24 Oct 2019 10:07:34 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: dev@dpdk.org, Olivier Matz , Andrew Rybchenko , Bruce Richardson , "Wang, Haiyue" , Jerin Jacob Kollanukkaran , "Wiles, Keith" , "Ananyev, Konstantin" , Morten =?UTF-8?B?QnLDuHJ1cA==?= , Shahaf Shuler , Slava Ovsiienko Message-ID: <20191024100734.6b49f985@hermes.lan> In-Reply-To: <5384145.2SPEm4a9Id@xps> References: <20190710092907.5565-1-olivier.matz@6wind.com> <20191024081337.26411-1-olivier.matz@6wind.com> <20191024083042.5cd3dd50@hermes.lan> <5384145.2SPEm4a9Id@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" On Thu, 24 Oct 2019 17:44:09 +0200 Thomas Monjalon wrote: > 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]; your right. and gcc will emit simple stores for this.