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 7C59A43916; Sun, 21 Jan 2024 06:33:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A02842D0C; Sun, 21 Jan 2024 06:33:06 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 440BF40270 for ; Sun, 21 Jan 2024 06:32:46 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 22FB62011D; Sun, 21 Jan 2024 06:32:46 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: [RFC] mbuf: performance optimization X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Sun, 21 Jan 2024 06:32:42 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F17D@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC] mbuf: performance optimization Thread-Index: AdpMK0F2QtfCEEjSTu+WIPxQJCdSoQ== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: Cc: X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org What is the largest realistic value of mbuf->priv_size (the size of an = mbuf's application private data area) in any use case? I am wondering if its size could be reduced from 16 to 8 bit. If a max = value of 255 isn't enough, then perhaps by knowing that the private data = area must be aligned by 8 (RTE_MBUF_PRIV_ALIGN), its value can hold the = size divided by 8. That would make the max value nearly 2 KB. I suppose that reducing mbuf->nb_segs from 16 to 8 bit is realistic, = considering that a maximum size IP packet (64 KB) is unlikely to use = more than 64 plus some segments. Does anyone know of any use case with = more than 255 segments in an mbuf? These two changes would allow us to move mbuf->priv_size from the second = to the first cache line. Furthermore, mbuf->timesync should be a dynamic field. This, along with = the above changes, would give us one more available 32-bit dynamic = field. Med venlig hilsen / Kind regards, -Morten Br=F8rup