Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/132986/?format=api
http://patchwork.dpdk.org/api/patches/132986/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231019154125.308002-3-thomas@monjalon.net/", "project": { "id": 1, "url": "http://patchwork.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": "<20231019154125.308002-3-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20231019154125.308002-3-thomas@monjalon.net", "date": "2023-10-19T15:31:53", "name": "[2/2] drivers: use function to compare PCI addresses", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "df45466a2d5e0eac1c64b6c39c197df6c5700d5a", "submitter": { "id": 685, "url": "http://patchwork.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231019154125.308002-3-thomas@monjalon.net/mbox/", "series": [ { "id": 29920, "url": "http://patchwork.dpdk.org/api/series/29920/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=29920", "date": "2023-10-19T15:31:51", "name": "small cleanup - use PCI lib", "version": 1, "mbox": "http://patchwork.dpdk.org/series/29920/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/132986/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/132986/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id A4093431AD;\n\tThu, 19 Oct 2023 17:41:57 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 089A640A67;\n\tThu, 19 Oct 2023 17:41:51 +0200 (CEST)", "from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com\n [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 320A040A67\n for <dev@dpdk.org>; Thu, 19 Oct 2023 17:41:49 +0200 (CEST)", "from compute6.internal (compute6.nyi.internal [10.202.2.47])\n by mailout.nyi.internal (Postfix) with ESMTP id 95B245C032E;\n Thu, 19 Oct 2023 11:41:48 -0400 (EDT)", "from mailfrontend1 ([10.202.2.162])\n by compute6.internal (MEProxy); Thu, 19 Oct 2023 11:41:48 -0400", "by mail.messagingengine.com (Postfix) with ESMTPA; Thu,\n 19 Oct 2023 11:41:47 -0400 (EDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n cc:cc:content-transfer-encoding:content-type:date:date:from:from\n :in-reply-to:in-reply-to:message-id:mime-version:references\n :reply-to:sender:subject:subject:to:to; s=fm3; t=1697730108; x=\n 1697816508; bh=whMtndLEERiKGnxloPoI/DR7jK4mGSQ6ZhiDyV56Zrw=; b=X\n TWWVoZS+dJwzV0aBX06p0VqCZO3zW9M4jcR4fo7GnOE0NWQaLXhfkf25qE3acLX9\n u2T4LPwxrhl8JI7BpDS5JjAN3Hi2dkeiB9QKFv6W9a3VQ84Cx7BL9u/qJdoIWjKi\n PegGSnyrV3LOsFs6V/BERyQZpNtEngfn++G0SiBYqTxnJ1bDqHTOL8SHm+rNNkq7\n dIqTodttcqrmCzu/wPYA4wxTKfkngp8tnqND+2bN0/JvZsPzEUJbrbdzyNwLt5uf\n EUm/uszD+EndYns4HSfdquA7iAKGJH3UFlIzYC10AN/G0fhu5McuIx0ZONW/Ho9q\n Nipv13aej7VEhuZOy2JjA==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:cc:content-transfer-encoding\n :content-type:date:date:feedback-id:feedback-id:from:from\n :in-reply-to:in-reply-to:message-id:mime-version:references\n :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy\n :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1697730108; x=\n 1697816508; bh=whMtndLEERiKGnxloPoI/DR7jK4mGSQ6ZhiDyV56Zrw=; b=F\n 2Psl/p2t6QQT3Z/HuR1MWdvbvOl2Zhxhan/z58pb3OUYvVxnQepXYGlmNWGLOs9J\n FW5s5VDvjM6MLGyNeWoqLfUJNO3S9elAGBuhRZ+Lu+y7dGb1TNQzol8yToC2ysUC\n 3ChLVBlvLU9MC5GUtzNrVBeBXKomciV/gWQ3swENGb1gOmhF1YBxhsNCFHVixrRr\n S3uBn6M/SnyZWR+/cYGzwL00s+EW01NPLtKtZrwWoJ0w9+/vgv2WgdbyQrcHaHqU\n 5eXIuFDVibIvMuiO2DLYbIQhKl4m00pfHBc3dl9FZ1Cfx6pAEIkzVca/SlWfNDi4\n qIcp4bGirC360l+iw/+3A==" ], "X-ME-Sender": "<xms:PE4xZUfjuCKccYutjGPQp_UmfuO73fYo-uiNrej-s9BhuFPyxKjVEw>\n <xme:PE4xZWOrVEQTAqhPY_KZ9LFwKGHGgV786TpCmCs5AXhNUI2IDoH_SpDr1E3ZsgIEC\n 1dtTnp7I4e80Eu1hQ>", "X-ME-Received": "\n <xmr:PE4xZVhDrPrU-04rv6Vg7WjqFhlwlpqAnJG8cQVvRUcF-5SZdFCV9w1-wZQJCo9uBoFaDhRjJ_-xoFZN82IZ3sHVFf2ia5U>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedvkedrjeeigdeltdcutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg\n ftrfgrthhtvghrnhepvdejhfdugeehvddtieejieegteeuudfgjeeukeeiledthfetveek\n hefhieelhfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh\n homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth", "X-ME-Proxy": "<xmx:PE4xZZ8o3SksKDezQ6ZWmEyPlYxAnN2WggizxflVtEfEydZ7zZUhBw>\n <xmx:PE4xZQvqgBadfQeXBSyl7HHeinSnY-iSXzxhDMOtvSIoI--I1wG_TA>\n <xmx:PE4xZQElNDQ89Lty7CQwdu9vh9cZ8MlRSLDh4qd1Ow0eiOjh1OQPug>\n <xmx:PE4xZUioUYozz6toa2C7ZH3hyQ9VhsBvgxr4UBgb-HL2TF6JG2gkIw>", "Feedback-ID": "i47234305:Fastmail", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "dev@dpdk.org", "Cc": "David Marchand <david.marchand@redhat.com>, chenbox@nvidia.com,\n Long Li <longli@microsoft.com>, Matan Azrad <matan@nvidia.com>,\n Viacheslav Ovsiienko <viacheslavo@nvidia.com>, Ori Kam <orika@nvidia.com>,\n Suanming Mou <suanmingm@nvidia.com>", "Subject": "[PATCH 2/2] drivers: use function to compare PCI addresses", "Date": "Thu, 19 Oct 2023 17:31:53 +0200", "Message-ID": "<20231019154125.308002-3-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.42.0", "In-Reply-To": "<20231019154125.308002-1-thomas@monjalon.net>", "References": "<20231019154125.308002-1-thomas@monjalon.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <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 <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Some places were not using the function rte_pci_addr_cmp()\nto compare 2 PCI addresses.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n drivers/net/mana/mana.c | 6 ++----\n drivers/net/mlx4/mlx4.c | 5 +----\n drivers/net/mlx5/linux/mlx5_os.c | 5 +----\n 3 files changed, 4 insertions(+), 12 deletions(-)", "diff": "diff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c\nindex 41c3cf2595..781ed76139 100644\n--- a/drivers/net/mana/mana.c\n+++ b/drivers/net/mana/mana.c\n@@ -13,6 +13,7 @@\n #include <ethdev_pci.h>\n #include <rte_kvargs.h>\n #include <rte_eal_paging.h>\n+#include <rte_pci.h>\n \n #include <infiniband/verbs.h>\n #include <infiniband/manadv.h>\n@@ -1464,10 +1465,7 @@ mana_pci_probe_mac(struct rte_pci_device *pci_dev,\n \t\t\tcontinue;\n \n \t\t/* Ignore if this IB device is not this PCI device */\n-\t\tif (pci_dev->addr.domain != pci_addr.domain ||\n-\t\t pci_dev->addr.bus != pci_addr.bus ||\n-\t\t pci_dev->addr.devid != pci_addr.devid ||\n-\t\t pci_dev->addr.function != pci_addr.function)\n+\t\tif (rte_pci_addr_cmp(&pci_dev->addr, &pci_addr) != 0)\n \t\t\tcontinue;\n \n \t\tctx = ibv_open_device(ibdev);\ndiff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c\nindex 1389b606cc..a1a7e93288 100644\n--- a/drivers/net/mlx4/mlx4.c\n+++ b/drivers/net/mlx4/mlx4.c\n@@ -817,10 +817,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)\n \t\tDEBUG(\"checking device \\\"%s\\\"\", list[i]->name);\n \t\tif (mlx4_ibv_device_to_pci_addr(list[i], &pci_addr))\n \t\t\tcontinue;\n-\t\tif ((pci_dev->addr.domain != pci_addr.domain) ||\n-\t\t (pci_dev->addr.bus != pci_addr.bus) ||\n-\t\t (pci_dev->addr.devid != pci_addr.devid) ||\n-\t\t (pci_dev->addr.function != pci_addr.function))\n+\t\tif (rte_pci_addr_cmp(&pci_dev->addr, &pci_addr) != 0)\n \t\t\tcontinue;\n \t\tvf = (pci_dev->id.device_id ==\n \t\t PCI_DEVICE_ID_MELLANOX_CONNECTX3VF);\ndiff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex 0706e9e9b2..922490ff97 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -2065,10 +2065,7 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,\n \t\t\tif (mlx5_get_pci_addr(ibv_list[ret]->ibdev_path,\n \t\t\t\t\t &pci_addr))\n \t\t\t\tcontinue;\n-\t\t\tif (owner_pci.domain != pci_addr.domain ||\n-\t\t\t owner_pci.bus != pci_addr.bus ||\n-\t\t\t owner_pci.devid != pci_addr.devid ||\n-\t\t\t owner_pci.function != pci_addr.function)\n+\t\t\tif (rte_pci_addr_cmp(&owner_pci, &pci_addr) != 0)\n \t\t\t\tcontinue;\n \t\t\tDRV_LOG(INFO, \"PCI information matches for device \\\"%s\\\"\",\n \t\t\t\tibv_list[ret]->name);\n", "prefixes": [ "2/2" ] }{ "id": 132986, "url": "