DPDK patches and discussions
 help / color / mirror / Atom feed
From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: Olivier Matz <olivier.matz@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Anatoly Burakov <anatoly.burakov@intel.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	nd <nd@arm.com>
Subject: RE: [PATCH] mem: fix API doc about allocation on secondary processes
Date: Fri, 30 Sep 2022 13:19:18 +0000	[thread overview]
Message-ID: <DBAPR08MB58148A605A163EE106F5F22498569@DBAPR08MB5814.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20220929122311.1263-1-olivier.matz@6wind.com>

<snip>

> Subject: [PATCH] mem: fix API doc about allocation on secondary processes
> 
> 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 <olivier.matz@6wind.com>
LGTM
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

> ---
>  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
> --
> 2.30.2


  reply	other threads:[~2022-09-30 13:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 12:23 Olivier Matz
2022-09-30 13:19 ` Honnappa Nagarahalli [this message]
2022-10-04 11:35   ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBAPR08MB58148A605A163EE106F5F22498569@DBAPR08MB5814.eurprd08.prod.outlook.com \
    --to=honnappa.nagarahalli@arm.com \
    --cc=anatoly.burakov@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=nd@arm.com \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).