From patchwork Tue Jun 18 18:48:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eads, Gage" X-Patchwork-Id: 54929 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5A1331C22E; Tue, 18 Jun 2019 20:47:52 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 06C2F1BE6E; Tue, 18 Jun 2019 20:47:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2019 11:47:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,390,1557212400"; d="scan'208";a="181455503" Received: from txasoft-yocto.an.intel.com ([10.123.72.192]) by fmsmga001.fm.intel.com with ESMTP; 18 Jun 2019 11:47:49 -0700 From: Gage Eads To: dev@dpdk.org Cc: olivier.matz@6wind.com, arybchenko@solarflare.com, stable@dpdk.org Date: Tue, 18 Jun 2019 13:48:30 -0500 Message-Id: <20190618184830.29110-1-gage.eads@intel.com> X-Mailer: git-send-email 2.13.6 Subject: [dpdk-dev] [PATCH] doc: add multi-proc shared lib mempool note 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" The mempool library assigns handler ops indexes based on the dynamic load order of mempool handlers. Indexes are used so a mempool can be used by multiple processes, but this only works if all processes agree on the mapping from index to mempool handler. When using the '-d' argument, it's possible for different processes to load mempool handlers in different orders, and thus have different index->handler mappings. Using a mempool in multiple of such processes will result in undefined behavior. This commit adds a note to the mempool library programmer's guide warning users against this. Fixes: 449c49b93a6b ("mempool: support handler operations") Cc: stable@dpdk.org Signed-off-by: Gage Eads Acked-by: Andrew Rybchenko --- doc/guides/prog_guide/mempool_lib.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/guides/prog_guide/mempool_lib.rst b/doc/guides/prog_guide/mempool_lib.rst index 52a569f57..4470f6b38 100644 --- a/doc/guides/prog_guide/mempool_lib.rst +++ b/doc/guides/prog_guide/mempool_lib.rst @@ -133,6 +133,13 @@ For applications that use ``rte_pktmbuf_create()``, there is a config setting (``RTE_MBUF_DEFAULT_MEMPOOL_OPS``) that allows the application to make use of an alternative mempool handler. + .. note:: + + When running a DPDK application with shared libraries, mempool handler + shared objects specified with the '-d' EAL command-line parameter are + dynamically loaded. When running a multi-process application with shared + libraries, the -d arguments for mempool handlers *must be specified in the + same order for all processes* to ensure correct operation. Use Cases ---------