get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/96162/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 96162,
    "url": "http://patchwork.dpdk.org/api/patches/96162/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210721143743.24626-7-xuemingl@nvidia.com/",
    "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": "<20210721143743.24626-7-xuemingl@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210721143743.24626-7-xuemingl@nvidia.com",
    "date": "2021-07-21T14:37:33",
    "name": "[v4,06/16] net/mlx5: remove PCI dependency",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "9b69eb5172b1cc35119bb10ab0975dc23140e34c",
    "submitter": {
        "id": 1904,
        "url": "http://patchwork.dpdk.org/api/people/1904/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@nvidia.com"
    },
    "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/20210721143743.24626-7-xuemingl@nvidia.com/mbox/",
    "series": [
        {
            "id": 17938,
            "url": "http://patchwork.dpdk.org/api/series/17938/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=17938",
            "date": "2021-07-21T14:37:27",
            "name": "net/mlx5: support Sub-Function",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/17938/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96162/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/96162/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 BD9E4A0C51;\n\tWed, 21 Jul 2021 16:39:11 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 58127410FC;\n\tWed, 21 Jul 2021 16:39:05 +0200 (CEST)",
            "from NAM11-DM6-obe.outbound.protection.outlook.com\n (mail-dm6nam11on2042.outbound.protection.outlook.com [40.107.223.42])\n by mails.dpdk.org (Postfix) with ESMTP id 40A5E410DB\n for <dev@dpdk.org>; Wed, 21 Jul 2021 16:39:04 +0200 (CEST)",
            "from BN9P220CA0030.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::35)\n by DM6PR12MB3466.namprd12.prod.outlook.com (2603:10b6:5:3b::33) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.24; Wed, 21 Jul\n 2021 14:39:02 +0000",
            "from BN8NAM11FT046.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:13e:cafe::f5) by BN9P220CA0030.outlook.office365.com\n (2603:10b6:408:13e::35) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.24 via Frontend\n Transport; Wed, 21 Jul 2021 14:39:02 +0000",
            "from mail.nvidia.com (216.228.112.34) by\n BN8NAM11FT046.mail.protection.outlook.com (10.13.177.127) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.4352.24 via Frontend Transport; Wed, 21 Jul 2021 14:39:02 +0000",
            "from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com\n (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Jul\n 2021 14:39:00 +0000"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=Vj2QqdFygZe9tSKvTK8jZHk1PquKoLXZ6/a99SWhdKY7WK6hpQgr2dRqsrS+ksF21z1v6nmfwz2MI8rUAn7UPMa5i1yR5tI3u9voSx+Jo1CutMqjukevGP+ZsQfNoE8YULeOdGltbaAtJzEv5XhihrVcAR/o2uZefpvLdJshvAwVIvAbHMxM/ihHL4MBAFeUqlpeGxsjZ6AK/TjZ8UDjiRpclMgi9DD+gqPFzDZLe+MPuccc6ZGjR9r67VYerQpW7k5Ch0HJEx734FTDx2kH/hE/vQAJwkqYRHuRSniJRKx2+S7f24ooZ0pvXm2VdYYP0rHqHjkBy8DSkCsCHbWmkw==",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=tToz3V+4BB+3auy2OXLRYoJMso4ACVOStFBAiq3lx+s=;\n b=j2R8YGUSNdZXWA2JwxEqXG/Lrmxovz1DFrNPZSFDwqrmOcoF1wISV0yPZB7zFn8Z7QUTMEZWIE/40vvIfxrZ9XS01UiYOivJHNnnplvlXHM3hL7TCrKysG23Dcqb5v27nrqqixjrS1BIU/xy0xWlp0LSFqL7g+1bVGvkHCKzNQw4K9vnMK3fPUoXGgXx4+k4T4DbljC8eAK4gzo9/AwU4LJ7rEhB4qr7VZfV53yzOiuUAoZKAOrA7kq0CxjoJO0NVeEsoinPPyD6id1r33tcPuDUl/y8vGc7OHNzWgBKIaJLniWr8UJFw8fd6EnALPD7qxZ+Z/ziB9UAtMF6ybu7Xg==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=quarantine sp=none pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=tToz3V+4BB+3auy2OXLRYoJMso4ACVOStFBAiq3lx+s=;\n b=PfdxP27NivehowruQPTvwsqemmUbBm72+9Bp6XzUv4CP+5JsjzAUTwbN3+/lR8JG5o6QW/stQovYGEcGrAqDX7ci99e+KRKN8dl4Tqt5sYQE+kEcwETEVoImuZWccCH0ChPK1xeuBF/FPQm48qnx+OKuMDp9MIr3TWuIie92/D1GGYZDwdoLLZ8O3OAtxQrKNTXBmaRIKyMJh5jHxVefWCftWm5vUZEpDiZIDgu4cj6hGQlvnIT3aO37IrA9dk8mVGDnOQvjTkVh9b+ivuKW9Q/E30O8oxP0mTjvwXosOmWCK+kuOp0kfL/doonxCgS3cR14tI4Jb3p/y/Qq7rj7zg==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.112.34)\n smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed)\n header.d=none;dpdk.org; dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.112.34 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.112.34; helo=mail.nvidia.com;",
        "From": "Xueming Li <xuemingl@nvidia.com>",
        "To": "Viacheslav Ovsiienko <viacheslavo@nvidia.com>",
        "CC": "<dev@dpdk.org>, <xuemingl@nvidia.com>, Matan Azrad <matan@nvidia.com>,\n Shahaf Shuler <shahafs@nvidia.com>",
        "Date": "Wed, 21 Jul 2021 22:37:33 +0800",
        "Message-ID": "<20210721143743.24626-7-xuemingl@nvidia.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210721143743.24626-1-xuemingl@nvidia.com>",
        "References": "<20210616040935.311733-1-xuemingl@nvidia.com>\n <20210721143743.24626-1-xuemingl@nvidia.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[172.20.187.5]",
        "X-ClientProxiedBy": "HQMAIL105.nvidia.com (172.20.187.12) To\n HQMAIL107.nvidia.com (172.20.187.13)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "3f65e8e1-5ab5-44f2-ceb2-08d94c5548e2",
        "X-MS-TrafficTypeDiagnostic": "DM6PR12MB3466:",
        "X-Microsoft-Antispam-PRVS": "\n <DM6PR12MB34662802AA6EAE87AA496E6EA1E39@DM6PR12MB3466.namprd12.prod.outlook.com>",
        "X-MS-Oob-TLC-OOBClassifiers": "OLM:48;",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n GrSnqHXdGRjH8cxD1uqdT8dRohkyHK2YJ7w2aadvDIsqJtTSCEii4RmEIOUCtV22Y4Vg4GVitWucatnMBSNsJvkjAUauRCK6dq538Uzti8jMXZMIln/yHCXVxsPEoNS0ul5RR+aLHbswTl0+6HKq4yFOv6GnW4T+6PGDG0+8KnmhCYKLGRyWqGj87WOkGISK8cCRzPnwK5yJcgFo2wNUAY2peRh/lMOwTkOutQh9BehYLc6A3K7L7GDYIoV/M53CblTGWFiDB1Ea2CJkmIIhPo09xUHYDTvKBgExfQkhKdp+hZoNyb9D0n86NAL3kOs9E4dXleEQm1/2GjujgN7X11Q4eu/WgMjSQNzkLYiKI2TIah0UeOwxcfig+CetrcJxTmv59JtrLQE5kruNwXYwV/PNAT4Y5xsbNo4Dlgoj6nt8tolB3J2iJusMYW/rDYdFbpe23HuwArW0hZRx4z7d4tQ7Aa+GkZGjLp5tpqPbVjLmi6inhQnKmkve9JiS9NBrJ0D1VMW1tRDAU02a6IyF52Kf/ltW+XpPSB1q3NrENJDbb9G6U/n0oW+d2QWXnBld9tnRlK60sRE/RJExwhAMcBrE4hC18L/j6lw1tv/CZZzG8oLJxTIDiXQGBiZGZCfbVDMf2cSLjPbwF8TYXuhXDGeax3zvMnrpswyGLHpGLGnnFwmc+M6RFdHhIXFf3ge8vR1cpDcqg0DHtipqQIMt6w==",
        "X-Forefront-Antispam-Report": "CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE;\n SFS:(4636009)(396003)(136003)(39860400002)(376002)(346002)(36840700001)(46966006)(1076003)(86362001)(55016002)(54906003)(36906005)(36756003)(356005)(47076005)(83380400001)(7636003)(5660300002)(30864003)(26005)(82740400003)(16526019)(2906002)(316002)(336012)(7696005)(8676002)(186003)(6286002)(2616005)(426003)(70586007)(6666004)(107886003)(8936002)(36860700001)(6636002)(82310400003)(37006003)(6862004)(70206006)(478600001)(4326008);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "21 Jul 2021 14:39:02.6161 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 3f65e8e1-5ab5-44f2-ceb2-08d94c5548e2",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT046.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DM6PR12MB3466",
        "Subject": "[dpdk-dev] [PATCH v4 06/16] net/mlx5: remove PCI dependency",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "To support more bus types, remove PCI dependency where possible.\n\nSigned-off-by: Xueming Li <xuemingl@nvidia.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n drivers/net/mlx5/linux/mlx5_ethdev_os.c |  2 +-\n drivers/net/mlx5/linux/mlx5_os.c        |  4 +--\n drivers/net/mlx5/mlx5.c                 | 45 ++++++++++++++-----------\n drivers/net/mlx5/mlx5.h                 |  9 ++---\n drivers/net/mlx5/mlx5_ethdev.c          |  2 +-\n drivers/net/mlx5/mlx5_mr.c              | 14 ++++----\n drivers/net/mlx5/mlx5_trigger.c         | 12 +++----\n drivers/net/mlx5/mlx5_txq.c             |  3 +-\n drivers/net/mlx5/windows/mlx5_os.c      |  3 +-\n 9 files changed, 51 insertions(+), 43 deletions(-)",
    "diff": "diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c\nindex ddc1371aa9..b05b9fc950 100644\n--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c\n@@ -346,7 +346,7 @@ mlx5_find_master_dev(struct rte_eth_dev *dev)\n \tpriv = dev->data->dev_private;\n \tdomain_id = priv->domain_id;\n \tMLX5_ASSERT(priv->representor);\n-\tMLX5_ETH_FOREACH_DEV(port_id, priv->pci_dev) {\n+\tMLX5_ETH_FOREACH_DEV(port_id, dev->device) {\n \t\tstruct mlx5_priv *opriv =\n \t\t\trte_eth_devices[port_id].data->dev_private;\n \t\tif (opriv &&\ndiff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex 05b1761f6b..4ab30fd244 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -1252,7 +1252,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \t * Look for sibling devices in order to reuse their switch domain\n \t * if any, otherwise allocate one.\n \t */\n-\tMLX5_ETH_FOREACH_DEV(port_id, priv->pci_dev) {\n+\tMLX5_ETH_FOREACH_DEV(port_id, NULL) {\n \t\tconst struct mlx5_priv *opriv =\n \t\t\trte_eth_devices[port_id].data->dev_private;\n \n@@ -2511,6 +2511,7 @@ mlx5_os_pci_probe_pf(struct rte_pci_device *pci_dev,\n \t\tdev_config.decap_en = 1;\n \t\tdev_config.log_hp_size = MLX5_ARG_UNSET;\n \t\tdev_config.allow_duplicate_pattern = 1;\n+\t\tlist[i].numa_node = pci_dev->device.numa_node;\n \t\tlist[i].eth_dev = mlx5_dev_spawn(&pci_dev->device,\n \t\t\t\t\t\t &list[i],\n \t\t\t\t\t\t &dev_config,\n@@ -2708,7 +2709,6 @@ mlx5_os_open_device(const struct mlx5_dev_spawn_data *spawn,\n \tint dbmap_env;\n \tint err = 0;\n \n-\tsh->numa_node = spawn->pci_dev->device.numa_node;\n \tpthread_mutex_init(&sh->txpp.mutex, NULL);\n \t/*\n \t * Configure environment variable \"MLX5_BF_SHUT_UP\"\ndiff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c\nindex d9c90d5ef9..8e64bf955b 100644\n--- a/drivers/net/mlx5/mlx5.c\n+++ b/drivers/net/mlx5/mlx5.c\n@@ -1120,6 +1120,7 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn,\n \t\trte_errno  = ENOMEM;\n \t\tgoto exit;\n \t}\n+\tsh->numa_node = spawn->numa_node;\n \tif (spawn->bond_info)\n \t\tsh->bond = *spawn->bond_info;\n \terr = mlx5_os_open_device(spawn, config, sh);\n@@ -1197,7 +1198,7 @@ mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn,\n \t */\n \terr = mlx5_mr_btree_init(&sh->share_cache.cache,\n \t\t\t\t MLX5_MR_BTREE_CACHE_N * 2,\n-\t\t\t\t spawn->pci_dev->device.numa_node);\n+\t\t\t\t sh->numa_node);\n \tif (err) {\n \t\terr = rte_errno;\n \t\tgoto error;\n@@ -1635,7 +1636,7 @@ mlx5_dev_close(struct rte_eth_dev *dev)\n \t\tunsigned int c = 0;\n \t\tuint16_t port_id;\n \n-\t\tMLX5_ETH_FOREACH_DEV(port_id, priv->pci_dev) {\n+\t\tMLX5_ETH_FOREACH_DEV(port_id, dev->device) {\n \t\t\tstruct mlx5_priv *opriv =\n \t\t\t\trte_eth_devices[port_id].data->dev_private;\n \n@@ -2077,18 +2078,20 @@ mlx5_set_min_inline(struct mlx5_dev_spawn_data *spawn,\n {\n \tif (config->txq_inline_min != MLX5_ARG_UNSET) {\n \t\t/* Application defines size of inlined data explicitly. */\n-\t\tswitch (spawn->pci_dev->id.device_id) {\n-\t\tcase PCI_DEVICE_ID_MELLANOX_CONNECTX4:\n-\t\tcase PCI_DEVICE_ID_MELLANOX_CONNECTX4VF:\n-\t\t\tif (config->txq_inline_min <\n-\t\t\t\t       (int)MLX5_INLINE_HSIZE_L2) {\n-\t\t\t\tDRV_LOG(DEBUG,\n-\t\t\t\t\t\"txq_inline_mix aligned to minimal\"\n-\t\t\t\t\t\" ConnectX-4 required value %d\",\n-\t\t\t\t\t(int)MLX5_INLINE_HSIZE_L2);\n-\t\t\t\tconfig->txq_inline_min = MLX5_INLINE_HSIZE_L2;\n+\t\tif (spawn->pci_dev != NULL) {\n+\t\t\tswitch (spawn->pci_dev->id.device_id) {\n+\t\t\tcase PCI_DEVICE_ID_MELLANOX_CONNECTX4:\n+\t\t\tcase PCI_DEVICE_ID_MELLANOX_CONNECTX4VF:\n+\t\t\t\tif (config->txq_inline_min <\n+\t\t\t\t\t       (int)MLX5_INLINE_HSIZE_L2) {\n+\t\t\t\t\tDRV_LOG(DEBUG,\n+\t\t\t\t\t\t\"txq_inline_mix aligned to minimal ConnectX-4 required value %d\",\n+\t\t\t\t\t\t(int)MLX5_INLINE_HSIZE_L2);\n+\t\t\t\t\tconfig->txq_inline_min =\n+\t\t\t\t\t\t\tMLX5_INLINE_HSIZE_L2;\n+\t\t\t\t}\n+\t\t\t\tbreak;\n \t\t\t}\n-\t\t\tbreak;\n \t\t}\n \t\tgoto exit;\n \t}\n@@ -2142,6 +2145,10 @@ mlx5_set_min_inline(struct mlx5_dev_spawn_data *spawn,\n \t\t\t}\n \t\t}\n \t}\n+\tif (spawn->pci_dev == NULL) {\n+\t\tconfig->txq_inline_min = MLX5_INLINE_HSIZE_NONE;\n+\t\tgoto exit;\n+\t}\n \t/*\n \t * We get here if we are unable to deduce\n \t * inline data size with DevX. Try PCI ID\n@@ -2276,7 +2283,7 @@ mlx5_dev_check_sibling_config(struct mlx5_priv *priv,\n \tif (sh->refcnt == 1)\n \t\treturn 0;\n \t/* Find the device with shared context. */\n-\tMLX5_ETH_FOREACH_DEV(port_id, priv->pci_dev) {\n+\tMLX5_ETH_FOREACH_DEV(port_id, NULL) {\n \t\tstruct mlx5_priv *opriv =\n \t\t\trte_eth_devices[port_id].data->dev_private;\n \n@@ -2307,25 +2314,25 @@ mlx5_dev_check_sibling_config(struct mlx5_priv *priv,\n  *\n  * @param[in] port_id\n  *   port_id to start looking for device.\n- * @param[in] pci_dev\n- *   Pointer to the hint PCI device. When device is being probed\n+ * @param[in] odev\n+ *   Pointer to the hint device. When device is being probed\n  *   the its siblings (master and preceding representors might\n  *   not have assigned driver yet (because the mlx5_os_pci_probe()\n- *   is not completed yet, for this case match on hint PCI\n+ *   is not completed yet, for this case match on hint\n  *   device may be used to detect sibling device.\n  *\n  * @return\n  *   port_id of found device, RTE_MAX_ETHPORT if not found.\n  */\n uint16_t\n-mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device *pci_dev)\n+mlx5_eth_find_next(uint16_t port_id, struct rte_device *odev)\n {\n \twhile (port_id < RTE_MAX_ETHPORTS) {\n \t\tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n \n \t\tif (dev->state != RTE_ETH_DEV_UNUSED &&\n \t\t    dev->device &&\n-\t\t    (dev->device == &pci_dev->device ||\n+\t\t    (dev->device == odev ||\n \t\t     (dev->device->driver &&\n \t\t     dev->device->driver->name &&\n \t\t     !strcmp(dev->device->driver->name, MLX5_PCI_DRIVER_NAME))))\ndiff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h\nindex 94618e10fa..749a9e95d4 100644\n--- a/drivers/net/mlx5/mlx5.h\n+++ b/drivers/net/mlx5/mlx5.h\n@@ -134,6 +134,7 @@ struct mlx5_dev_spawn_data {\n \tuint32_t max_port; /**< Device maximal port index. */\n \tuint32_t phys_port; /**< Device physical port index. */\n \tint pf_bond; /**< bonding device PF index. < 0 - no bonding */\n+\tint numa_node; /**< Device numa node. */\n \tstruct mlx5_switch_info info; /**< Switch information. */\n \tvoid *phys_dev; /**< Associated physical device. */\n \tstruct rte_eth_dev *eth_dev; /**< Associated Ethernet device. */\n@@ -1462,16 +1463,16 @@ int mlx5_proc_priv_init(struct rte_eth_dev *dev);\n void mlx5_proc_priv_uninit(struct rte_eth_dev *dev);\n int mlx5_udp_tunnel_port_add(struct rte_eth_dev *dev,\n \t\t\t      struct rte_eth_udp_tunnel *udp_tunnel);\n-uint16_t mlx5_eth_find_next(uint16_t port_id, struct rte_pci_device *pci_dev);\n+uint16_t mlx5_eth_find_next(uint16_t port_id, struct rte_device *odev);\n int mlx5_dev_close(struct rte_eth_dev *dev);\n bool mlx5_is_hpf(struct rte_eth_dev *dev);\n void mlx5_age_event_prepare(struct mlx5_dev_ctx_shared *sh);\n \n /* Macro to iterate over all valid ports for mlx5 driver. */\n-#define MLX5_ETH_FOREACH_DEV(port_id, pci_dev) \\\n-\tfor (port_id = mlx5_eth_find_next(0, pci_dev); \\\n+#define MLX5_ETH_FOREACH_DEV(port_id, dev) \\\n+\tfor (port_id = mlx5_eth_find_next(0, dev); \\\n \t     port_id < RTE_MAX_ETHPORTS; \\\n-\t     port_id = mlx5_eth_find_next(port_id + 1, pci_dev))\n+\t     port_id = mlx5_eth_find_next(port_id + 1, dev))\n int mlx5_args(struct mlx5_dev_config *config, struct rte_devargs *devargs);\n struct mlx5_dev_ctx_shared *\n mlx5_alloc_shared_dev_ctx(const struct mlx5_dev_spawn_data *spawn,\ndiff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c\nindex c32eeefd88..82e2284d98 100644\n--- a/drivers/net/mlx5/mlx5_ethdev.c\n+++ b/drivers/net/mlx5/mlx5_ethdev.c\n@@ -335,7 +335,7 @@ mlx5_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)\n \tif (priv->representor) {\n \t\tuint16_t port_id;\n \n-\t\tMLX5_ETH_FOREACH_DEV(port_id, priv->pci_dev) {\n+\t\tMLX5_ETH_FOREACH_DEV(port_id, dev->device) {\n \t\t\tstruct mlx5_priv *opriv =\n \t\t\t\trte_eth_devices[port_id].data->dev_private;\n \ndiff --git a/drivers/net/mlx5/mlx5_mr.c b/drivers/net/mlx5/mlx5_mr.c\nindex 89c43fc9e9..87fb4371a4 100644\n--- a/drivers/net/mlx5/mlx5_mr.c\n+++ b/drivers/net/mlx5/mlx5_mr.c\n@@ -199,23 +199,23 @@ mlx5_mr_update_ext_mp_cb(struct rte_mempool *mp, void *opaque,\n }\n \n /**\n- * Finds the first ethdev that match the pci device.\n+ * Finds the first ethdev that match the device.\n  * The existence of multiple ethdev per pci device is only with representors.\n  * On such case, it is enough to get only one of the ports as they all share\n  * the same ibv context.\n  *\n- * @param pdev\n- *   Pointer to the PCI device.\n+ * @param dev\n+ *   Pointer to the device.\n  *\n  * @return\n  *   Pointer to the ethdev if found, NULL otherwise.\n  */\n static struct rte_eth_dev *\n-pci_dev_to_eth_dev(struct rte_pci_device *pdev)\n+dev_to_eth_dev(struct rte_device *dev)\n {\n \tuint16_t port_id;\n \n-\tport_id = rte_eth_find_next_of(0, &pdev->device);\n+\tport_id = rte_eth_find_next_of(0, dev);\n \tif (port_id == RTE_MAX_ETHPORTS)\n \t\treturn NULL;\n \treturn &rte_eth_devices[port_id];\n@@ -245,7 +245,7 @@ mlx5_dma_map(struct rte_pci_device *pdev, void *addr,\n \tstruct mlx5_priv *priv;\n \tstruct mlx5_dev_ctx_shared *sh;\n \n-\tdev = pci_dev_to_eth_dev(pdev);\n+\tdev = dev_to_eth_dev(&pdev->device);\n \tif (!dev) {\n \t\tDRV_LOG(WARNING, \"unable to find matching ethdev \"\n \t\t\t\t \"to PCI device %p\", (void *)pdev);\n@@ -295,7 +295,7 @@ mlx5_dma_unmap(struct rte_pci_device *pdev, void *addr,\n \tstruct mlx5_mr *mr;\n \tstruct mr_cache_entry entry;\n \n-\tdev = pci_dev_to_eth_dev(pdev);\n+\tdev = dev_to_eth_dev(&pdev->device);\n \tif (!dev) {\n \t\tDRV_LOG(WARNING, \"unable to find matching ethdev \"\n \t\t\t\t \"to PCI device %p\", (void *)pdev);\ndiff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c\nindex 7cb8920d6b..6d2351f5a8 100644\n--- a/drivers/net/mlx5/mlx5_trigger.c\n+++ b/drivers/net/mlx5/mlx5_trigger.c\n@@ -697,7 +697,7 @@ mlx5_hairpin_bind_single_port(struct rte_eth_dev *dev, uint16_t rx_port)\n \tuint32_t explicit;\n \tuint16_t rx_queue;\n \n-\tif (mlx5_eth_find_next(rx_port, priv->pci_dev) != rx_port) {\n+\tif (mlx5_eth_find_next(rx_port, dev->device) != rx_port) {\n \t\trte_errno = ENODEV;\n \t\tDRV_LOG(ERR, \"Rx port %u does not belong to mlx5\", rx_port);\n \t\treturn -rte_errno;\n@@ -835,7 +835,7 @@ mlx5_hairpin_unbind_single_port(struct rte_eth_dev *dev, uint16_t rx_port)\n \tint ret;\n \tuint16_t cur_port = priv->dev_data->port_id;\n \n-\tif (mlx5_eth_find_next(rx_port, priv->pci_dev) != rx_port) {\n+\tif (mlx5_eth_find_next(rx_port, dev->device) != rx_port) {\n \t\trte_errno = ENODEV;\n \t\tDRV_LOG(ERR, \"Rx port %u does not belong to mlx5\", rx_port);\n \t\treturn -rte_errno;\n@@ -893,7 +893,6 @@ mlx5_hairpin_bind(struct rte_eth_dev *dev, uint16_t rx_port)\n {\n \tint ret = 0;\n \tuint16_t p, pp;\n-\tstruct mlx5_priv *priv = dev->data->dev_private;\n \n \t/*\n \t * If the Rx port has no hairpin configuration with the current port,\n@@ -902,7 +901,7 @@ mlx5_hairpin_bind(struct rte_eth_dev *dev, uint16_t rx_port)\n \t * information updating.\n \t */\n \tif (rx_port == RTE_MAX_ETHPORTS) {\n-\t\tMLX5_ETH_FOREACH_DEV(p, priv->pci_dev) {\n+\t\tMLX5_ETH_FOREACH_DEV(p, dev->device) {\n \t\t\tret = mlx5_hairpin_bind_single_port(dev, p);\n \t\t\tif (ret != 0)\n \t\t\t\tgoto unbind;\n@@ -912,7 +911,7 @@ mlx5_hairpin_bind(struct rte_eth_dev *dev, uint16_t rx_port)\n \t\treturn mlx5_hairpin_bind_single_port(dev, rx_port);\n \t}\n unbind:\n-\tMLX5_ETH_FOREACH_DEV(pp, priv->pci_dev)\n+\tMLX5_ETH_FOREACH_DEV(pp, dev->device)\n \t\tif (pp < p)\n \t\t\tmlx5_hairpin_unbind_single_port(dev, pp);\n \treturn ret;\n@@ -927,10 +926,9 @@ mlx5_hairpin_unbind(struct rte_eth_dev *dev, uint16_t rx_port)\n {\n \tint ret = 0;\n \tuint16_t p;\n-\tstruct mlx5_priv *priv = dev->data->dev_private;\n \n \tif (rx_port == RTE_MAX_ETHPORTS)\n-\t\tMLX5_ETH_FOREACH_DEV(p, priv->pci_dev) {\n+\t\tMLX5_ETH_FOREACH_DEV(p, dev->device) {\n \t\t\tret = mlx5_hairpin_unbind_single_port(dev, p);\n \t\t\tif (ret != 0)\n \t\t\t\treturn ret;\ndiff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c\nindex 3e5e94444b..11770aeeef 100644\n--- a/drivers/net/mlx5/mlx5_txq.c\n+++ b/drivers/net/mlx5/mlx5_txq.c\n@@ -16,6 +16,7 @@\n #include <rte_bus_pci.h>\n #include <rte_common.h>\n #include <rte_eal_paging.h>\n+#include <rte_bus_pci.h>\n \n #include <mlx5_common.h>\n #include <mlx5_common_mr.h>\n@@ -816,7 +817,7 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl)\n \tif (config->txqs_inline == MLX5_ARG_UNSET)\n \t\ttxqs_inline =\n #if defined(RTE_ARCH_ARM64)\n-\t\t(priv->pci_dev->id.device_id ==\n+\t\t(priv->pci_dev && priv->pci_dev->id.device_id ==\n \t\t\tPCI_DEVICE_ID_MELLANOX_CONNECTX5BF) ?\n \t\t\tMLX5_INLINE_MAX_TXQS_BLUEFIELD :\n #endif\ndiff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c\nindex 5da362a9d5..bf20adaa30 100644\n--- a/drivers/net/mlx5/windows/mlx5_os.c\n+++ b/drivers/net/mlx5/windows/mlx5_os.c\n@@ -391,7 +391,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,\n \t * Look for sibling devices in order to reuse their switch domain\n \t * if any, otherwise allocate one.\n \t */\n-\tMLX5_ETH_FOREACH_DEV(port_id, priv->pci_dev) {\n+\tMLX5_ETH_FOREACH_DEV(port_id, NULL) {\n \t\tconst struct mlx5_priv *opriv =\n \t\t\trte_eth_devices[port_id].data->dev_private;\n \n@@ -1080,6 +1080,7 @@ mlx5_os_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,\n \tdev_config.dv_flow_en = 1;\n \tdev_config.decap_en = 0;\n \tdev_config.log_hp_size = MLX5_ARG_UNSET;\n+\tlist[ns].numa_node = pci_dev->device.numa_node;\n \tlist[ns].eth_dev = mlx5_dev_spawn(&pci_dev->device,\n \t\t\t\t\t  &list[ns],\n \t\t\t\t\t  &dev_config);\n",
    "prefixes": [
        "v4",
        "06/16"
    ]
}