From patchwork Thu Sep 29 12:23:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Matz X-Patchwork-Id: 117143 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C073A00C4; Thu, 29 Sep 2022 14:23:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 22ED940694; Thu, 29 Sep 2022 14:23:30 +0200 (CEST) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 2FB0C40395 for ; Thu, 29 Sep 2022 14:23:29 +0200 (CEST) Received: by mail-wr1-f50.google.com with SMTP id c11so1902371wrp.11 for ; Thu, 29 Sep 2022 05:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=ZPkuqYuyuKowjSKiABcTj53LOnXf7gveIAcAR8u3fDg=; b=hlMltOJx2xWOxZYbzkqTx5d3MRMLIEe1fw0uItabdrbDubNu7zZuKYNCXgho5RmaMc ND3k8U4IdWH+xh6VMUEkfLHdEB7Rp5FUdgPhJX9q2f1/2tscJC0zGbmK7Za3D0rq1Aql E4JY1m41gKBxfO5Xq16WFIX03aAK7G12m5IG7VkrZHQgCaQbnZdAwdf+a7ytLxiijp5J /DYWQfqWs0Sh9/Px1XLUtO2GtSVN4FOYmUM8QfLM4+663fDCwNkjFyvWqa6QIJ5JsXuO xD96WvqJjTm6O6Tlsn4xI4qWLI7n2wnX+/Rs0q9imoLwRWf6jkbfpIqb7ZUcK4vgkKWW 6U5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=ZPkuqYuyuKowjSKiABcTj53LOnXf7gveIAcAR8u3fDg=; b=hhNkwrZJKXS0DEXHeMagzx4PNoovoYMT2RJNud+7SK+JhMYyy4dd+VGo8pztRqaCL1 Ct1oBQjDuf56f9isxH/p6fRKQhQdNlX2s/xYLVpbQvjDSuiYU0RAIxnr6rAyT4JwH5fO TVCLaqT01y6GwxBFvkosz5Lt/jS2qoX2typhRktChiyhenDitfIBw/TFirIJDaVQ2F/r KmLXW9Z2+D1eu5iTykdxYwRrB+mf30IkCA+0PBaJNVfOKBDtPgoVvZ/KbmMJjVnqCKBD GbQfDd9DA8uPWADO2GIz/wy0uBbDm7X4adBclZ2XFiQapMOHtNfe8U3wGZyqSLVTS69V jnww== X-Gm-Message-State: ACrzQf1hAM8AjjpJVjOZ+2xmjGyZrrmskLUzYFXd2AtQrmeTCGMESfW7 JJiIs7gY77IH+CIoGY/Ka9QIErXj0r3W+BEJ X-Google-Smtp-Source: AMsMyM6Mp25X5mwnFkEhexIfo3oTrh0mQCne+s6ChZH0WTsDiGgjtXNmvkC1Wi8lCWFU7xaG5/pEFw== X-Received: by 2002:a05:6000:184:b0:22a:cb6f:bb52 with SMTP id p4-20020a056000018400b0022acb6fbb52mr2050851wrx.500.1664454208884; Thu, 29 Sep 2022 05:23:28 -0700 (PDT) Received: from gojira.dev.6wind.com ([185.13.181.2]) by smtp.gmail.com with ESMTPSA id i1-20020a5d4381000000b002205cbc1c74sm6504172wrq.101.2022.09.29.05.23.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 05:23:28 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Cc: Anatoly Burakov , Olivier Matz , Andrew Rybchenko , Honnappa Nagarahalli , Konstantin Ananyev Subject: [PATCH] mem: fix API doc about allocation on secondary processes Date: Thu, 29 Sep 2022 14:23:11 +0200 Message-Id: <20220929122311.1263-1-olivier.matz@6wind.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Since 10 years, memzone allocation is allowed on secondary processes. Now it's time to update the documentation accordingly. At the same time, fix mempool, mbuf and ring documentation which rely on memzones internally. Bugzilla ID: 1074 Fixes: 916e4f4f4e45 ("memory: fix for multi process support") Signed-off-by: Olivier Matz Reviewed-by: Honnappa Nagarahalli --- lib/eal/include/rte_memzone.h | 3 --- lib/mbuf/rte_mbuf.h | 3 --- lib/mempool/rte_mempool.h | 1 - lib/ring/rte_ring.h | 1 - lib/ring/rte_ring_elem.h | 1 - 5 files changed, 9 deletions(-) diff --git a/lib/eal/include/rte_memzone.h b/lib/eal/include/rte_memzone.h index 5db1210831..bb4223a056 100644 --- a/lib/eal/include/rte_memzone.h +++ b/lib/eal/include/rte_memzone.h @@ -118,7 +118,6 @@ struct rte_memzone { * on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone @@ -184,7 +183,6 @@ const struct rte_memzone *rte_memzone_reserve(const char *name, * on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone @@ -256,7 +254,6 @@ const struct rte_memzone *rte_memzone_reserve_aligned(const char *name, * on error. * On error case, rte_errno will be set appropriately: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists * - ENOMEM - no appropriate memory area found in which to create memzone diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h index 9811e8c760..b6e23d98ce 100644 --- a/lib/mbuf/rte_mbuf.h +++ b/lib/mbuf/rte_mbuf.h @@ -664,7 +664,6 @@ void rte_pktmbuf_pool_init(struct rte_mempool *mp, void *opaque_arg); * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists @@ -706,7 +705,6 @@ rte_pktmbuf_pool_create(const char *name, unsigned n, * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists @@ -760,7 +758,6 @@ struct rte_pktmbuf_extmem { * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large, or priv_size is not aligned. * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h index a3c4ee351d..4c4af2a8ed 100644 --- a/lib/mempool/rte_mempool.h +++ b/lib/mempool/rte_mempool.h @@ -1023,7 +1023,6 @@ typedef void (rte_mempool_ctor_t)(struct rte_mempool *, void *); * The pointer to the new allocated mempool, on success. NULL on error * with rte_errno set appropriately. Possible rte_errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - cache size provided is too large or an unknown flag was passed * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists diff --git a/lib/ring/rte_ring.h b/lib/ring/rte_ring.h index 980e92e594..7c48e35d27 100644 --- a/lib/ring/rte_ring.h +++ b/lib/ring/rte_ring.h @@ -180,7 +180,6 @@ int rte_ring_init(struct rte_ring *r, const char *name, unsigned int count, * On success, the pointer to the new allocated ring. NULL on error with * rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - count provided is not a power of 2 * - ENOSPC - the maximum number of memzones has already been allocated * - EEXIST - a memzone with the same name already exists diff --git a/lib/ring/rte_ring_elem.h b/lib/ring/rte_ring_elem.h index fb1edc9aad..7f7d4951d3 100644 --- a/lib/ring/rte_ring_elem.h +++ b/lib/ring/rte_ring_elem.h @@ -96,7 +96,6 @@ ssize_t rte_ring_get_memsize_elem(unsigned int esize, unsigned int count); * On success, the pointer to the new allocated ring. NULL on error with * rte_errno set appropriately. Possible errno values include: * - E_RTE_NO_CONFIG - function could not get pointer to rte_config structure - * - E_RTE_SECONDARY - function was called from a secondary process instance * - EINVAL - esize is not a multiple of 4 or count provided is not a * power of 2. * - ENOSPC - the maximum number of memzones has already been allocated