All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Shahaf Shuler <shahafs@mellanox.com>
Cc: dev <dev@dpdk.org>
Subject: [RFC] net/mlx: enable DMA memory registration from secondary process
Date: Fri, 1 Mar 2019 01:39:59 +0000	[thread overview]
Message-ID: <9D1D0CCF-40D0-45FF-827A-0FC7F19A6446@mellanox.com> (raw)

For both mlx4 and mlx5, the Memory Region (MR) for DMA memory can't be created
from secondary process due to lib/driver limitation. It is prohibited in the
code for now, thus all the memory being used by secondary process should be
registered on initialization.

mlx5_mr_create(...)
{
[...]
	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
		DRV_LOG(WARNING,
			"port %u using address (%p) of unregistered mempool"
			" in secondary process, please create mempool"
			" before rte_eth_dev_start()",
			dev->data->port_id, (void *)addr);
		rte_errno = EPERM;
		goto err_nolock;
	}
[...]
}

In 19.05, this restriction will be removed and secondary process will be able to
send a request of creating a MR to primary process via rte_mp_*() APIs. Once a
MR is created by primary process, it will be immediately visible to the
secondary through the shared private data, struct mlx[4|5]_priv.

No changes would be needed outside of mlx4/5 PMD.


Signed-off-by: Yongseok Koh <yskoh@mellanox.com>        

                 reply	other threads:[~2019-03-01  1:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=9D1D0CCF-40D0-45FF-827A-0FC7F19A6446@mellanox.com \
    --to=yskoh@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=shahafs@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.