get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 109170,
    "url": "http://patches.dpdk.org/api/patches/109170/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220406071224.870035-1-rongweil@nvidia.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20220406071224.870035-1-rongweil@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220406071224.870035-1-rongweil@nvidia.com",
    "date": "2022-04-06T07:12:24",
    "name": "[v1] net/mlx5: fix probe failure with secondary bonding member",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5b84970c0e86fda1e1ebfb3732712208ab77ff99",
    "submitter": {
        "id": 2223,
        "url": "http://patches.dpdk.org/api/people/2223/?format=api",
        "name": "Rongwei Liu",
        "email": "rongweil@nvidia.com"
    },
    "delegate": {
        "id": 3268,
        "url": "http://patches.dpdk.org/api/users/3268/?format=api",
        "username": "rasland",
        "first_name": "Raslan",
        "last_name": "Darawsheh",
        "email": "rasland@nvidia.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20220406071224.870035-1-rongweil@nvidia.com/mbox/",
    "series": [
        {
            "id": 22359,
            "url": "http://patches.dpdk.org/api/series/22359/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=22359",
            "date": "2022-04-06T07:12:24",
            "name": "[v1] net/mlx5: fix probe failure with secondary bonding member",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/22359/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/109170/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/109170/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 8E730A0509;\n\tWed,  6 Apr 2022 09:12:49 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3210C40E2D;\n\tWed,  6 Apr 2022 09:12:49 +0200 (CEST)",
            "from NAM10-BN7-obe.outbound.protection.outlook.com\n (mail-bn7nam10on2054.outbound.protection.outlook.com [40.107.92.54])\n by mails.dpdk.org (Postfix) with ESMTP id 79AB940DF6;\n Wed,  6 Apr 2022 09:12:47 +0200 (CEST)",
            "from BN0PR08CA0022.namprd08.prod.outlook.com (2603:10b6:408:142::7)\n by SN1PR12MB2461.namprd12.prod.outlook.com (2603:10b6:802:27::24)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Wed, 6 Apr\n 2022 07:12:45 +0000",
            "from BN8NAM11FT056.eop-nam11.prod.protection.outlook.com\n (2603:10b6:408:142:cafe::ba) by BN0PR08CA0022.outlook.office365.com\n (2603:10b6:408:142::7) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.21 via Frontend\n Transport; Wed, 6 Apr 2022 07:12:45 +0000",
            "from mail.nvidia.com (12.22.5.235) by\n BN8NAM11FT056.mail.protection.outlook.com (10.13.177.26) with Microsoft SMTP\n Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id\n 15.20.5144.20 via Frontend Transport; Wed, 6 Apr 2022 07:12:45 +0000",
            "from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL107.nvidia.com\n (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1497.32;\n Wed, 6 Apr 2022 07:12:40 +0000",
            "from nvidia.com (10.126.230.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 6 Apr 2022\n 00:12:38 -0700"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=Fo5NYguSpMrpQmlnf/iVRh5b/PZNwLo7yIoOlJgE+7l0CEDUUgtKmOHgYcOQXyK59Hlsz8rrBi5GBVuv8E6zmRn08LGKW4C88N20JudCN/YjPkbl4jHIPpQuOh4rKcphBMBUd2EU9au0ZF2a+gpdJDsvTI2Hu9oIlZy2pnd5WL7/J7XgTZALvZkXQcgI8ujmlZoCYarrGJe+BSjkaA3CPUUa7n7d6TJ4BuzJj1ngrUQKrSUioE4Es6kVDljF+MlDaUAquCw0/FJTDV7EWBAEQSURNvJqxATG5AHk9MR3EwYeNkJfTQRFbxqBWTLSHh4ebmA+NT9vVKyL2od5ukhFyg==",
        "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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=KTf8W8GTBdJrTBBNu03XReSV304QGd4t9wcHydmAqtU=;\n b=I3431zPkkyhtybvaaPVKs4qCaM4B4X2G7UubJR2D7RVeKQnQUICRCWXYpcF8thPiNTPDttCLA88SL4lr/hjdHz/x00v8jXJJxQvKf9HC9hEsGmD187OSuPe2SbQwl16itqLaERtfEaIE73+Hy3ENGIjAAu4cKIiTC1lhJF9nt/HlX3bSMe0KlpuqAxGjRJkoiKOKZXAyIydxsfqtm8ZvCvdhS8FGjxUFmmPUQ1kow0sbdlqV1/QWUZ7lCcstx5Qa5TXSYg3oM9cbRlMP/KTj1lj6XNKpUmuNoQCyLd/WXNXvh8IkJkQD7FHCfnlJnRf4ZpLNq4RLj1EyYKQEYqPsGA==",
        "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 12.22.5.235) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass\n (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none\n (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=KTf8W8GTBdJrTBBNu03XReSV304QGd4t9wcHydmAqtU=;\n b=rrOlhXL2i4zb1QaQY2+rlc88GhV0TPvPOynQT98O3JkUPD+bEng/LQWQ/nnqtIihHK3Os148M5djsYZK6+vey/4ItqX8mOYpCuZaE6Mj0V2oBgPUPSx3QV0YKn0I4ccLNAnHIDBmxFAUKMMUhadIHnjiooGLNG/ePCZ8Z9JLN9a1yoMoauHffo5CTMiZzCZQyRf1QDUhFg5UZ+JlBld0SCls9wSKULlbycwMAzKooj/cHp1FnzyP6tCkOcIzC0DxHfzKKQiPqwU2kP7iOF+utu+g8WrE23xsUVFHL5AtgsgsEy6i5xoofrDK3qfa8Zwsl//cxzfRJGFE83Yz3jiAbQ==",
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 12.22.5.235)\n smtp.mailfrom=nvidia.com; dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 12.22.5.235 as permitted sender) receiver=protection.outlook.com;\n client-ip=12.22.5.235; helo=mail.nvidia.com;",
        "From": "Rongwei Liu <rongweil@nvidia.com>",
        "To": "<matan@nvidia.com>, <viacheslavo@nvidia.com>, <orika@nvidia.com>,\n <thomas@monjalon.net>, Michael Baum <michaelba@nvidia.com>",
        "CC": "<dev@dpdk.org>, <rasland@nvidia.com>, <stable@dpdk.org>",
        "Subject": "[PATCH v1] net/mlx5: fix probe failure with secondary bonding member",
        "Date": "Wed, 6 Apr 2022 10:12:24 +0300",
        "Message-ID": "<20220406071224.870035-1-rongweil@nvidia.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.126.230.35]",
        "X-ClientProxiedBy": "rnnvmail203.nvidia.com (10.129.68.9) To\n rnnvmail201.nvidia.com (10.129.68.8)",
        "X-EOPAttributedMessage": "0",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id": "9ab6714e-9f17-48c0-3811-08da179cd929",
        "X-MS-TrafficTypeDiagnostic": "SN1PR12MB2461:EE_",
        "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr",
        "X-Microsoft-Antispam-PRVS": "\n <SN1PR12MB24611ED95B5F993ACB940C84ABE79@SN1PR12MB2461.namprd12.prod.outlook.com>",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam": "BCL:0;",
        "X-Microsoft-Antispam-Message-Info": "\n COdW7kH3DZDT0gMdaocFj8ounotJ4OriITjfsBKhoyf1tPPkpzN2crNiN0eEenVwzGrecxz7mp/xz9VkEql2/Js08Z42Mfs79aQpSzIIeG57XjP2eH8nByvqNWPTL7XQ3aevV490C0EkXktU9IcYItNmrhoeyR6yd8zXxvZQKto1d99CETckkwMKZs2Lxl1bX1gMGfj093jfRPmJwcAgGOMQJdUyG6bJyYhEGYBWdrfbl2ccJg5ERO+AkQ4Ah5Q0WXxumN5Jg7QN2Qkr2um32BNEdW8PninRo0mgKzVPav05SacbFSckT1+7HPrWFb5uHMlJJXzcz9orPavgSd1iKoKFHOuUwMZyOZQT3x+qJa5ZCJ+iQ1cgN1Z//FmPR9QtVZwjnZPBzbw4I/UFRg7DdQBxe3ZOVqnOU5ZkUmoLqPn+7Z6ZKq5BWCU4ilQOxZgV6LnaA6f5hSTE/NeIhAVySBKtX3Tj4OY4HbyMBasBJ8QnVrkYqun4mieHQxi/QoWOLxNeVeDnoylEVTtLxlxe46nUPjYZshZbkkjTEuS6UBiz9UnTqlLEgDb64VjkaUAQu3XYb2cwgjt4IP5WO+uD4Ugqu5mpIiHENGH9mkdOWI+isMixVuZwpjkaKNn2WakRskrHi1uzciw8ZUw+vVkt1lGE3oPoW+KTvhr9CUwXd7ZTU8X4aFGAc7IanRBQ7KDQ2mC4vlwAm7ISVr8N9pAuNg==",
        "X-Forefront-Antispam-Report": "CIP:12.22.5.235; CTRY:US; LANG:en; SCL:1; SRV:;\n IPV:CAL; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE;\n SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(8936002)(16526019)(36860700001)(40460700003)(2616005)(81166007)(82310400005)(55016003)(54906003)(83380400001)(356005)(1076003)(336012)(426003)(36756003)(6286002)(2906002)(5660300002)(110136005)(316002)(86362001)(508600001)(6636002)(4326008)(8676002)(70586007)(26005)(186003)(6666004)(47076005)(70206006)(7696005)(36900700001);\n DIR:OUT; SFP:1101;",
        "X-OriginatorOrg": "Nvidia.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "06 Apr 2022 07:12:45.0322 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 9ab6714e-9f17-48c0-3811-08da179cd929",
        "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.235];\n Helo=[mail.nvidia.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n BN8NAM11FT056.eop-nam11.prod.protection.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SN1PR12MB2461",
        "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": "Users can probe primary or secondary PCIe id when bonding is\nconfigured.\n1. -a 0a:00.0,representor=pf[0-1]vf[0-1], PMD probes 5 ports\ntotally: bonding device plus 4 representor ports.\n2. -a 0a:00.1,representor=pf[0-1]vf[0-1], PMD only probes 2\nrepresentor ports.\n\nUnder the 2nd condition, bonding IB device doesn't have the same\nPCIe id and PMD needs to check bonding relationship otherwise\nprobe failure.\n\nFixes: 6856efa54eea (\"net/mlx5: fix PF leak on PCI probing failure\")\nCc: stable@dpdk.org\n\nSigned-off-by: Rongwei Liu <rongweil@nvidia.com>\nAcked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>\n---\n drivers/common/mlx5/linux/mlx5_common_os.c | 26 ++++++++++++++++------\n drivers/net/mlx5/linux/mlx5_os.c           | 24 ++++++++++----------\n 2 files changed, 31 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/drivers/common/mlx5/linux/mlx5_common_os.c b/drivers/common/mlx5/linux/mlx5_common_os.c\nindex 030ceb561f..d40cfd5cd1 100644\n--- a/drivers/common/mlx5/linux/mlx5_common_os.c\n+++ b/drivers/common/mlx5/linux/mlx5_common_os.c\n@@ -559,21 +559,33 @@ mlx5_os_get_ibv_device(const struct rte_pci_addr *addr)\n \tint n;\n \tstruct ibv_device **ibv_list = mlx5_glue->get_device_list(&n);\n \tstruct ibv_device *ibv_match = NULL;\n+\tuint8_t guid1[32] = {0};\n+\tuint8_t guid2[32] = {0};\n+\tint ret1, ret2 = -1;\n+\tstruct rte_pci_addr paddr;\n \n-\tif (ibv_list == NULL) {\n+\tif (ibv_list == NULL || !n) {\n \t\trte_errno = ENOSYS;\n+\t\tif (ibv_list)\n+\t\t\tmlx5_glue->free_device_list(ibv_list);\n \t\treturn NULL;\n \t}\n+\tret1 = mlx5_get_device_guid(addr, guid1, sizeof(guid1));\n \twhile (n-- > 0) {\n-\t\tstruct rte_pci_addr paddr;\n-\n \t\tDRV_LOG(DEBUG, \"Checking device \\\"%s\\\"..\", ibv_list[n]->name);\n \t\tif (mlx5_get_pci_addr(ibv_list[n]->ibdev_path, &paddr) != 0)\n \t\t\tcontinue;\n-\t\tif (rte_pci_addr_cmp(addr, &paddr) != 0)\n-\t\t\tcontinue;\n-\t\tibv_match = ibv_list[n];\n-\t\tbreak;\n+\t\tif (ret1 > 0)\n+\t\t\tret2 = mlx5_get_device_guid(&paddr, guid2, sizeof(guid2));\n+\t\t/* Bond device can bond secondary PCIe */\n+\t\tif ((strstr(ibv_list[n]->name, \"bond\") &&\n+\t\t    ((ret1 > 0 && ret2 > 0 && !memcmp(guid1, guid2, sizeof(guid1))) ||\n+\t\t    (addr->domain == paddr.domain && addr->bus == paddr.bus &&\n+\t\t     addr->devid == paddr.devid))) ||\n+\t\t     !rte_pci_addr_cmp(addr, &paddr)) {\n+\t\t\tibv_match = ibv_list[n];\n+\t\t\tbreak;\n+\t\t}\n \t}\n \tif (ibv_match == NULL) {\n \t\tDRV_LOG(WARNING,\ndiff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c\nindex ff65efb2a2..a821153b35 100644\n--- a/drivers/net/mlx5/linux/mlx5_os.c\n+++ b/drivers/net/mlx5/linux/mlx5_os.c\n@@ -1979,9 +1979,9 @@ mlx5_os_pci_probe_pf(struct mlx5_common_device *cdev,\n \tif (!nd) {\n \t\t/* No device matches, just complain and bail out. */\n \t\tDRV_LOG(WARNING,\n-\t\t\t\"No Verbs device matches PCI device \" PCI_PRI_FMT \",\"\n+\t\t\t\"PF %u doesn't have Verbs device matches PCI device \" PCI_PRI_FMT \",\"\n \t\t\t\" are kernel drivers loaded?\",\n-\t\t\towner_pci.domain, owner_pci.bus,\n+\t\t\towner_id, owner_pci.domain, owner_pci.bus,\n \t\t\towner_pci.devid, owner_pci.function);\n \t\trte_errno = ENOENT;\n \t\tret = -rte_errno;\n@@ -2387,16 +2387,16 @@ mlx5_os_pci_probe(struct mlx5_common_device *cdev,\n \t\tfor (p = 0; p < eth_da.nb_ports; p++) {\n \t\t\tret = mlx5_os_pci_probe_pf(cdev, &eth_da,\n \t\t\t\t\t\t   eth_da.ports[p], mkvlist);\n-\t\t\tif (ret)\n-\t\t\t\tbreak;\n-\t\t}\n-\t\tif (ret) {\n-\t\t\tDRV_LOG(ERR, \"Probe of PCI device \" PCI_PRI_FMT \" \"\n-\t\t\t\t\"aborted due to prodding failure of PF %u\",\n-\t\t\t\tpci_dev->addr.domain, pci_dev->addr.bus,\n-\t\t\t\tpci_dev->addr.devid, pci_dev->addr.function,\n-\t\t\t\teth_da.ports[p]);\n-\t\t\tmlx5_net_remove(cdev);\n+\t\t\tif (ret) {\n+\t\t\t\tDRV_LOG(INFO, \"Probe of PCI device \" PCI_PRI_FMT \" \"\n+\t\t\t\t\t\"aborted due to proding failure of PF %u\",\n+\t\t\t\t\tpci_dev->addr.domain, pci_dev->addr.bus,\n+\t\t\t\t\tpci_dev->addr.devid, pci_dev->addr.function,\n+\t\t\t\t\teth_da.ports[p]);\n+\t\t\t\tmlx5_net_remove(cdev);\n+\t\t\t\tif (p != 0)\n+\t\t\t\t\tbreak;\n+\t\t\t}\n \t\t}\n \t} else {\n \t\tret = mlx5_os_pci_probe_pf(cdev, &eth_da, 0, mkvlist);\n",
    "prefixes": [
        "v1"
    ]
}