From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 8FF44D47C for ; Fri, 24 Mar 2017 15:04:49 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id t189so3132958wmt.1 for ; Fri, 24 Mar 2017 07:04:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XIVMrKT/evZj5s/N2fJMH4sRV/5avLYTK9V2x/xYqB0=; b=dZf0MNcV5y09IhxyF6bp+uMy9qM0ddclm/9xO2UsMDDK42rfu3NPflLnLYUy3uMAK/ sriPH4t5eFAhnxQEpVBMK+5vJqHS6beJkKpU3QWjolt+RpgO95eZwVYY1Q4qF/eFftTl MOD5P4Tt/B7f799h0EwS0FitLiG2zQtBG6LB3Bvsdt2ZBtNezV1tF0TeG+dWMTzi7m2q xX4PVIgzeZxgtUlm1tj3fssp8ILKtRCBDi5WikCDF8Bs197+7v4CnkJZjs8pq3jsAYi5 5NdQtQ+tgrG+h3+8O3uTZ2F6pmQOpaFrlNawkl/vYEP3vTNbCEpj2abAPNuK3yjTFta0 wQmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XIVMrKT/evZj5s/N2fJMH4sRV/5avLYTK9V2x/xYqB0=; b=SY4PPxGGyS5PBPMcucgWxa44kk2Oz5JTfaDwy4I/014QflBEJDyh/s9ZEB0gw6dmZA ssj/j9qvuAXwiv+2ACc1wlxAlVBxohz47MQEr/6q2Re16eSM2k5NPeoKtsXCJJ/81gNn 1rEYTSCtdTkCOasLzYiHxVErNXqGxY+1FflHGLQrgwbeg9PKwCIpUS/Cb8Lmo3IipBZB f8yF6eQXma9EUy86S8Zf4WtxI+pbcLZAUvJCHGHmiRKFG/OHpHMXP01kS0q+xNsuTw0m aVqKsu7pRlBf0POiixroISc/PTUjIb8Z7WCYyp5Zuiz/RV9yn7qc7elsSxbMuWJvDTNo 4Ylw== X-Gm-Message-State: AFeK/H2IKe/2wtlu6+wP5PH8wQZrbDxumequcdu44f85xCCgR2J+9zN2xxjbGMkFP8PSdEbz X-Received: by 10.28.131.77 with SMTP id f74mr3135233wmd.109.1490364287226; Fri, 24 Mar 2017 07:04:47 -0700 (PDT) Received: from platinum (2a01cb0c03c651000226b0fffeed02fc.ipv6.abo.wanadoo.fr. [2a01:cb0c:3c6:5100:226:b0ff:feed:2fc]) by smtp.gmail.com with ESMTPSA id 43sm3024455wry.45.2017.03.24.07.04.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Mar 2017 07:04:47 -0700 (PDT) Date: Fri, 24 Mar 2017 15:04:44 +0100 From: Olivier Matz To: Gage Eads Cc: dev@dpdk.org Message-ID: <20170324150444.233b3045@platinum> In-Reply-To: <1490278858-27257-1-git-send-email-gage.eads@intel.com> References: <1490202268-3799-1-git-send-email-gage.eads@intel.com> <1490278858-27257-1-git-send-email-gage.eads@intel.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] mempool: remove non-EAL thread note from header 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: , X-List-Received-Date: Fri, 24 Mar 2017 14:04:49 -0000 Hi Gage, On Thu, 23 Mar 2017 09:20:58 -0500, Gage Eads wrote: > Commit 30e6399892276 ("mempool: support non-EAL thread") added the > capability for non-EAL threads to use the mempool library. This commit > removes the note indicating that the mempool library cannot be used safely > by non-EAL threads. > > Also, fix a typo. > > Signed-off-by: Gage Eads > --- > v2: Changed commit message to referenced commit 30e63998 instead of 4b5062755 > v3: Fix checkpatch error > > lib/librte_mempool/rte_mempool.h | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h > index 991feaa..b1186fd 100644 > --- a/lib/librte_mempool/rte_mempool.h > +++ b/lib/librte_mempool/rte_mempool.h > @@ -53,11 +53,7 @@ > * > * Note: the mempool implementation is not preemptable. A lcore must > * not be interrupted by another task that uses the same mempool > - * (because it uses a ring which is not preemptable). Also, mempool > - * functions must not be used outside the DPDK environment: for > - * example, in linuxapp environment, a thread that is not created by > - * the EAL must not use mempools. This is due to the per-lcore cache > - * that won't work as rte_lcore_id() will not return a correct value. > + * (because it uses a ring which is not preemptible). > */ > > #include I agree the comment is not correct today. But I think we should still highlight that usual functions [ex: rte_mempool_get(), rte_mempool_put()] won't work when called on a non-EAL thread. Maybe it could be reworded in that way: """ Note: the mempool implementation is not preemptable. A lcore must not be interrupted by another task that uses the same mempool (because it uses a ring which is not preemptible). Also, usual mempool functions like rte_mempool_get() or rte_mempool_put() are designed to be called from an EAL thread due to the internal per-lcore cache. When using a mempool from a non-EAL thread, a user cache has to be provided to rte_mempool_generic_get() or rte_mempool_generic_put(). """ What do you think? Thanks, Olivier