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 AABEDA034D; Thu, 6 Jan 2022 10:29:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D39A406B4; Thu, 6 Jan 2022 10:29:15 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id D28B940140 for ; Thu, 6 Jan 2022 10:29:13 +0100 (CET) X-MimeOLE: Produced By Microsoft Exchange V6.5 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 headroom question Date: Thu, 6 Jan 2022 10:29:11 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D86DE0@smartserver.smartshare.dk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: mbuf headroom question Thread-Index: AdgC39ylGdqybwsGTBSVuu9LclgGWw== From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Olivier Matz" , 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 Hi Olivier, The data_room_size parameter description for the mbuf pool creation = functions says: "Size of data buffer in each mbuf, including RTE_PKTMBUF_HEADROOM." Furthermore, both rte_mbuf_data_iova_default() and = rte_mbuf_data_addr_default() simply add RTE_PKTMBUF_HEADROOM to the = return value. Based on the above, I would think that it is impossible for m->buf_len = to be smaller than RTE_PKTMBUF_HEADROOM. So why does rte_pktmbuf_reset_headroom() use RTE_MIN(m->buf_len, = RTE_PKTMBUF_HEADROOM), instead of just RTE_PKTMBUF_HEADROOM? What am I = missing here? Med venlig hilsen / Kind regards, -Morten Br=F8rup