Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/52891/?format=api
https://patches.dpdk.org/api/patches/52891/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20190418001529.7528-1-thomas@monjalon.net/", "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": "<20190418001529.7528-1-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20190418001529.7528-1-thomas@monjalon.net", "date": "2019-04-18T00:15:29", "name": "net/mlx5: replace a port lookup with ethdev API", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "5a9145722d62444e958fde5b6eb0f41d1e33f9ab", "submitter": { "id": 685, "url": "https://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "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/20190418001529.7528-1-thomas@monjalon.net/mbox/", "series": [ { "id": 4360, "url": "https://patches.dpdk.org/api/series/4360/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4360", "date": "2019-04-18T00:15:29", "name": "net/mlx5: replace a port lookup with ethdev API", "version": 1, "mbox": "https://patches.dpdk.org/series/4360/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/52891/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/52891/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 B91721B8C9;\n\tThu, 18 Apr 2019 02:15:39 +0200 (CEST)", "from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com\n\t[66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 05C281B8C2\n\tfor <dev@dpdk.org>; Thu, 18 Apr 2019 02:15:39 +0200 (CEST)", "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n\tby mailout.nyi.internal (Postfix) with ESMTP id 6B55922050;\n\tWed, 17 Apr 2019 20:15:37 -0400 (EDT)", "from mailfrontend1 ([10.202.2.162])\n\tby compute1.internal (MEProxy); Wed, 17 Apr 2019 20:15:37 -0400", "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 23E23E40E3;\n\tWed, 17 Apr 2019 20:15:36 -0400 (EDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n\tfrom:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding; s=mesmtp; bh=1NmlPg+dn6DBKLOS5ViGRuz\n\tHdd3medNCxPIlkgFk1+4=; b=NvuziNpBAjobMVGM2iroIOjQfeG/81tOD9lEvx8\n\t/pFj7+qtecuw8Trv0BXKsVsrbnCP2RIlnlA8QPxgDPfPpyd7ysx8R/KldbYhr7Wg\n\t3MTU4lyaW6ZdwrvnOhVDStR1ajZEtdP7JK64jd3V1YLJZz1Brbf/X0kYhkA9zSnl\n\t49Ew=", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-transfer-encoding:date:from\n\t:message-id:mime-version:subject:to:x-me-proxy:x-me-proxy\n\t:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=1NmlPg+dn6DBKLOS5\n\tViGRuzHdd3medNCxPIlkgFk1+4=; b=N4jg7glZCUh+Jb7bQ78KeM95gn3ulRR4x\n\tonTxm12XhGxaAOtYZ0nFaZ3Zovn0ZmTomCHijD2rU34ktHNsFAaWCt+uqxEIubm0\n\tfaCVyfmtw8hRmhCw/o+bjtDXzk1NU4g3k2AMTt8rBZC73Ck/05DbGnNDIVH96k9y\n\tVccy/m7Ayay69Hfw7yOkkxcbpOyBwNJFXeou3ZQCwfCxdLqM1yGj7S4Tj8/I9UM8\n\taoTVfjEVFff6/6EuyiJ9ifcOU74PCCqzqauwmiY2vCCh0gANLrNuS77KtKAp710r\n\tbTNwU5TZsHfsKXv7HeadOyc5kd+gV9QC1v8AM66CWH/Ouu1rE68OA==" ], "X-ME-Sender": "<xms:qMG3XNusD-yXi5QrOTYc4haqTz4ovgukzkt37WNAuu5kPI1ashtqlQ>", "X-ME-Proxy-Cause": "gggruggvucftvghtrhhoucdtuddrgeduuddrfeeggddvlecutefuodetggdotefrodftvf\n\tcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n\tuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n\tfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghsucfo\n\tohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkphepje\n\tejrddufeegrddvtdefrddukeegnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgr\n\tshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd", "X-ME-Proxy": "<xmx:qMG3XCJud8Y2sjp5d4pQ-nIzlfKZz7kjXqnK2paqbbPaQFxRKCqw_g>\n\t<xmx:qMG3XMZVkNXArL32d5FNbnGtgSQ2S_39Nv1zcJeZgPO6TsNf2Skzuw>\n\t<xmx:qMG3XAXIcFHpO1FFw07rfick1sZ8XTsGetwYgCFO99hnMtMU5FOfrw>\n\t<xmx:qcG3XOPzssAp8RsAeYfyjrbyfrqswo2A04BTKvkXsU4JLe0eLELrXQ>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "Shahaf Shuler <shahafs@mellanox.com>, Yongseok Koh <yskoh@mellanox.com>", "Cc": "dev@dpdk.org", "Date": "Thu, 18 Apr 2019 02:15:29 +0200", "Message-Id": "<20190418001529.7528-1-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.21.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH] net/mlx5: replace a port lookup with ethdev API", "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": "Looking for an ethdev port is better (and more efficient)\nwith an ethdev API than an EAL one.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n drivers/net/mlx5/mlx5_mr.c | 12 +++---------\n 1 file changed, 3 insertions(+), 9 deletions(-)", "diff": "diff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c\nindex 44b65916d..8f35cb2d8 100644\n--- a/drivers/net/mlx5/mlx5_mr.c\n+++ b/drivers/net/mlx5/mlx5_mr.c\n@@ -1310,16 +1310,10 @@ mlx5_mr_update_ext_mp_cb(struct rte_mempool *mp, void *opaque,\n static struct rte_eth_dev *\n pci_dev_to_eth_dev(struct rte_pci_device *pdev)\n {\n-\tstruct rte_dev_iterator it;\n-\tstruct rte_device *dev;\n+\tuint16_t port_id;\n \n-\t/**\n-\t * We really need to iterate all devices regardless of\n-\t * their owner.\n-\t */\n-\tRTE_DEV_FOREACH(dev, \"class=eth\", &it)\n-\t\tif (dev == &pdev->device)\n-\t\t\treturn it.class_device;\n+\tRTE_ETH_FOREACH_DEV_OF(port_id, &pdev->device)\n+\t\treturn &rte_eth_devices[port_id];\n \treturn NULL;\n }\n \n", "prefixes": [] }{ "id": 52891, "url": "