From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.esentire.com (mail.iim-support.esentire.com [52.129.34.132]) by dpdk.org (Postfix) with ESMTP id 7A452378E for ; Fri, 1 Sep 2017 22:27:10 +0200 (CEST) Received: from exchange.esentire.com (cas01colo01p.internal [10.1.120.115]) by mail.esentire.com (Postfix) with ESMTPS id AB7021802D2 for ; Fri, 1 Sep 2017 20:27:09 +0000 (UTC) Received: from mbx01cmb01p.esentire.local (10.1.120.118) by mbx01cmb01p.esentire.local (10.1.120.118) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Fri, 1 Sep 2017 16:26:48 -0400 Received: from mbx01cmb01p.esentire.local ([fe80::814b:946e:3026:96c9]) by mbx01cmb01p.esentire.local ([fe80::814b:946e:3026:96c9%14]) with mapi id 15.00.1210.000; Fri, 1 Sep 2017 16:26:48 -0400 From: Ming Fu To: "users@dpdk.org" Thread-Topic: How rte_mempool_ops_table is populated in a DPDK client application? Thread-Index: AdMjJeblGSS7UtUHTnOkVizz9u6FOAAOXa/A Date: Fri, 1 Sep 2017 20:26:48 +0000 Message-ID: <348a7faca1b44f419567717f4be29bf8@mbx01cmb01p.esentire.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.1.120.131] MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] How rte_mempool_ops_table is populated in a DPDK client application? X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Sep 2017 20:27:10 -0000 Did some digging and find that the rte_mempool_ops_table is populated from = function rte_mempool_register_ops(). >>From a small program build in the dpdk example, the rte_mempool_register_op= s() is called from the following stack trace (gdb) where #0 0x000000000047eea0 in rte_mempool_register_ops () #1 0x00000000006a8abd in __libc_csu_init () #2 0x00007ffff71f97bf in __libc_start_main () from /lib/x86_64-linux-gnu/l= ibc.so.6 #3 0x0000000000440f29 in _start () So this function is called probably before rte_eal_init(). If I have an app= lication linked to a static lib of dpdk outside of dpdk build tree, how do = I make it to register the call to rte_mempool_register_ops from __libc_csu_= init()? Thanks Ming From: Ming Fu Sent: September-01-17 9:36 AM To: users@dpdk.org Subject: How rte_mempool_ops_table is populated in a DPDK client applicatio= n? Try to make snort to receive packet from a dpdk ring as an client applicati= on. The DPDK is compiled into the snort DAQ lib statically. The DAQ lib is = then linked to snort statically. What I am find is that the rte_mempool_ops_table is all 0, causing the clie= nt to crash when free the received mbuf from the ring. I was wondering how = this rte_mempool_ops_table is populated during DPDK initialization for a cl= ient application. The my dpdk snort went through rte_eal_init(), rte_ring_lookup() and rte_me= mpool_lookup() without error. Thanks Ming