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 3E88CA2EEB for ; Sat, 14 Sep 2019 17:07:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 096C31E90B; Sat, 14 Sep 2019 17:06:56 +0200 (CEST) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) by dpdk.org (Postfix) with ESMTP id 4E6001F01A for ; Fri, 13 Sep 2019 21:38:29 +0200 (CEST) Received: by mail-qt1-f194.google.com with SMTP id g16so1715739qto.9 for ; Fri, 13 Sep 2019 12:38:29 -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:content-transfer-encoding; bh=NnfwnbfQtyEXcWyS4QvQ91TvNz4GANY2PHlekJlE9tA=; b=oQBHFqZGKzsB0huFIOplDYVXCaNCfzK3A0xlNVbEFL6alS1ATagoE/V5KltKYAHYOU mFGMT05pVZ3E86dFtPmiX85OcDVMNqKH+Pkk6bye2z0xiR71pwCXvtv10IFM5HgC78ea GwTMO0dgKNj5TWzUfIyfYU37dIjbT+uOgVlIyLWAd+oqvTjfOr8kYzVE6MA4l2yqujKE EeEnVeEAAevzIc2BwV/Rt1uMc7BCr9mDiNklmhqXfUpMgcdsZ+00a/aARJQ78EaZIILx Yp7DGgFj6C4gUdQb0Gwe7LzdhK4LDjBus0SlGUbZxsGu4+tQB76nIS1kBgtmF4fn1Ens z++Q== 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:content-transfer-encoding; bh=NnfwnbfQtyEXcWyS4QvQ91TvNz4GANY2PHlekJlE9tA=; b=a/q68PdlbeGfkN8ia1ylcW5o/qLpexjDtjxL4u6+f9FkGRqj+CJPqbR3//RjoOmjWJ yeyRMWpZ2SGP181wa9CQ8d3JeKc/zLxAdWr44/5rVAG/KebClAYD1l2oZZCZMDJhVMMn l+0SWzuuThDQYCrg89RTJSwQ9zv/Vl9j0+8JePEg7qGMzvpjM/XIqMt+Hik8njVHDgVm yedIaFj7bdTYo3qQZdGGJzLYCzO1CjUG0KXf1ZwWiy2hObPD1TSxZz4UTMnjQzKRDa60 VOF6UCO+c9mzkas6W9l7krkn4EpreYG3ChVagDhclN6M/6HtJFRRTL93URE5EzO24uqT p1Xw== X-Gm-Message-State: APjAAAVU1tOr0rcEErHnqoSbctJcR/RdQ2oGDqwhHUMJzxpsb31NN6ax iziJimTTkebNUD53g9I/Kw0pRaX6TOcJ8xG6Hs8= X-Google-Smtp-Source: APXvYqzHV0Puwx1i/2aRBwle3KVa8JjAI9ZIAIPAbHZh3hR6GEQ/1tJired/t6+jRSZc82zhyaf6snd/YjqKKhjZnx4= X-Received: by 2002:ac8:6047:: with SMTP id k7mr5053917qtm.387.1568403508695; Fri, 13 Sep 2019 12:38:28 -0700 (PDT) MIME-Version: 1.0 References: <98CBD80474FA8B44BF855DF32C47DC35B42A99@smartserver.smartshare.dk> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35B42A99@smartserver.smartshare.dk> From: Alexander Pshenichnikov Date: Fri, 13 Sep 2019 22:38:15 +0300 Message-ID: To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: Anatoly Burakov , Olivier Matz , Andrew Rybchenko , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sat, 14 Sep 2019 17:06:52 +0200 Subject: Re: [dpdk-dev] The type string in the malloc library is unused X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Morten, Look rte_memzone_reserve/rte_memzone_lookup On Fri, Sep 13, 2019 at 4:32 PM Morten Br=C3=B8rup wrote: > > Hi Anatoly, > > > > The functions in the DPDK malloc library takes a "type" parameter (a stri= ng, supposedly for debug purposes), but the underlying malloc_heap function= s (which take the same string parameter) don't store or use this string for= anything. > > > > Is the intention to implement this sometime in the future, or should it b= e considered for removal? > > > > I was originally looking for a function for my primary process to allocat= e a block of named memory in the huge-page area, so my secondary process co= uld look it up and use it. And I would simply use a unique type string for = this, and add an rte_malloc_lookup function. However, that obviously doesn'= t work when the type parameter is not used during allocation. > > > > > > The simplest workaround I can come up with is using a named mempool with = a single element, where this element is my memory block. I get an element f= rom this mempool to find the address of my memory block, store the address,= and put the element back in the mempool, so the secondary process can get = the address the same way, i.e. by getting and putting the element back into= the mempool while storing the element's address underway. > > > > Any better ideas? > > > > > > Med venlig hilsen / kind regards > > > > Morten Br=C3=B8rup > > CTO > > > > > > SmartShare Systems A/S > > Tonsbakken 16-18 > > DK-2740 Skovlunde > > Denmark > > > > Office +45 70 20 00 93 > > Direct +45 89 93 50 22 > > Mobile +45 25 40 82 12 > > > > mb@smartsharesystems.com > > www.smartsharesystems.com > > >