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 61A9EA2EFC for ; Wed, 18 Sep 2019 16:55:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 44E171D404; Wed, 18 Sep 2019 16:55:14 +0200 (CEST) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by dpdk.org (Postfix) with ESMTP id 9AD3C1D404 for ; Wed, 18 Sep 2019 16:55:12 +0200 (CEST) Received: by mail-qk1-f194.google.com with SMTP id h126so8300516qke.10 for ; Wed, 18 Sep 2019 07:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iith.ac.in; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uloJgItm53X4JHVKh7r6Js2D+e9iGZW+cgmADsW9Je4=; b=3Gm3M2B7djr2H/jvistPZ6UXSHnvobxncnjj4cmpIB0X8vPYZKQY39s6UKOmsk1mFa igoYfcpQ3NEKq5mNJfyjZJkFRcG0n7ZDxHD6jFN6+a9tHZIWgpbu0181mG6UqXvyHXVO njshAlz7yKGXgwrHY3SWH/86DSosqSqDHI7gg= 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=uloJgItm53X4JHVKh7r6Js2D+e9iGZW+cgmADsW9Je4=; b=hVmpKpnQD15hH4NGPyTudeerFhRB7vaHuhiTa+546QPL25k7TZKcK1j+HDSrFhhiLa 1S4+RE9sGOwB6oHJNxwnWqUywzRPgoaV+SYfgyMimzYGFRIHCsgnZK8j5AQxD+44+fKT c3pKlMK+oZu1PUzA6xmgmc3lg/BwEcNOcIV2vvEtex+Dr2zv5fLfAK4+Y+dw3G0mRYh1 rhFVYORxpGR3cLVgIrBzzDv/j1UOYDuFn9aN4fquE0bHGyb4oyW0PqBvjOngAfwVpA0S wdq+lEmK2cLW35T7wCdye7iKWFl5NZSbiOOKIUV0cFGyikXEpKyFeGszl0+kjbVz8t19 fFsQ== X-Gm-Message-State: APjAAAWpzs1l2vRi+B4+21OAISzgD8qIGTiMXP4Qh2vK7insV42/ZkSf NNS+WL2WtSnwQzL90ibCCYdCimKc6Su1DT30D9iweu+1xxM= X-Google-Smtp-Source: APXvYqz8smKuQTofSZZuHUWaJlA1fLmeEZeh6ElNIqGiRuZyhW4JM5klGJu1i098lVhF414ntCc8oclYWn5QF0pjDKM= X-Received: by 2002:a37:a544:: with SMTP id o65mr4285367qke.422.1568818511830; Wed, 18 Sep 2019 07:55:11 -0700 (PDT) MIME-Version: 1.0 References: <8b2d784f4c1f4615ae0e9855a549c737@boeing.com> <2518123f7de445beb76130ef05921462@boeing.com> In-Reply-To: From: Suraj R Gupta Date: Wed, 18 Sep 2019 20:25:00 +0530 Message-ID: To: Arvind Narayanan Cc: "Tran (US), Katherine K" , "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" Also char buf[PATH_MAX] is not initialised or assigned any value. Assign a name to it. The PATH_MAX need not be 4096, use a lesser value say 100. On Wed, Sep 18, 2019 at 8:07 PM Arvind Narayanan wrote: > 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 >> > -- Thanks and Regards Suraj R Gupta