DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@nvidia.com>
To: Dmitry Kozlyuk <dkozlyuk@nvidia.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: Michael Baum <michaelba@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>
Subject: RE: [PATCH v3] common/mlx5: fix mempool registration
Date: Sun, 21 Nov 2021 14:39:32 +0000	[thread overview]
Message-ID: <DM4PR12MB53122884FA87E730C54A0C0ACF9E9@DM4PR12MB5312.namprd12.prod.outlook.com> (raw)
In-Reply-To: <20211119143156.3040273-1-dkozlyuk@nvidia.com>

Hi,

> -----Original Message-----
> From: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> Sent: Friday, November 19, 2021 4:32 PM
> To: dev@dpdk.org
> Cc: Raslan Darawsheh <rasland@nvidia.com>; Michael Baum
> <michaelba@nvidia.com>; Matan Azrad <matan@nvidia.com>; Slava
> Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH v3] common/mlx5: fix mempool registration
> 
> Mempool registration was not correctly processing
> mempools with RTE_PKTMBUF_F_PINEND_EXT_BUF flag set
> ("pinned mempools" for short), because it is not known
> at registration time whether the mempool is a pktmbuf one,
> and its elements may not yet be initialized to analyze them.
> Attempts had been made to recognize such pools,
> but there was no robust solution, only the owner of a mempool
> (the application or a device) knows its type.
> This patch extends common/mlx5 registration code
> to accept a hint that the mempool is a pinned one
> and uses this capability from net/mlx5 driver.
> 
> 1. Remove all code assuming pktmbuf pool type
>    or trying to recognize the type of a pool.
> 2. Register pinned mempools used for Rx
>    and their external memory on port start.
>    Populate the MR cache with all their MRs.
> 3. Change Tx slow path logic as follows:
>    3.1. Search the mempool database for a memory region (MR)
>         by the mbuf pool and its buffer address.
>    3.2. If not MR for the address is found for the mempool,
> 	and the mempool contains only pinned external buffers,
> 	perform the mempool registration of the mempool
> 	and its external pinned memory.
>    3.3. Fall back to using page-based MRs in other cases
> 	(for example, a buffer with externally attached memory,
> 	but not from a pinned mempool).
> 
> Fixes: 690b2a88c2f7 ("common/mlx5: add mempool registration facilities")
> Fixes: fec28ca0e3a9 ("net/mlx5: support mempool registration")
> 
> Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
> Reviewed-by: Matan Azrad <matan@nvidia.com>
> Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> ---
> v3: fix build with GCC on RHEL7
> v2: 1) rebase on ToT
>     2) fix MR cache population

Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

      reply	other threads:[~2021-11-21 14:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17 18:49 [PATCH] " Dmitry Kozlyuk
2021-11-18 15:25 ` [PATCH v2] " Dmitry Kozlyuk
2021-11-19 14:31   ` [PATCH v3] " Dmitry Kozlyuk
2021-11-21 14:39     ` Raslan Darawsheh [this message]

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=DM4PR12MB53122884FA87E730C54A0C0ACF9E9@DM4PR12MB5312.namprd12.prod.outlook.com \
    --to=rasland@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=dkozlyuk@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=michaelba@nvidia.com \
    --cc=viacheslavo@nvidia.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).