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 AE1CEA0C48 for ; Wed, 16 Jun 2021 08:31:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 364144067A; Wed, 16 Jun 2021 08:31:18 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 6EE7140140 for ; Wed, 16 Jun 2021 08:31:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623825075; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=hrOAlS9tvs5gW0KLRBeBCmm+Fj/98wq2Bt3d2iEpsKI=; b=HkBVUge3SofGwBCCKcYE9wTV4gIOfxohO5RpJyeGP5LMHWv3/TrT8SWQsviHA8OPJyWG0s HbHnqLW5sL/usqoxmulni7BPIP54YGclIy6jrE8tNaAzygQ4DEQ4tofNJDfZPycvjAq5YW B5QAqih17WsMKHpk+4aN+45kZ9lL90Q= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-407-wBSj66QHOimxQ-cvIYutbg-1; Wed, 16 Jun 2021 02:31:14 -0400 X-MC-Unique: wBSj66QHOimxQ-cvIYutbg-1 Received: by mail-ua1-f69.google.com with SMTP id x22-20020ab036f60000b029024b73553e33so603928uau.19 for ; Tue, 15 Jun 2021 23:31:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hrOAlS9tvs5gW0KLRBeBCmm+Fj/98wq2Bt3d2iEpsKI=; b=XOOsR8x2k9427AR+TXe2AV2d0UvmjCOHhjH7kHV2neS5h44msH9s7e721EacQ22dT2 90lp13kg57mUgQ80bCzHEvgOzIS66zSSaaZLR1cLycneZfBZ047Lu3CuZVjQGaYIuTOx +c76yfg4ib9NLWUszKuc2mFCpdvQ93zVC6VR24qrnmTd6Y1LAQKDrmvOYQjzUUbRH5AK 56QUoL3vBbH6mLpFf2vwPX0HCIMFXTz7r76YqDXSR98354F8TA7lGdfLXpbJ83WyJKZZ chd/e9O3aiJn95O3/vcmXqZrFH3ZAkj2XR5u/Fe7r/iZbaMpDC54SUYRwJFANsJ1hmT1 otgA== X-Gm-Message-State: AOAM532nHB03dG7tX3ieU0XawcK6xKs6rs1vdddktrhxYO0fFFOqhs8R GCtcpX20f9Rt265kcWS3cebMBpl6a/oIbiV5n0vK02fmiLtvjKCJ0+Ek5lucsvfs93JkRRbOlm+ qPRqAI3y9NooT6NvzoLBF8Q== X-Received: by 2002:ab0:211a:: with SMTP id d26mr3151995ual.41.1623825073715; Tue, 15 Jun 2021 23:31:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfS5uLutu6UQqYlhBfTUMlbhwv373H81neqTz9G1gugRrvVQPv2PKk4Hee7ll39E7tL3Z+6ZnYwvq5tN/RY0Y= X-Received: by 2002:ab0:211a:: with SMTP id d26mr3151972ual.41.1623825073517; Tue, 15 Jun 2021 23:31:13 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Marchand Date: Wed, 16 Jun 2021 08:31:02 +0200 Message-ID: To: mohamad ali Cc: users Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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, 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. -- David Marchand