Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/51664/?format=api
https://patches.dpdk.org/api/patches/51664/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190325192238.20940-3-yskoh@mellanox.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20190325192238.20940-3-yskoh@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20190325192238.20940-3-yskoh@mellanox.com", "date": "2019-03-25T19:22:34", "name": "[v2,2/6] net/mlx5: fix external memory registration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e4e86aac46114a54a671e9d210bbf6ecd13d923d", "submitter": { "id": 636, "url": "https://patches.dpdk.org/api/people/636/?format=api", "name": "Yongseok Koh", "email": "yskoh@mellanox.com" }, "delegate": { "id": 6624, "url": "https://patches.dpdk.org/api/users/6624/?format=api", "username": "shahafs", "first_name": "Shahaf", "last_name": "Shuler", "email": "shahafs@mellanox.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20190325192238.20940-3-yskoh@mellanox.com/mbox/", "series": [ { "id": 3907, "url": "https://patches.dpdk.org/api/series/3907/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=3907", "date": "2019-03-25T19:22:33", "name": "net/mlx: enable secondary process to register DMA memory", "version": 2, "mbox": "https://patches.dpdk.org/series/3907/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/51664/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/51664/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DF8203195;\n\tMon, 25 Mar 2019 20:22:58 +0100 (CET)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id 108B24C9C\n\tfor <dev@dpdk.org>; Mon, 25 Mar 2019 20:22:51 +0100 (CET)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n\tyskoh@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 25 Mar 2019 21:22:46 +0200", "from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx\n\t[10.101.0.96])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x2PJMfrF027389;\n\tMon, 25 Mar 2019 21:22:45 +0200" ], "From": "Yongseok Koh <yskoh@mellanox.com>", "To": "shahafs@mellanox.com", "Cc": "dev@dpdk.org, stable@dpdk.org", "Date": "Mon, 25 Mar 2019 12:22:34 -0700", "Message-Id": "<20190325192238.20940-3-yskoh@mellanox.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20190325192238.20940-1-yskoh@mellanox.com>", "References": "<20190307074151.18815-1-yskoh@mellanox.com>\n\t<20190325192238.20940-1-yskoh@mellanox.com>", "Subject": "[dpdk-dev] [PATCH v2 2/6] net/mlx5: fix external memory registration", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Secondary process is not allowed to register MR due to a restriction of\nlibrary and kernel driver.\n\nFixes: 7e43a32ee060 (\"net/mlx5: support externally allocated static memory\")\nCc: stable@dpdk.org\n\nSigned-off-by: Yongseok Koh <yskoh@mellanox.com>\nAcked-by: Shahaf Shuler <shahafs@mellanox.com>\n---\n doc/guides/nics/mlx5.rst | 5 +++++\n drivers/net/mlx5/mlx5_mr.c | 10 ++++++++++\n 2 files changed, 15 insertions(+)", "diff": "diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst\nindex 0200373008..cbe3fb4c33 100644\n--- a/doc/guides/nics/mlx5.rst\n+++ b/doc/guides/nics/mlx5.rst\n@@ -86,6 +86,11 @@ Limitations\n \n - Forked secondary process not supported.\n - All mempools must be initialized before rte_eth_dev_start().\n+ - External memory unregistered in EAL memseg list cannot be used for DMA\n+ unless such memory has been registered by ``mlx5_mr_update_ext_mp()`` in\n+ primary process and remapped to the same virtual address in secondary\n+ process. If the external memory is registered by primary process but has\n+ different virtual address in secondary process, unexpected error may happen.\n \n - Flow pattern without any specific vlan will match for vlan packets as well:\n \ndiff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c\nindex 8aaa87dd60..e255650add 100644\n--- a/drivers/net/mlx5/mlx5_mr.c\n+++ b/drivers/net/mlx5/mlx5_mr.c\n@@ -1132,6 +1132,7 @@ mlx5_mr_update_ext_mp_cb(struct rte_mempool *mp, void *opaque,\n \tstruct mlx5_mr_cache entry;\n \tuint32_t lkey;\n \n+\tassert(rte_eal_process_type() == RTE_PROC_PRIMARY);\n \t/* If already registered, it should return. */\n \trte_rwlock_read_lock(&priv->mr.rwlock);\n \tlkey = mr_lookup_dev(dev, &entry, addr);\n@@ -1233,6 +1234,15 @@ mlx5_tx_update_ext_mp(struct mlx5_txq_data *txq, uintptr_t addr,\n \tstruct mlx5_mr_ctrl *mr_ctrl = &txq->mr_ctrl;\n \tstruct mlx5_priv *priv = txq_ctrl->priv;\n \n+\tif (rte_eal_process_type() != RTE_PROC_PRIMARY) {\n+\t\tDRV_LOG(WARNING,\n+\t\t\t\"port %u using address (%p) from unregistered mempool\"\n+\t\t\t\" having externally allocated memory\"\n+\t\t\t\" in secondary process, please create mempool\"\n+\t\t\t\" prior to rte_eth_dev_start()\",\n+\t\t\tPORT_ID(priv), (void *)addr);\n+\t\treturn UINT32_MAX;\n+\t}\n \tmlx5_mr_update_ext_mp(ETH_DEV(priv), mr_ctrl, mp);\n \treturn mlx5_tx_addr2mr_bh(txq, addr);\n }\n", "prefixes": [ "v2", "2/6" ] }{ "id": 51664, "url": "