Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADF1DC4167B for ; Tue, 5 Dec 2023 09:08:02 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A8C5A42D45; Tue, 5 Dec 2023 10:08:01 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 6A979402D2 for ; Tue, 5 Dec 2023 10:08:00 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 2B6E8206C2 for ; Tue, 5 Dec 2023 10:08:00 +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: mbuf init questions X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Tue, 5 Dec 2023 10:07:56 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F08D@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: mbuf init questions Thread-Index: AdonWok263eAbYe+T4erwvRJMlGNhQ== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: 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 Why is m->nb_segs initialized in rte_pktmbuf_prefree_seg()? It's part of the m->rearm_data, and will be initialized on RX descriptor = rearm anyway. Slightly related: When built without RTE_IOVA_IN_MBUF, m->next lives in the first cache = line. Theoretically, it would improve performance to initialize m->next = together with the RX descriptor rearm, when writing to the first cache = line anyway, instead of in rte_pktmbuf_prefree_seg(), which requires = another write to the first cache line. (In the case where m->next is = non-NULL and m->refcnt is 1.) Med venlig hilsen / Kind regards, -Morten Br=F8rup