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 58B7DA32A2 for ; Thu, 24 Oct 2019 17:30:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 310941EB53; Thu, 24 Oct 2019 17:30:54 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id AE8F31EB44 for ; Thu, 24 Oct 2019 17:30:52 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id q21so15355490pfn.11 for ; Thu, 24 Oct 2019 08:30:52 -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=hi3L58pHtK8KJGACTwejt84SHr+M8op954Z9V6RhEwU=; b=VGrMPYrN0ZMK1rEnoiMOT29MMdrrNvcWjeLR2ces1YULsU5ieCI0jvQHBtH5+uG4o0 hxc5K4Xu+80Ms7uCosjSsdalHrBZ3Oz1j2MAP3Iq/xFLcMxu+KkB4W1mZ2fGaHwdv4ej CETpH1Njq0aL7NPW1l2jr+uClBZElGsuJFEOY4WCxa6iZuyCZvyMFZWrnMTjrqxVZxgA cHewdge428r4Eoelp7WPUbh6M2pTyHK1x6EFVt8tgdfIcMnXrRmMQA5qa2FyS5odWh9/ aWYv2VRb8QdBHkYuYpuXifcfz4BmS7a9GEwUBMZHZp0qpduh7+FPG9VGhU8CAPOHWTns kR8g== 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=hi3L58pHtK8KJGACTwejt84SHr+M8op954Z9V6RhEwU=; b=OwtzKRSPipnDNNMNrPDFY8FRnp0WHSCpVPA19UkJgQhFCJuXl+5G7cGI5EGBifYh2y aiCecG9obDc1tItt/QX7GVhedEpUA6XnVscVKT4kmjafYjKWnxn2WXrpybPsi84NqKJW v5fGP41JU5Ac5qBSLfgzFOZmLdSe+YOoFQDNbIbE9zsFRA4PnRyYHVMXR27sJm8pSV+e 0Deno4y2Lk0ZKPQqmA3sD49wz4BE4lS/N4PDVGR0il3VntXS20A+HkFS6UxqYYIJc6/j sWa5C8GtXQxotwBHJESkUjyhAJiLX9TWpeUH/i2nWfww6e+TPd/+uczZMGPONY3rvxm9 pwzQ== X-Gm-Message-State: APjAAAWOfzmvN7iDKs7i5X+v18P47CSIVQffzbi++NcJ0Xk8Cf0Bg7TO fOr0zeMmz3rDqvO1Hv7+rf02Bw== X-Google-Smtp-Source: APXvYqywDXasObYH9lTmWRVUvWpnZHq4soceM3qcutIrzEt225B5pW/dcOfej1BA/wg8vaoMZbNWxQ== X-Received: by 2002:aa7:8249:: with SMTP id e9mr18197518pfn.19.1571931051760; Thu, 24 Oct 2019 08:30:51 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id x139sm30571975pgx.92.2019.10.24.08.30.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 08:30:51 -0700 (PDT) Date: Thu, 24 Oct 2019 08:30:42 -0700 From: Stephen Hemminger To: Olivier Matz Cc: dev@dpdk.org, Andrew Rybchenko , Bruce Richardson , "Wang, Haiyue" , Jerin Jacob Kollanukkaran , "Wiles, Keith" , "Ananyev, Konstantin" , Morten =?UTF-8?B?QnLDuHJ1cA==?= , Shahaf Shuler , Thomas Monjalon , Slava Ovsiienko Message-ID: <20191024083042.5cd3dd50@hermes.lan> In-Reply-To: <20191024081337.26411-1-olivier.matz@6wind.com> References: <20190710092907.5565-1-olivier.matz@6wind.com> <20191024081337.26411-1-olivier.matz@6wind.com> 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 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?