From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0C397A0548 for ; Wed, 16 Jun 2021 17:27:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FB8F4067A; Wed, 16 Jun 2021 17:27:02 +0200 (CEST) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by mails.dpdk.org (Postfix) with ESMTP id 12D0240140 for ; Wed, 16 Jun 2021 17:27:00 +0200 (CEST) Received: by mail-pl1-f181.google.com with SMTP id e1so1284274plh.8 for ; Wed, 16 Jun 2021 08:27:00 -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=+p1Jf4ys3nLGjqelXrPClscHift4WZJKFTJ9P8kFQnI=; b=qV06bUMtOrQj9+0HkHHha3YdmcNqw63Og4iB9/1TYyEBidXvZ0K0gect9SCoM+Sy8J QNE8WcujvYLZ8/nG09fZ4VBMLm4Hm3fc0OXUOtVxm99tyQ/ZI80PB+IOqcYjsiiygqyn qtWFA7gJMUP1TTZMNmsld0NPGwuXjDcNCcvm8Z6CCdfyAB+Et0PGTteKv0zVv69+sVRh P/k/bCrJabRzeU7l9TUqLsfO76chaxoCr5PjDBSgBM2mleCH2JrrNIR3D7W53E6zxwSm 9jpsyL1OKwZvITpjmHk+eHjcnhmxAw3Ko1wIjf+Ivhx1FyPGwId6+mTD2/+Pv/a2TkrH v0TA== 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=+p1Jf4ys3nLGjqelXrPClscHift4WZJKFTJ9P8kFQnI=; b=ZNcvjXzHt4oSr1ttWKXM5AeEZTjKncj24TEq/KJPLKrPPIipbzSuZAIFpNmQjStZcL CoV/pP2y/dT96pGMPfeNl1QbJPuWX6c3R/zRebWJkzuP4ry4ScJrD5zCuJm2jPSFupcJ NBWP92ZVqqs197rqWctpbsqTqIIhGado6wbMsVsyqWHsLjG2dsM+pRf2sTxgmBx1o6hU Hx42qrW8yqAdU6P2oeGDJdyXqHEdOMm5BiTF3biajH5X9zOsXcPtirllVHpS+l2HdGZw flZ0et6EPt6Bnyg5xcWN8wP3+tBfnakbZaoh0ELRRg3L6BYyCOtQnbfrNFTXhxmEo0NS t2nQ== X-Gm-Message-State: AOAM532+SEZvC6pRP6J1FFeX9X1fYx1099MoVaB+vbp3A9uG0cqcGgBr pno1TjjMtjJJ8OhI+Qmf0ke81w== X-Google-Smtp-Source: ABdhPJwCIBy2/KnWa1W+gL/OjXnlQr916R0sZFTuzxYAsqovlhy9T3KAYxHs7ONZ6fhC+J92PxnBSw== X-Received: by 2002:a17:902:c9d5:b029:11e:7a87:205 with SMTP id q21-20020a170902c9d5b029011e7a870205mr109099pld.37.1623857220065; Wed, 16 Jun 2021 08:27:00 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id g204sm2541285pfb.107.2021.06.16.08.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jun 2021 08:26:59 -0700 (PDT) Date: Wed, 16 Jun 2021 08:26:53 -0700 From: Stephen Hemminger To: David Marchand Cc: mohamad ali , users Message-ID: <20210616082653.5c47f140@hermes.local> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Changing rte_mbuf X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" On Wed, 16 Jun 2021 08:31:02 +0200 David Marchand wrote: > On Wed, Jun 16, 2021 at 8:09 AM mohamad ali wrote: > > Hi i want to change rte_mbuf struct and add some custom struct to it but > > when i change it and compile again some error related to this line shows up. > > RTE_BUILD_BUG_ON(sizeof(struct rte_mbuf) > OCTEONTX_FPAVF_BUF_OFFSET); > > > > What is the correct way to add struct to rte_mbuf ? > > The correct way is not to add anything to rte_mbuf :-). > > If your application needs some private space per mbuf, you should > instead embed the rte_mbuf struct into a structure of yours. > Create a mempool with a private size accounting for this and make sure > to init this private space per object. > > Also after 20.11 use the dynamic field support