From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D912AA2EFC for ; Wed, 18 Sep 2019 16:37:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4FFA71D16B; Wed, 18 Sep 2019 16:37:05 +0200 (CEST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by dpdk.org (Postfix) with ESMTP id B5D491C436 for ; Wed, 18 Sep 2019 16:37:03 +0200 (CEST) Received: by mail-lf1-f48.google.com with SMTP id r22so5920930lfm.1 for ; Wed, 18 Sep 2019 07:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cRD/7wORKF7zilGM8g+w0Y1hHIM6qgh/YLu5RGurw6Y=; b=lIpWMAbAfFlaNF1ad8IbqLv3Fe2mlLrG0wXJawNmPGyAkICnHFsorCj4TCS+kjILgq sSs6N3/+nlLquIqNkBd4hvtnqqc2GZbEzkdlY5mBjt/ndFAGhar+3zQTkMaz0PLSzh2X 8mMF977A483nb+Be3POcpp7Hk3uG9zUrl/KFJjw5CuHFzQ94gblwEwnrH5NFFIryEVU5 0ZRgFj5uvD8+IenoBwsGo1Qp6dghkykDrh3I34GtEnN8W7Fs6dkjhRKfr9eZmEuL+I+8 mj6EmKFz/1PtB7kbRMt7zPtDAsQpkji/rqlsRbIS+o4PuhltohkQr72eL18zcuH19lB+ Irtg== 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=cRD/7wORKF7zilGM8g+w0Y1hHIM6qgh/YLu5RGurw6Y=; b=Xkc9ZqbQo6gbgMRhlx13K3X7ODBuIRPWdQip2mtbKnxB0WlVIF8IX0dIL/c06dNUjK xlEeOGdbxlpxqphCQDRdu4ZoHrv+HsHSSXNHXjriyfsvCgyyBt3Actb+MwllvoUZ2JMu 2TA5rUGsc8UzHZ9nJ4xcWO7oIOkq8rPVd3SUxuGavyzom3j7SPc0Dt3C2X10BEdgUXkc 9yGB4F1OL//3ITbSVA0YfI7xIMi9BrcAZoY/k6MbqoAByOy1O9UdOHu2lTXtkqVcDhR7 ou64PpSC1YIUUBpCwFWmd+8v4psXBO0GT4RDyFyfZ5yJU2jTfFGP8N3mpTqZ9AJfyXW+ 8nnw== X-Gm-Message-State: APjAAAXfjw/KqJ5E6nQSEdYbYOK6EQZZYOPqojD9qVQ33Ob4X+0fltjs IPEirLFRirwWR4frT46JGRLMyrsj4XvBnVGlyBE= X-Google-Smtp-Source: APXvYqwfX+wE0RN4LbUHGX2miGRjRZPLhNolpmtLXgANtfPI/rC0toKRfX4mVBDFqfIuwy5s7eM6ywj8Y9t3HFsU5co= X-Received: by 2002:a05:6512:304:: with SMTP id t4mr2389838lfp.15.1568817423119; Wed, 18 Sep 2019 07:37:03 -0700 (PDT) MIME-Version: 1.0 References: <8b2d784f4c1f4615ae0e9855a549c737@boeing.com> <2518123f7de445beb76130ef05921462@boeing.com> In-Reply-To: <2518123f7de445beb76130ef05921462@boeing.com> From: Arvind Narayanan Date: Wed, 18 Sep 2019 09:36:51 -0500 Message-ID: To: "Tran (US), Katherine K" Cc: Suraj R Gupta , "Singh, Satish 1. (Nokia - IN/Bangalore)" , "users@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Help with mbuf and mempool 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: , Errors-To: users-bounces@dpdk.org Sender: "users" Not sure, did you try to initialize the EAL first before creating mempool, etc.? rte_eal_init() Arvind On Wed, Sep 18, 2019 at 9:31 AM Tran (US), Katherine K < katherine.k.tran@boeing.com> wrote: > Hi, > > I have allocated hugepages. I still get the same error. > > I changed the code to the following but I still get the same error: > > ------------- Code --------------- > > struct rte_mempool *mempool = NULL; > #define NB_MBUF 8192 > #define PATH_MAX 4096 > > int > main(int argc, char **argv) > { > > struct rte_mbuf *mbuf = NULL; > char buf[PATH_MAX]; > struct rte_mempool *mp; > int socket; > > socket = SOCKET_ID_ANY; > mp = rte_pktmbuf_pool_create(buf, NB_MBUF, 32, 0, > RTE_MBUF_DEFAULT_BUF_SIZE, socket); > > } > > regards, > Katie > > From: Suraj R Gupta [mailto:surajrgupta@iith.ac.in] > Sent: Tuesday, September 17, 2019 4:33 PM > To: Singh, Satish 1. (Nokia - IN/Bangalore) > Cc: Tran (US), Katherine K ; users@dpdk.org > Subject: Re: [dpdk-users] Help with mbuf and mempool > > Make sure you have allocated hugepages before running the application > > On Wed, Sep 18, 2019 at 9:42 AM Singh, Satish 1. (Nokia - IN/Bangalore) < > satish.1.singh@nokia.com> wrote: > Hi, > > You are using Socket 0, and might be there is no memory in this socket or > no memory left in this socket 0. Try with SOCKET_ID_ANY. > > Regards, > SATISH SINGH > > -----Original Message----- > From: users > On > Behalf Of Tran (US), Katherine K > Sent: Tuesday, September 17, 2019 11:36 PM > To: users@dpdk.org > Subject: [dpdk-users] Help with mbuf and mempool > > Hello, > > I am trying to allocate an mbuf to use for IP fragmentation. When > instantiating a mempool using rte_pktmbuf_pool_create() function, I keep > getting the following error message. > > Error Message: > * MEMPOOL: Cannot allocate tailq entry! > > Will you please let me know what I am missing? > > Regards, > Katie > > > --------------- Code --------------------- > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > > #include > > struct rte_mempool *mempool = NULL; > #define NB_MBUF 8192 > #define AERO_FRAG_SIZE 1024 > #define PATH_MAX 4096 > > //static struct rte_mempool *socket_direct_pool[RTE_MAX_NUMA_NODES]; > > int > main(int argc, char **argv) > { > > struct rte_mbuf *mbuf = NULL; > struct node_queue_conf *qconf; > > char buf[PATH_MAX]; > struct rte_mempool *mp; > struct rte_lpm *lpm; > struct rte_lpm6 *lpm6; > struct rte_lpm_config lpm_config; /*KT Readded*/ > int socket; > unsigned lcore_id; > > unsigned elt_size; > > lcore_id = 1; > socket = rte_lcore_to_socket_id(lcore_id); > > if (rte_lcore_is_enabled(lcore_id) == 0) > printf("RTE LCORE is enabled!"); > > socket = rte_lcore_to_socket_id(lcore_id); > if (socket == SOCKET_ID_ANY) > socket = 0; > > elt_size = sizeof(struct rte_mbuf) + > (unsigned)RTE_MBUF_DEFAULT_BUF_SIZE; > > //mp = rte_mempool_create_empty(buf, NB_MBUF, elt_size, > RTE_MBUF_DEFAULT_BUF_SIZE, sizeof(struct rte_pktmbuf_pool_private), socket, > 0); > > mp = rte_pktmbuf_pool_create(buf, NB_MBUF, 32, 0, > RTE_MBUF_DEFAULT_BUF_SIZE, socket); > > /* > if (socket_direct_pool[socket] == NULL) { > RTE_LOG(INFO, IP_FRAG, "Creating direct mempool on socket > %i\n", > socket); > snprintf(buf, sizeof(buf), "pool_direct_%i", socket); > > mp = rte_pktmbuf_pool_create(buf, NB_MBUF, 32, > 0, AERO_FRAG_SIZE, socket); > > if (mp == NULL) { > RTE_LOG(ERR, IP_FRAG, "Cannot create direct > mempool\n"); > return -1; > } > socket_direct_pool[socket] = mp; > > } > */ > //mbuf = rte_pktmbuf_alloc(mp); > > //fragment(mbuf, qconf); > > > } > > ------------------------------------------ > > > -------------- next part -------------- > An embedded and charset-unspecified text was scrubbed... > Name: fragment.c > URL: < > http://mails.dpdk.org/archives/users/attachments/20190917/3e7f791b/attachment.c > > > > > -- > Thanks and Regards > Suraj R Gupta >