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 EE94AA2EFC for ; Wed, 18 Sep 2019 07:03:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 264061BF55; Wed, 18 Sep 2019 07:03:04 +0200 (CEST) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by dpdk.org (Postfix) with ESMTP id AC0841BEB4 for ; Wed, 18 Sep 2019 07:03:02 +0200 (CEST) Received: by mail-qk1-f172.google.com with SMTP id z67so6624456qkb.12 for ; Tue, 17 Sep 2019 22:03:02 -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=xDEHNRGmriQrUoEfG16pehx37vAbWqrbMoAbpC2eDLo=; b=mAF51vXjEfdo+RTmJa5Fq7+X9w61MkKg8EbI4fPpOYCql26VlWfCcmCQQlrjeFxSIH 5Bji2y+sr9XOb3fvWPxjJ3j61TJawIrgjfIYeJasW+ek4xxODve2YhbiXMhD7a0Ok89b N3hA0mFofGYpVbjaq7jDbwLL9wdOy4DPNg+YQ= 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=xDEHNRGmriQrUoEfG16pehx37vAbWqrbMoAbpC2eDLo=; b=QaUp+Dh/eVHEwg81+SAyYMro4mwJdlKeH3utpohyAfA1vP2WdxM8hfHDV2ni+Plv3x FsxQsgNnh0kQ3+Q07OM3fMzH9ppX1SI1gUH80Rh2bi5kPKkxYVk/KNbI24OTyIHJthYM jV2ObfTsvDSx/e/qqegUAdsjHL2PExSXzSpKMTjlk4IEkjyfzMlRfyXaG2wpPw0Cpxil /afuL5Jsd+c+N3DlPJT/qgCGcrxRfBmZ7SpkwFglzmDS9zv3eNBp4j1tAgSSMGZddcla 6MNcfHu/9RxGxTJ+bPb5Ov2gfITJvblN4tzvwgfcFmvMgXjNtLAEUPPr1Yy2hYPvayas AqSw== X-Gm-Message-State: APjAAAX1UPZ08gKMAAjFGlpvU3xRaBlVO7mOkxnJkqIV4+EwFB+aGfMO 3xoETMKBr6yJLRx3FAU+8B8RJEQf3cyNk6gkgdNRqQ== X-Google-Smtp-Source: APXvYqycvoVm/nU/9RKaKKCmMbxJtGovPmLanPDOMbPzybFyAxVYhzupHq3To4tswbTvWenMaYCg76WRGNGIY+JFaVw= X-Received: by 2002:a37:9fce:: with SMTP id i197mr2076203qke.175.1568782981896; Tue, 17 Sep 2019 22:03:01 -0700 (PDT) MIME-Version: 1.0 References: <8b2d784f4c1f4615ae0e9855a549c737@boeing.com> In-Reply-To: From: Suraj R Gupta Date: Wed, 18 Sep 2019 05:02:51 +0530 Message-ID: To: "Singh, Satish 1. (Nokia - IN/Bangalore)" Cc: "Tran (US), Katherine K" , "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" 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